summaryrefslogtreecommitdiffhomepage
path: root/floormat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-12-01 23:58:00 +0100
committerStanislaw Halik <sthalik@misaki.pl>2022-12-01 23:58:00 +0100
commitdee84335974f43f4d3661c5c7df481310357c24c (patch)
tree0ec8900c6d4768a7ba4af851e010c495c0b74585 /floormat
parentc9ed7f5a14037a87f74650e4426056cbdec59116 (diff)
main, imgui: use magnum's virtual dpi scale
Diffstat (limited to 'floormat')
-rw-r--r--floormat/events.hpp2
-rw-r--r--floormat/main.hpp5
-rw-r--r--floormat/settings.hpp2
3 files changed, 5 insertions, 4 deletions
diff --git a/floormat/events.hpp b/floormat/events.hpp
index a70832fd..44e54a05 100644
--- a/floormat/events.hpp
+++ b/floormat/events.hpp
@@ -20,7 +20,7 @@ struct mouse_button_event final {
};
struct mouse_move_event final {
- Vector2i position, relative_position;
+ Vector2i position;
mouse_button buttons = mouse_button_none;
int mods = 0;
};
diff --git a/floormat/main.hpp b/floormat/main.hpp
index af388de4..6c933037 100644
--- a/floormat/main.hpp
+++ b/floormat/main.hpp
@@ -60,12 +60,13 @@ struct floormat_main
virtual struct world& world() noexcept = 0;
virtual SDL_Window* window() noexcept = 0;
- float dpi_scale() const noexcept { return _dpi_scale; }
+ Vector2 dpi_scale() const noexcept { return _dpi_scale; }
[[nodiscard]] static floormat_main* create(floormat_app& app, fm_settings&& options);
protected:
- float _frame_time1 = 0, _frame_time2 = 0, _dpi_scale = 1;
+ float _frame_time1 = 0, _frame_time2 = 0;
+ Vector2 _dpi_scale{1, 1}, _virtual_scale{1, 1};
};
} // namespace floormat
diff --git a/floormat/settings.hpp b/floormat/settings.hpp
index f90e1c97..aed65dea 100644
--- a/floormat/settings.hpp
+++ b/floormat/settings.hpp
@@ -17,7 +17,7 @@ struct fm_settings
fm_DECLARE_DEPRECATED_COPY_ASSIGNMENT(fm_settings);
fm_DECLARE_DEFAULT_MOVE_ASSIGNMENT_(fm_settings);
- Magnum::Math::Vector2<int> resolution{1536, 1152};
+ Magnum::Math::Vector2<int> resolution{1024, 720};
Corrade::Containers::String title{"Test"};
Corrade::Containers::String disabled_extensions; // TODO
bool vsync = true;