Added Escape To desellect

This commit is contained in:
OusmBlueNinja 2025-01-04 23:21:26 -06:00
parent 6d356f5597
commit 99d99280cc
3 changed files with 39 additions and 26 deletions

View File

@ -1,6 +1,6 @@
[Window][DockSpace]
Pos=0,0
Size=1920,1177
Size=1280,720
Collapsed=0
[Window][Debug##Default]
@ -80,8 +80,8 @@ Collapsed=0
DockId=0x0000001F,0
[Window][Performance##performance]
Pos=8,581
Size=335,588
Pos=8,360
Size=335,352
Collapsed=0
DockId=0x0000001C,0
@ -105,7 +105,7 @@ DockId=0x0000000F,0
[Window][Scene Window##SceneWindow]
Pos=8,28
Size=335,551
Size=335,330
Collapsed=0
DockId=0x0000001B,0
@ -141,22 +141,28 @@ DockId=0x00000021,0
[Window][ Editor##EditorWindow]
Pos=345,28
Size=1170,709
Size=530,252
Collapsed=0
DockId=0x0000001F,0
[Window][ Inspector##InspectorWindow]
Pos=1517,28
Size=395,1141
Pos=877,28
Size=395,684
Collapsed=0
DockId=0x00000022,0
[Window][ Profiler]
Pos=933,739
Size=582,430
Pos=345,282
Size=530,430
Collapsed=0
DockId=0x00000023,0
[Window][Logger Window]
Pos=345,282
Size=530,430
Collapsed=0
DockId=0x00000023,1
[Table][0xE9E836E4,4]
Column 0 Weight=1.2999
Column 1 Weight=1.0439
@ -170,7 +176,7 @@ Column 2 Weight=0.9665
Column 3 Weight=0.6950
[Docking][Data]
DockSpace ID=0x14621557 Window=0x3DA2F1DE Pos=8,51 Size=1904,1141 Split=X Selected=0xF7365A5A
DockSpace ID=0x14621557 Window=0x3DA2F1DE Pos=146,189 Size=1264,684 Split=X Selected=0xF7365A5A
DockNode ID=0x00000020 Parent=0x14621557 SizeRef=884,684 Split=X
DockNode ID=0x00000013 Parent=0x00000020 SizeRef=335,1142 Split=Y Selected=0x818D04BB
DockNode ID=0x0000001B Parent=0x00000013 SizeRef=264,551 HiddenTabBar=1 Selected=0x1D5D92B6
@ -195,7 +201,7 @@ DockSpace ID=0x14621557 Window=0x3DA2F1DE Pos=8,51 Siz
DockNode ID=0x0000001F Parent=0x0000001D SizeRef=549,709 CentralNode=1 HiddenTabBar=1 Selected=0x9A7B23B9
DockNode ID=0x00000025 Parent=0x0000001D SizeRef=549,430 Split=X Selected=0x1F29F1F5
DockNode ID=0x00000021 Parent=0x00000025 SizeRef=586,323 Selected=0x1F29F1F5
DockNode ID=0x00000023 Parent=0x00000025 SizeRef=582,323 Selected=0x7A66B86B
DockNode ID=0x00000023 Parent=0x00000025 SizeRef=582,323 Selected=0x8E897E2D
DockNode ID=0x0000001E Parent=0x00000017 SizeRef=518,417 Selected=0xC74E1AEE
DockNode ID=0x00000018 Parent=0x0000000D SizeRef=1202,364 Split=X Selected=0x1C0788A1
DockNode ID=0x00000019 Parent=0x00000018 SizeRef=601,364 Selected=0x1C0788A1

View File

@ -2,6 +2,10 @@ Entities:
- ID: 0
Name: Bacround
Components:
Transform:
Position: [0, 300, 0]
Rotation: [0, 0, 0]
Scale: [1, 1, 1]
Mesh:
MeshPath: assets/models/sponza.obj
submeshes_len: 26
@ -156,13 +160,15 @@ Entities:
- id: 26
type: texture_diffuse
path: textures/vase_hanging.tga
Transform:
Position: [0, 300, 0]
Rotation: [0, 0, 0]
Scale: [1, 1, 1]
- ID: 1
Name: Camera
Components:
ScriptComponent:
ScriptPath: assets/scripts/camera.lua
Transform:
Position: [881.214233, 200, -162.832016]
Rotation: [0, 170.205078, 0]
Scale: [1, 1, 1]
CameraComponent:
IsPerspective: true
DefaultRuntimeCamera: true
@ -170,23 +176,17 @@ Entities:
AspectRatio: 1.75
NearPlane: 0.100000001
FarPlane: 7000
Transform:
Position: [654.808716, 200, -123.745712]
Rotation: [0, 170.205078, 0]
Scale: [1, 1, 1]
ScriptComponent:
ScriptPath: assets/scripts/camera.lua
- ID: 2
Name: Grey Cube
Components:
Transform:
Position: [0, 0, 0]
Rotation: [0, 0, 0]
Scale: [25, 25, 25]
Mesh:
MeshPath: assets/models/DefaultMesh.obj
submeshes_len: 1
submeshes:
- vao: 53
indexCount: 36
textures: ~
textures: ~
Transform:
Position: [-3.43110847, 248.891235, 0]
Rotation: [0, -0, 0]
Scale: [25, 25, 25]

View File

@ -29,6 +29,13 @@ std::shared_ptr<GameObject> CreateDefaultCube()
void SceneWindow::Show()
{
SCOPE_TIMER("SceneWindow::Show");
if (g_SelectedObject) {
if (ImGui::IsKeyPressed(ImGuiKey_Escape)) {
g_SelectedObject = nullptr;
}
}
if (ImGui::Begin("Scene Window##SceneWindow"))
{
// Add Button