Fixed Buttons, Added Button events, Added Toggle Buttons, Added Sliders(WIP no graphics), Rework backend #308
|
@ -1,3 +1,3 @@
|
|||
Name: UI Test
|
||||
ID: 88543249
|
||||
Name: UI_Test
|
||||
ID: 97161771
|
||||
Type: 5
|
||||
|
|
|
@ -350,7 +350,7 @@ namespace SHADE
|
|||
SHSerializationHelper::InitializeComponentFromNode<SHCanvasComponent>(componentsNode, eid);
|
||||
SHSerializationHelper::InitializeComponentFromNode<SHButtonComponent>(componentsNode, eid);
|
||||
SHSerializationHelper::InitializeComponentFromNode<SHToggleButtonComponent>(componentsNode, eid);
|
||||
SHSerializationHelper::ConvertNodeToComponent<SHTextRenderableComponent>(componentsNode, eid);
|
||||
//SHSerializationHelper::ConvertNodeToComponent<SHTextRenderableComponent>(componentsNode, eid);
|
||||
SHSerializationHelper::InitializeComponentFromNode<SHTextRenderableComponent>(componentsNode, eid);
|
||||
SHSerializationHelper::InitializeComponentFromNode<SHLightComponent>(componentsNode, eid);
|
||||
}
|
||||
|
|
|
@ -161,9 +161,9 @@ namespace SHADE
|
|||
windowSize = SHEditorWindowManager::GetEditorWindow<SHEditorViewport>()->windowSize;
|
||||
mousePos = SHEditorWindowManager::GetEditorWindow<SHEditorViewport>()->viewportMousePos;
|
||||
//mousePos.y = windowSize.y - mousePos.y;
|
||||
SHLOG_INFO("mouse pos: {}, {}", mousePos.x, mousePos.y)
|
||||
mousePos /= windowSize;
|
||||
SHLOG_INFO("mouse pos normalized: {}, {}", mousePos.x, mousePos.y)
|
||||
//SHLOG_INFO("mouse pos: {}, {}", mousePos.x, mousePos.y)
|
||||
//mousePos /= windowSize;
|
||||
//SHLOG_INFO("mouse pos normalized: {}, {}", mousePos.x, mousePos.y)
|
||||
#endif
|
||||
|
||||
SHVec2 camSize{ cameraSystem->GetCameraWidthHeight(0)};
|
||||
|
@ -172,8 +172,8 @@ namespace SHADE
|
|||
topExtent = CanvasToScreenPoint(topExtent);
|
||||
btmExtent = CanvasToScreenPoint(btmExtent);
|
||||
//SHLOG_INFO("TopExtent: {}, {} Btm Extent: {}, {}", topExtent.x, topExtent.y, btmExtent.x, btmExtent.y)
|
||||
topExtent /= camSize;
|
||||
btmExtent /= camSize;
|
||||
//topExtent /= camSize;
|
||||
//btmExtent /= camSize;
|
||||
|
||||
comp.isClicked = false;
|
||||
if (mousePos.x >= topExtent.x && mousePos.x <= btmExtent.x
|
||||
|
|
Loading…
Reference in New Issue