TyomaVader / ImGuiNotify

A (very) simple notification wrapper for Dear ImGui
MIT License
75 stars 6 forks source link

Can I use ImGui D3D9 for this? #7

Open GamebP opened 1 month ago

GamebP commented 1 month ago

@TyomaVader ?

TyomaVader commented 1 month ago

@TyomaVader ?

Do you have some problem running the library ?

GamebP commented 1 month ago

What library?

Artsiom Chmutau @.***> (šajā datumā: trešd., 2024. g.

  1. maijs 16:50) rakstīja:

@TyomaVader https://github.com/TyomaVader ?

Do you have some problem running the library ?

— Reply to this email directly, view it on GitHub https://github.com/TyomaVader/ImGuiNotify/issues/7#issuecomment-2112598384, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVARP73CAZS475APYYAU4Q3ZCNRZJAVCNFSM6AAAAABHXHOVT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJSGU4TQMZYGQ . You are receiving this because you authored the thread.Message ID: @.***>

TyomaVader commented 1 month ago

What library?

Artsiom Chmutau @.***> (šajā datumā: trešd., 2024. g.

  1. maijs 16:50) rakstīja:

@TyomaVader https://github.com/TyomaVader ?

Do you have some problem running the library ?

— Reply to this email directly, view it on GitHub https://github.com/TyomaVader/ImGuiNotify/issues/7#issuecomment-2112598384, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVARP73CAZS475APYYAU4Q3ZCNRZJAVCNFSM6AAAAABHXHOVT6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJSGU4TQMZYGQ . You are receiving this because you authored the thread.Message ID: @.***>

ImGuiNotify with D3D9

GamebP commented 1 month ago

What DO I need to include a library to make it work?

I currently have

d3d9.lib
winmm.lib
freetype.lib
libcurl_a.lib
Ws2_32.lib
Wldap32.lib
msvcrtd.lib
Advapi32.lib
Crypt32.lib
Normaliz.lib
User32.lib
TyomaVader commented 1 month ago

What DO I need to include a library to make it work?

I currently have

d3d9.lib
winmm.lib
freetype.lib
libcurl_a.lib
Ws2_32.lib
Wldap32.lib
msvcrtd.lib
Advapi32.lib
Crypt32.lib
Normaliz.lib
User32.lib

Follow the instructions from the official Dear ImGui repository and then include the ImGuiNotify header

GamebP commented 1 month ago

...

https://github.com/TyomaVader/ImGuiNotify/assets/88152063/4d78df04-c065-454d-b42b-deeb3807a3d4 https://prnt.sc/UNTUwP0reLgy

GamebP commented 1 month ago

sorry to ask, but how to make the Notification outside imgui? image

TyomaVader commented 1 month ago

sorry to ask, but how to make the Notification outside imgui? image

You would need to spawn the notification window relative to your screen size instead of the main window size, for this you would require the docking branch of Dear ImGui

GamebP commented 1 month ago

Alright good to know. Will try to change when I have a chance

GamebP commented 1 month ago

I made changes to imgui from normal to Docking But after rebuilding and testing it's still in the main imgui as picture above . Could need to change more things to make it work outside.

TyomaVader commented 1 month ago

I made changes to imgui from normal to Docking But after rebuilding and testing it's still in the main imgui as picture above . Could need to change more things to make it work outside.

Yes, I believe you would need to change the following lines from the ImGuiNotify.hpp in the RenderNotifications function:

// Set notification window position to bottom right corner of the main window, considering the main window size and location in relation to the display
ImVec2 mainWindowPos = GetMainViewport()->Pos;
SetNextWindowPos(ImVec2(mainWindowPos.x + mainWindowSize.x - NOTIFY_PADDING_X, mainWindowPos.y + mainWindowSize.y - NOTIFY_PADDING_Y - height), ImGuiCond_Always, ImVec2(1.0f, 1.0f));
GamebP commented 1 month ago

Can I invite you to my project and you can have a look? Since it's the same issue as before.,

TyomaVader commented 1 month ago

Can I invite you to my project and you can have a look? Since it's the same issue as before.,

Ok, I'll have a look in a few days

GamebP commented 1 month ago

Alright