1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Scale C++ menus down to fit the window (#14690)

This commit is contained in:
grorp 2024-05-24 12:10:46 +02:00 committed by GitHub
parent d5fc040d2d
commit 728f643ea7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 32 additions and 29 deletions

View file

@ -94,6 +94,12 @@ protected:
std::string m_jni_field_name;
#endif
struct ScalingInfo {
f32 scale;
core::rect<s32> rect;
};
ScalingInfo getScalingInfo(v2u32 screensize, v2u32 base_size);
// This is set to true if the menu is currently processing a second-touch event.
bool m_second_touch = false;
// This is set to true if the menu is currently processing a mouse event