Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Sources/OvEditor/src/OvEditor/Core/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ void OvEditor::Core::Context::ResetProjectSettings()
projectSettings.Add<int>("x_resolution", 1280);
projectSettings.Add<int>("y_resolution", 720);
projectSettings.Add<bool>("fullscreen", false);
projectSettings.Add<bool>("resizable", false);
projectSettings.Add<std::string>("executable_name", "Game");
projectSettings.Add<std::string>("start_scene", "");
projectSettings.Add<bool>("vsync", true);
Expand All @@ -209,6 +210,7 @@ bool OvEditor::Core::Context::IsProjectSettingsIntegrityVerified()
projectSettings.IsKeyExisting("x_resolution") &&
projectSettings.IsKeyExisting("y_resolution") &&
projectSettings.IsKeyExisting("fullscreen") &&
projectSettings.IsKeyExisting("resizable") &&
projectSettings.IsKeyExisting("executable_name") &&
projectSettings.IsKeyExisting("start_scene") &&
projectSettings.IsKeyExisting("vsync") &&
Expand Down
1 change: 1 addition & 0 deletions Sources/OvEditor/src/OvEditor/Panels/ProjectSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ OvEditor::Panels::ProjectSettings::ProjectSettings(const std::string & p_title,
GUIDrawer::DrawScalar<int>(columns, "Resolution X", GenerateGatherer<int>("x_resolution"), GenerateProvider<int>("x_resolution"), 1, 0, 10000);
GUIDrawer::DrawScalar<int>(columns, "Resolution Y", GenerateGatherer<int>("y_resolution"), GenerateProvider<int>("y_resolution"), 1, 0, 10000);
GUIDrawer::DrawBoolean(columns, "Fullscreen", GenerateGatherer<bool>("fullscreen"), GenerateProvider<bool>("fullscreen"));
GUIDrawer::DrawBoolean(columns, "Allow resizing", GenerateGatherer<bool>("resizable"), GenerateProvider<bool>("resizable"));
GUIDrawer::DrawString(columns, "Executable name", GenerateGatherer<std::string>("executable_name"), GenerateProvider<std::string>("executable_name"));
GUIDrawer::DrawAsset(columns, "Window Icon", GenerateGatherer<std::string>("window_icon"), GenerateProvider<std::string>("window_icon"), OvTools::Utils::PathParser::EFileType::TEXTURE);
}
Expand Down
6 changes: 5 additions & 1 deletion Sources/OvGame/src/OvGame/Core/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ OvGame::Core::Context::Context() :
projectSettings.TryGet("x_resolution", targetWindowResolution[0]);
projectSettings.TryGet("y_resolution", targetWindowResolution[1]);
windowSettings.maximized = false;
windowSettings.resizable = false;
projectSettings.TryGet("resizable", windowSettings.resizable);
projectSettings.TryGet("fullscreen", windowSettings.fullscreen);
projectSettings.TryGet("samples", windowSettings.samples);

Expand Down Expand Up @@ -176,6 +176,10 @@ OvGame::Core::Context::Context() :
windowSettings.height,
true, false, false
);

window->FramebufferResizeEvent.AddListener([this](unsigned short width, unsigned short height) {
framebuffer->Resize(width, height);
});
}

OvGame::Core::Context::~Context()
Expand Down