|
4 | 4 | * @licence: MIT |
5 | 5 | */ |
6 | 6 |
|
7 | | -#include <OvTools/Utils/SystemCalls.h> |
8 | | - |
9 | | -#include <OvCore/ECS/Components/CCamera.h> |
10 | | -#include <OvCore/ECS/Components/CPointLight.h> |
11 | | -#include <OvCore/ECS/Components/CDirectionalLight.h> |
12 | | -#include <OvCore/ECS/Components/CSpotLight.h> |
13 | 7 | #include <OvCore/ECS/Components/CAmbientBoxLight.h> |
14 | 8 | #include <OvCore/ECS/Components/CAmbientSphereLight.h> |
| 9 | +#include <OvCore/ECS/Components/CAudioListener.h> |
| 10 | +#include <OvCore/ECS/Components/CAudioSource.h> |
| 11 | +#include <OvCore/ECS/Components/CCamera.h> |
| 12 | +#include <OvCore/ECS/Components/CDirectionalLight.h> |
15 | 13 | #include <OvCore/ECS/Components/CPhysicalBox.h> |
16 | | -#include <OvCore/ECS/Components/CPhysicalSphere.h> |
17 | 14 | #include <OvCore/ECS/Components/CPhysicalCapsule.h> |
18 | | -#include <OvCore/ECS/Components/CAudioSource.h> |
19 | | -#include <OvCore/ECS/Components/CAudioListener.h> |
| 15 | +#include <OvCore/ECS/Components/CPhysicalSphere.h> |
| 16 | +#include <OvCore/ECS/Components/CPointLight.h> |
| 17 | +#include <OvCore/ECS/Components/CSpotLight.h> |
| 18 | + |
| 19 | +#include <OvEditor/Core/EditorActions.h> |
| 20 | +#include <OvEditor/Panels/AssetView.h> |
| 21 | +#include <OvEditor/Panels/Console.h> |
| 22 | +#include <OvEditor/Panels/MenuBar.h> |
| 23 | +#include <OvEditor/Panels/SceneView.h> |
| 24 | +#include <OvEditor/Settings/EditorSettings.h> |
| 25 | +#include <OvEditor/Utils/ActorCreationMenu.h> |
| 26 | + |
| 27 | +#include <OvTools/Utils/SystemCalls.h> |
20 | 28 |
|
21 | | -#include <OvUI/Widgets/Visual/Separator.h> |
22 | | -#include <OvUI/Widgets/Sliders/SliderInt.h> |
23 | | -#include <OvUI/Widgets/Sliders/SliderFloat.h> |
24 | 29 | #include <OvUI/Widgets/Drags/DragFloat.h> |
25 | 30 | #include <OvUI/Widgets/Selection/ColorEdit.h> |
26 | 31 | #include <OvUI/Widgets/Selection/ComboBox.h> |
27 | | - |
28 | | -#include "OvEditor/Core/EditorActions.h" |
29 | | -#include "OvEditor/Panels/AssetView.h" |
30 | | -#include "OvEditor/Panels/Console.h" |
31 | | -#include "OvEditor/Panels/MenuBar.h" |
32 | | -#include "OvEditor/Panels/SceneView.h" |
33 | | -#include "OvEditor/Settings/EditorSettings.h" |
34 | | -#include "OvEditor/Utils/ActorCreationMenu.h" |
| 32 | +#include <OvUI/Widgets/Sliders/SliderFloat.h> |
| 33 | +#include <OvUI/Widgets/Sliders/SliderInt.h> |
| 34 | +#include <OvUI/Widgets/Visual/Separator.h> |
35 | 35 |
|
36 | 36 | using namespace OvUI::Panels; |
37 | 37 | using namespace OvUI::Widgets; |
@@ -225,7 +225,7 @@ void OvEditor::Panels::MenuBar::CreateWindowMenu() |
225 | 225 | void OvEditor::Panels::MenuBar::CreateActorsMenu() |
226 | 226 | { |
227 | 227 | auto& actorsMenu = CreateWidget<MenuList>("Actors"); |
228 | | - Utils::ActorCreationMenu::GenerateActorCreationMenu(actorsMenu); |
| 228 | + Utils::ActorCreationMenu::GenerateActorCreationMenu(actorsMenu); |
229 | 229 | } |
230 | 230 |
|
231 | 231 | void OvEditor::Panels::MenuBar::CreateResourcesMenu() |
@@ -254,15 +254,24 @@ void OvEditor::Panels::MenuBar::CreateLayoutMenu() |
254 | 254 |
|
255 | 255 | void OvEditor::Panels::MenuBar::CreateHelpMenu() |
256 | 256 | { |
257 | | - auto& helpMenu = CreateWidget<MenuList>("Help"); |
258 | | - helpMenu.CreateWidget<MenuItem>("GitHub").ClickedEvent += [] {OvTools::Utils::SystemCalls::OpenURL("https://github.com/Overload-Technologies/Overload"); }; |
259 | | - helpMenu.CreateWidget<MenuItem>("Tutorials").ClickedEvent += [] {OvTools::Utils::SystemCalls::OpenURL("https://github.com/Overload-Technologies/Overload/wiki/Tutorials"); }; |
260 | | - helpMenu.CreateWidget<MenuItem>("Scripting API").ClickedEvent += [] {OvTools::Utils::SystemCalls::OpenURL("https://github.com/Overload-Technologies/Overload/wiki/Scripting-API"); }; |
261 | | - helpMenu.CreateWidget<Visual::Separator>(); |
262 | | - helpMenu.CreateWidget<MenuItem>("Bug Report").ClickedEvent += [] {OvTools::Utils::SystemCalls::OpenURL("https://github.com/Overload-Technologies/Overload/issues/new?assignees=&labels=Bug&template=bug_report.md&title="); }; |
263 | | - helpMenu.CreateWidget<MenuItem>("Feature Request").ClickedEvent += [] {OvTools::Utils::SystemCalls::OpenURL("https://github.com/Overload-Technologies/Overload/issues/new?assignees=&labels=Feature&template=feature_request.md&title="); }; |
264 | | - helpMenu.CreateWidget<Visual::Separator>(); |
265 | | - helpMenu.CreateWidget<Texts::Text>("Version: " + std::string(OVERLOAD_VERSION)); |
| 257 | + auto& helpMenu = CreateWidget<MenuList>("Help"); |
| 258 | + helpMenu.CreateWidget<MenuItem>("GitHub").ClickedEvent += [] {OvTools::Utils::SystemCalls::OpenURL("https://github.com/Overload-Technologies/Overload"); }; |
| 259 | + helpMenu.CreateWidget<MenuItem>("Documentation").ClickedEvent += [] { |
| 260 | + const auto documentationPath = std::filesystem::path{} / "Documentation" / "index.html"; |
| 261 | + if (std::filesystem::exists(documentationPath)) |
| 262 | + { |
| 263 | + OvTools::Utils::SystemCalls::OpenFile(documentationPath.string()); |
| 264 | + } |
| 265 | + else |
| 266 | + { |
| 267 | + OvTools::Utils::SystemCalls::OpenURL("https://doc.overloadengine.org"); |
| 268 | + } |
| 269 | + }; |
| 270 | + helpMenu.CreateWidget<Visual::Separator>(); |
| 271 | + helpMenu.CreateWidget<MenuItem>("Bug Report").ClickedEvent += [] {OvTools::Utils::SystemCalls::OpenURL("https://github.com/Overload-Technologies/Overload/issues/new?assignees=&labels=Bug&template=bug_report.md&title="); }; |
| 272 | + helpMenu.CreateWidget<MenuItem>("Feature Request").ClickedEvent += [] {OvTools::Utils::SystemCalls::OpenURL("https://github.com/Overload-Technologies/Overload/issues/new?assignees=&labels=Feature&template=feature_request.md&title="); }; |
| 273 | + helpMenu.CreateWidget<Visual::Separator>(); |
| 274 | + helpMenu.CreateWidget<Texts::Text>("Version: " + std::string(OVERLOAD_VERSION)); |
266 | 275 | } |
267 | 276 |
|
268 | 277 | void OvEditor::Panels::MenuBar::RegisterPanel(const std::string& p_name, OvUI::Panels::PanelWindow& p_panel) |
|
0 commit comments