Button FX now uses the easing functions. Viewport can now be fixed at an AR. #371

Merged
maverickdgg merged 3 commits from SP3-20-UI-System into main 2023-02-27 15:28:55 +08:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 4c7d06452e - Show all commits

View File

@ -9667,7 +9667,7 @@
NumberOfChildren: 1 NumberOfChildren: 1
Components: Components:
Transform Component: Transform Component:
Translate: {x: -900, y: 450, z: 0} Translate: {x: -850, y: 450, z: 0}
Rotate: {x: 0, y: 0, z: 0} Rotate: {x: 0, y: 0, z: 0}
Scale: {x: 400, y: 100, z: 1} Scale: {x: 400, y: 100, z: 1}
IsActive: true IsActive: true

View File

@ -70,7 +70,8 @@ namespace SHADE
beginCursorPos = ImGui::GetCursorScreenPos(); beginCursorPos = ImGui::GetCursorScreenPos();
viewportMousePos = { mousePos.x - beginCursorPos.x, mousePos.y - beginCursorPos.y }; viewportMousePos = { mousePos.x - beginCursorPos.x, mousePos.y - beginCursorPos.y };
gfxSystem->GetMousePickSystem()->SetViewportMousePos(viewportMousePos); gfxSystem->GetMousePickSystem()->SetViewportMousePos(viewportMousePos);
ImGui::Image((ImTextureID)descriptorSet, { beginContentRegionAvailable.x, beginContentRegionAvailable.y }); SHVec2 viewportSize = CalculateWindowSize(beginContentRegionAvailable);
ImGui::Image((ImTextureID)descriptorSet, { viewportSize.x, viewportSize.y });
if (ImGui::IsWindowHovered() && ImGui::IsMouseDown(ImGuiMouseButton_Right)) if (ImGui::IsWindowHovered() && ImGui::IsMouseDown(ImGuiMouseButton_Right))
{ {