Skip to content

Commit 4844ade

Browse files
Merge pull request #123 from adriengivry/feature/editor_style_update
Updating editor style
2 parents 31cafa5 + 75149ee commit 4844ade

25 files changed

Lines changed: 13467 additions & 8436 deletions

File tree

Sources/Overload/OvEditor/layout.ini

Lines changed: 76 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,19 @@ DockId=0x00000014,0
7474

7575
[Window][Hardware Info##3]
7676
Pos=0,24
77-
Size=311,305
77+
Size=257,270
7878
Collapsed=0
7979
DockId=0x00000013,0
8080

8181
[Window][Profiler##4]
82-
Pos=313,760
83-
Size=1176,267
82+
Pos=313,711
83+
Size=1176,316
8484
Collapsed=0
8585
DockId=0x0000000A,0
8686

8787
[Window][Console##5]
88-
Pos=313,760
89-
Size=1176,267
88+
Pos=313,711
89+
Size=1176,316
9090
Collapsed=0
9191
DockId=0x0000000A,1
9292

@@ -97,26 +97,26 @@ Collapsed=0
9797
DockId=0x0000000D,0
9898

9999
[Window][Scene View##8]
100-
Pos=313,102
101-
Size=1176,656
100+
Pos=313,100
101+
Size=1176,609
102102
Collapsed=0
103-
DockId=0x00000022,0
103+
DockId=0x00000011,0
104104

105105
[Window][Game View##9]
106-
Pos=313,102
107-
Size=1176,656
106+
Pos=313,100
107+
Size=1176,609
108108
Collapsed=0
109-
DockId=0x00000022,1
109+
DockId=0x00000011,1
110110

111111
[Window][Asset View##10]
112-
Pos=1491,523
113-
Size=429,504
112+
Pos=1233,466
113+
Size=354,446
114114
Collapsed=0
115115
DockId=0x00000012,1
116116

117117
[Window][Help##11]
118118
Pos=0,24
119-
Size=311,305
119+
Size=415,415
120120
Collapsed=0
121121
DockId=0x00000013,1
122122

@@ -128,9 +128,9 @@ DockId=0x00000012,0
128128

129129
[Window][Toolbar##12]
130130
Pos=313,24
131-
Size=1176,76
131+
Size=1176,74
132132
Collapsed=0
133-
DockId=0x00000017,0
133+
DockId=0x00000010,0
134134

135135
[Window][Asset Browser##3]
136136
Pos=0,464
@@ -222,59 +222,74 @@ Collapsed=0
222222
DockId=0x00000025,1
223223

224224
[Window][Material Editor##13]
225-
Pos=1491,24
226-
Size=429,497
225+
Pos=1233,24
226+
Size=354,440
227227
Collapsed=0
228-
DockId=0x0000000D,2
228+
DockId=0x0000000D,3
229229

230230
[Window][Project Settings##14]
231-
Pos=1491,24
232-
Size=429,497
231+
Pos=1233,24
232+
Size=354,440
233233
Collapsed=0
234234
DockId=0x0000000D,1
235235

236236
[Window][Asset Metadata Editor##15]
237-
Pos=1491,24
238-
Size=429,497
237+
Pos=1233,24
238+
Size=354,440
239+
Collapsed=0
240+
DockId=0x0000000D,2
241+
242+
[Window][Dear ImGui Demo]
243+
Pos=1360,510
244+
Size=823,1363
245+
Collapsed=1
246+
247+
[Window][Horizontal contents size demo window]
248+
Pos=60,60
249+
Size=330,334
250+
Collapsed=0
251+
252+
[Window][Dear ImGui Style Editor]
253+
Pos=529,169
254+
Size=383,1264
239255
Collapsed=0
240-
DockId=0x0000000D,1
241256

242257
[Docking][Data]
243-
DockSpace ID=0x3F20F338 Pos=0,24 Size=1920,1003 Split=X SelectedTab=0x110CC311
244-
DockNode ID=0x00000023 Parent=0x3F20F338 SizeRef=1429,1363 Split=X
245-
DockNode ID=0x00000019 Parent=0x00000023 SizeRef=417,1363 Split=Y SelectedTab=0x5736C3E2
246-
DockNode ID=0x0000001B Parent=0x00000019 SizeRef=144,442 SelectedTab=0x4636E4C6
247-
DockNode ID=0x0000001C Parent=0x00000019 SizeRef=144,559 SelectedTab=0x1DB03793
248-
DockNode ID=0x0000001A Parent=0x00000023 SizeRef=1010,1363 Split=X
249-
DockNode ID=0x00000015 Parent=0x0000001A SizeRef=1986,1363 Split=X
250-
DockNode ID=0x0000000E Parent=0x00000015 SizeRef=311,1363 Split=Y SelectedTab=0x2031F374
251-
DockNode ID=0x00000013 Parent=0x0000000E SizeRef=351,305 SelectedTab=0xFEC67CA6
252-
DockNode ID=0x00000014 Parent=0x0000000E SizeRef=351,696 SelectedTab=0x6AB70705
253-
DockNode ID=0x0000000F Parent=0x00000015 SizeRef=1176,1363 Split=X
254-
DockNode ID=0x00000003 Parent=0x0000000F SizeRef=1521,1003 Split=X
255-
DockNode ID=0x00000005 Parent=0x00000003 SizeRef=418,1003 Split=Y SelectedTab=0x29EC771F
256-
DockNode ID=0x0000000B Parent=0x00000005 SizeRef=153,716 SelectedTab=0x29EC771F
257-
DockNode ID=0x0000000C Parent=0x00000005 SizeRef=153,285 SelectedTab=0xF3BE56BF
258-
DockNode ID=0x00000006 Parent=0x00000003 SizeRef=1101,1003 Split=Y
259-
DockNode ID=0x00000001 Parent=0x00000006 SizeRef=1920,716 Split=Y SelectedTab=0x110CC311
260-
DockNode ID=0x00000009 Parent=0x00000001 SizeRef=2560,998 Split=Y SelectedTab=0x81B3DE80
261-
DockNode ID=0x00000017 Parent=0x00000009 SizeRef=1633,76 SelectedTab=0x5D0727F1
262-
DockNode ID=0x00000018 Parent=0x00000009 SizeRef=1633,656 Split=Y SelectedTab=0xA4A6F988
263-
DockNode ID=0x0000001F Parent=0x00000018 SizeRef=2187,976 Split=Y SelectedTab=0xF6B4EE16
264-
DockNode ID=0x00000021 Parent=0x0000001F SizeRef=1207,75 SelectedTab=0x2A001767
265-
DockNode ID=0x00000022 Parent=0x0000001F SizeRef=1207,641 CentralNode=1 SelectedTab=0x81B3DE80
266-
DockNode ID=0x00000020 Parent=0x00000018 SizeRef=2187,385 SelectedTab=0xEFBCD82C
267-
DockNode ID=0x0000000A Parent=0x00000001 SizeRef=2560,363 SelectedTab=0x76B58996
268-
DockNode ID=0x00000002 Parent=0x00000006 SizeRef=1920,285 SelectedTab=0x01B2B900
269-
DockNode ID=0x00000004 Parent=0x0000000F SizeRef=397,1003 Split=Y SelectedTab=0x1ACA2EC4
270-
DockNode ID=0x00000007 Parent=0x00000004 SizeRef=360,409 SelectedTab=0x1ACA2EC4
271-
DockNode ID=0x00000008 Parent=0x00000004 SizeRef=360,453 SelectedTab=0x0B0A0F09
272-
DockNode ID=0x00000016 Parent=0x0000001A SizeRef=572,1363 Split=Y SelectedTab=0x92035EB3
273-
DockNode ID=0x0000000D Parent=0x00000016 SizeRef=215,676 SelectedTab=0xF242A481
274-
DockNode ID=0x00000012 Parent=0x00000016 SizeRef=215,685 SelectedTab=0x92035EB3
275-
DockNode ID=0x00000024 Parent=0x3F20F338 SizeRef=489,1363 Split=Y SelectedTab=0xFD7203C3
276-
DockNode ID=0x0000001D Parent=0x00000024 SizeRef=489,598 Split=Y SelectedTab=0xB3AC929F
277-
DockNode ID=0x00000025 Parent=0x0000001D SizeRef=489,301 SelectedTab=0xFD7203C3
278-
DockNode ID=0x00000026 Parent=0x0000001D SizeRef=489,295 SelectedTab=0x84941F95
279-
DockNode ID=0x0000001E Parent=0x00000024 SizeRef=489,403 SelectedTab=0xE5046E25
258+
DockSpace ID=0x3F20F338 Window=0xEFEA1D90 Pos=0,24 Size=1920,1003 Split=X NoWindowMenuButton=1
259+
DockNode ID=0x00000023 Parent=0x3F20F338 SizeRef=1429,1363 Split=X NoWindowMenuButton=1
260+
DockNode ID=0x00000019 Parent=0x00000023 SizeRef=417,1363 Split=Y NoWindowMenuButton=1
261+
DockNode ID=0x0000001B Parent=0x00000019 SizeRef=144,442 NoWindowMenuButton=1
262+
DockNode ID=0x0000001C Parent=0x00000019 SizeRef=144,559 NoWindowMenuButton=1
263+
DockNode ID=0x0000001A Parent=0x00000023 SizeRef=1010,1363 Split=X NoWindowMenuButton=1
264+
DockNode ID=0x00000015 Parent=0x0000001A SizeRef=1986,1363 Split=X NoWindowMenuButton=1
265+
DockNode ID=0x0000000E Parent=0x00000015 SizeRef=311,1363 Split=Y NoWindowMenuButton=1
266+
DockNode ID=0x00000013 Parent=0x0000000E SizeRef=351,305 NoWindowMenuButton=1 Selected=0xFEC67CA6
267+
DockNode ID=0x00000014 Parent=0x0000000E SizeRef=351,696 NoWindowMenuButton=1 Selected=0x6AB70705
268+
DockNode ID=0x0000000F Parent=0x00000015 SizeRef=1176,1363 Split=X NoWindowMenuButton=1
269+
DockNode ID=0x00000003 Parent=0x0000000F SizeRef=1521,1003 Split=X NoWindowMenuButton=1
270+
DockNode ID=0x00000005 Parent=0x00000003 SizeRef=418,1003 Split=Y NoWindowMenuButton=1
271+
DockNode ID=0x0000000B Parent=0x00000005 SizeRef=153,716 NoWindowMenuButton=1
272+
DockNode ID=0x0000000C Parent=0x00000005 SizeRef=153,285 NoWindowMenuButton=1
273+
DockNode ID=0x00000006 Parent=0x00000003 SizeRef=1101,1003 Split=Y NoWindowMenuButton=1
274+
DockNode ID=0x00000001 Parent=0x00000006 SizeRef=1920,716 Split=Y NoWindowMenuButton=1
275+
DockNode ID=0x00000009 Parent=0x00000001 SizeRef=2560,932 Split=Y NoWindowMenuButton=1
276+
DockNode ID=0x0000001F Parent=0x00000009 SizeRef=2187,976 Split=Y NoWindowMenuButton=1
277+
DockNode ID=0x00000021 Parent=0x0000001F SizeRef=1207,75 NoWindowMenuButton=1
278+
DockNode ID=0x00000022 Parent=0x0000001F SizeRef=1207,641 Split=Y NoWindowMenuButton=1 Selected=0x81B3DE80
279+
DockNode ID=0x00000010 Parent=0x00000022 SizeRef=783,74 NoWindowMenuButton=1 Selected=0x5D0727F1
280+
DockNode ID=0x00000011 Parent=0x00000022 SizeRef=783,609 CentralNode=1 NoWindowMenuButton=1 Selected=0x81B3DE80
281+
DockNode ID=0x00000020 Parent=0x00000009 SizeRef=2187,385 NoWindowMenuButton=1
282+
DockNode ID=0x0000000A Parent=0x00000001 SizeRef=2560,429 NoWindowMenuButton=1 Selected=0x76B58996
283+
DockNode ID=0x00000002 Parent=0x00000006 SizeRef=1920,285 NoWindowMenuButton=1
284+
DockNode ID=0x00000004 Parent=0x0000000F SizeRef=397,1003 Split=Y NoWindowMenuButton=1
285+
DockNode ID=0x00000007 Parent=0x00000004 SizeRef=360,409 NoWindowMenuButton=1
286+
DockNode ID=0x00000008 Parent=0x00000004 SizeRef=360,453 NoWindowMenuButton=1
287+
DockNode ID=0x00000016 Parent=0x0000001A SizeRef=572,1363 Split=Y NoWindowMenuButton=1
288+
DockNode ID=0x0000000D Parent=0x00000016 SizeRef=215,676 NoWindowMenuButton=1 Selected=0x6DCD1E52
289+
DockNode ID=0x00000012 Parent=0x00000016 SizeRef=215,685 NoWindowMenuButton=1 Selected=0x92035EB3
290+
DockNode ID=0x00000024 Parent=0x3F20F338 SizeRef=489,1363 Split=Y NoWindowMenuButton=1
291+
DockNode ID=0x0000001D Parent=0x00000024 SizeRef=489,598 Split=Y NoWindowMenuButton=1
292+
DockNode ID=0x00000025 Parent=0x0000001D SizeRef=489,301 NoWindowMenuButton=1
293+
DockNode ID=0x00000026 Parent=0x0000001D SizeRef=489,295 NoWindowMenuButton=1
294+
DockNode ID=0x0000001E Parent=0x00000024 SizeRef=489,403 NoWindowMenuButton=1
280295

Sources/Overload/OvEditor/src/OvEditor/Core/Context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ OvEditor::Core::Context::Context(const std::string& p_projectPath, const std::st
6464

6565
std::filesystem::create_directories(std::string(getenv("APPDATA")) + "\\OverloadTech\\OvEditor\\");
6666

67-
uiManager = std::make_unique<OvUI::Core::UIManager>(window->GetGlfwWindow(), OvUI::Styling::EStyle::DUNE_DARK);
67+
uiManager = std::make_unique<OvUI::Core::UIManager>(window->GetGlfwWindow(), OvUI::Styling::EStyle::ALTERNATIVE_DARK);
6868
uiManager->LoadFont("Ruda_Big", editorAssetsPath + "\\Fonts\\Ruda-Bold.ttf", 16);
6969
uiManager->LoadFont("Ruda_Small", editorAssetsPath + "\\Fonts\\Ruda-Bold.ttf", 12);
7070
uiManager->LoadFont("Ruda_Medium", editorAssetsPath + "\\Fonts\\Ruda-Bold.ttf", 14);
@@ -75,7 +75,7 @@ OvEditor::Core::Context::Context(const std::string& p_projectPath, const std::st
7575
uiManager->EnableDocking(true);
7676

7777
if (!std::filesystem::exists(std::string(getenv("APPDATA")) + "\\OverloadTech\\OvEditor\\layout.ini"))
78-
ImGui::LoadIniSettingsFromDisk("Config\\layout.ini");
78+
uiManager->ResetLayout("Config\\layout.ini");
7979

8080
/* Audio */
8181
audioEngine = std::make_unique<OvAudio::Core::AudioEngine>(projectAssetsPath);

Sources/Overload/OvEditor/src/OvEditor/Core/EditorActions.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,8 +362,7 @@ void OvEditor::Core::EditorActions::SetActorSpawnMode(EActorSpawnMode p_value)
362362

363363
void OvEditor::Core::EditorActions::ResetLayout()
364364
{
365-
// TODO
366-
std::filesystem::copy_file("default.ini", std::string(getenv("APPDATA")) + "/OverloadTech/OvEditor/layout.ini", std::filesystem::copy_options::overwrite_existing);
365+
DelayAction([this]() {m_context.uiManager->ResetLayout("Config\\layout.ini"); });
367366
}
368367

369368
void OvEditor::Core::EditorActions::SetSceneViewCameraSpeed(int p_speed)

Sources/Overload/OvEditor/src/OvEditor/Core/ProjectHub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ void OvEditor::Core::ProjectHub::SetupContext()
301301
m_renderer = std::make_unique<OvRendering::Core::Renderer>(*m_driver);
302302
m_renderer->SetCapability(OvRendering::Settings::ERenderingCapability::MULTISAMPLE, true);
303303

304-
m_uiManager = std::make_unique<OvUI::Core::UIManager>(m_window->GetGlfwWindow(), OvUI::Styling::EStyle::DUNE_DARK);
304+
m_uiManager = std::make_unique<OvUI::Core::UIManager>(m_window->GetGlfwWindow(), OvUI::Styling::EStyle::ALTERNATIVE_DARK);
305305
m_uiManager->LoadFont("Ruda_Big", "Data\\Editor\\Fonts\\Ruda-Bold.ttf", 18);
306306
m_uiManager->UseFont("Ruda_Big");
307307
m_uiManager->EnableEditorLayoutSave(false);

Sources/Overload/OvEditor/src/OvEditor/Panels/AView.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ OvEditor::Panels::AView::AView
2020
m_cameraRotation = OvMaths::FQuaternion({0.0f, 135.0f, 0.0f});
2121

2222
m_image = &CreateWidget<OvUI::Widgets::Visual::Image>(m_fbo.GetTextureID(), OvMaths::FVector2{ 0.f, 0.f });
23+
24+
scrollable = false;
2325
}
2426

2527
void OvEditor::Panels::AView::Update(float p_deltaTime)

Sources/Overload/OvEditor/src/OvEditor/Panels/Toolbar.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ OvEditor::Panels::Toolbar::Toolbar
3030

3131
CreateWidget<OvUI::Widgets::Layout::Spacing>(0).lineBreak = false;
3232
auto& refreshButton = CreateWidget<OvUI::Widgets::Buttons::ButtonImage>(EDITOR_CONTEXT(editorResources)->GetTexture("Button_Refresh")->id, OvMaths::FVector2{ 20, 20 });
33-
refreshButton.tint = OvUI::Types::Color{ .85f, .65f, 0.f };
3433

3534
m_playButton->lineBreak = false;
3635
m_pauseButton->lineBreak = false;
@@ -49,7 +48,7 @@ OvEditor::Panels::Toolbar::Toolbar
4948
auto enable = [](OvUI::Widgets::Buttons::ButtonImage* p_button, bool p_enable)
5049
{
5150
p_button->disabled = !p_enable;
52-
p_button->tint = p_enable ? OvUI::Types::Color{ 1.0f, 1.0f, 1.0f, 1.0f} : OvUI::Types::Color{0.2f, 0.2f, 0.2f, 1.0f};
51+
p_button->tint = p_enable ? OvUI::Types::Color{ 1.0f, 1.0f, 1.0f, 1.0f} : OvUI::Types::Color{1.0f, 1.0f, 1.0f, 0.15f};
5352
};
5453

5554
switch (p_newMode)

Sources/Overload/OvGame/src/OvGame/Core/Context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ OvGame::Core::Context::Context() :
5757

5858
renderer->SetCapability(OvRendering::Settings::ERenderingCapability::MULTISAMPLE, projectSettings.Get<bool>("multisampling"));
5959

60-
uiManager = std::make_unique<OvUI::Core::UIManager>(window->GetGlfwWindow(), OvUI::Styling::EStyle::DUNE_DARK);
60+
uiManager = std::make_unique<OvUI::Core::UIManager>(window->GetGlfwWindow(), OvUI::Styling::EStyle::ALTERNATIVE_DARK);
6161
uiManager->LoadFont("Ruda_Big", engineAssetsPath + "Fonts\\Ruda-Bold.ttf", 16);
6262
uiManager->LoadFont("Ruda_Small", engineAssetsPath + "Fonts\\Ruda-Bold.ttf", 12);
6363
uiManager->LoadFont("Ruda_Medium", engineAssetsPath + "Fonts\\Ruda-Bold.ttf", 14);

Sources/Overload/OvUI/include/OvUI/Core/UIManager.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ namespace OvUI::Core
9696
*/
9797
void EnableDocking(bool p_value);
9898

99+
/**
100+
* Reset the UI layout to the given configuration file
101+
* @param p_config
102+
*/
103+
void ResetLayout(const std::string & p_config) const;
104+
99105
/**
100106
* Return true if the docking system is enabled
101107
*/

0 commit comments

Comments
 (0)