1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Make button sprites (scrollbar arrows) DPI-aware (#14772)

This commit is contained in:
grorp 2024-06-26 15:25:27 +02:00 committed by GitHub
parent fb6ceb2664
commit 4c001bd248
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 67 additions and 61 deletions

View file

@ -24,6 +24,12 @@ public:
//! destructor
virtual ~CGUISkin();
//! returns display density scaling factor
virtual float getScale() const override { return Scale; }
//! sets display density scaling factor
virtual void setScale(float scale) override { Scale = scale; }
//! returns default color
video::SColor getColor(EGUI_DEFAULT_COLOR color) const override;
@ -210,6 +216,7 @@ public:
EGUI_SKIN_TYPE getType() const override;
private:
float Scale = 1.0f;
video::SColor Colors[EGDC_COUNT];
s32 Sizes[EGDS_COUNT];
u32 Icons[EGDI_COUNT];