Fixed Buttons, Added Button events, Added Toggle Buttons, Added Sliders(WIP no graphics), Rework backend #308

Merged
maverickdgg merged 13 commits from SP3-20-UI-System into main 2023-01-16 14:11:51 +08:00
2 changed files with 4 additions and 3 deletions
Showing only changes of commit 402bd16522 - Show all commits

View File

@ -1,4 +1,4 @@
Start in Fullscreen: false Start in Fullscreen: false
Starting Scene ID: 97158628 Starting Scene ID: 97161771
Window Size: {x: 1920, y: 1080} Window Size: {x: 1920, y: 1080}
Window Title: SHADE Engine Window Title: SHADE Engine

View File

@ -158,10 +158,11 @@ namespace SHADE
SHVec2 mousePos; SHVec2 mousePos;
SHVec2 windowSize; SHVec2 windowSize;
#ifdef SHEDITOR #ifdef SHEDITOR
windowSize = SHEditorWindowManager::GetEditorWindow<SHEditorViewport>()->windowSize; windowSize = SHEditorWindowManager::GetEditorWindow<SHEditorViewport>()->beginContentRegionAvailable;
mousePos = SHEditorWindowManager::GetEditorWindow<SHEditorViewport>()->viewportMousePos; mousePos = SHEditorWindowManager::GetEditorWindow<SHEditorViewport>()->viewportMousePos;
//mousePos.y = windowSize.y - mousePos.y; //mousePos.y = windowSize.y - mousePos.y;
//SHLOG_INFO("mouse pos: {}, {}", mousePos.x, mousePos.y) SHLOG_INFO("mouse pos: {}, {}", mousePos.x, mousePos.y)
SHLOG_INFO("window size: {}, {}", windowSize.x, windowSize.y)
//mousePos /= windowSize; //mousePos /= windowSize;
//SHLOG_INFO("mouse pos normalized: {}, {}", mousePos.x, mousePos.y) //SHLOG_INFO("mouse pos normalized: {}, {}", mousePos.x, mousePos.y)
#endif #endif