mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Make button sprites (scrollbar arrows) DPI-aware (#14772)
This commit is contained in:
parent
fb6ceb2664
commit
4c001bd248
9 changed files with 67 additions and 61 deletions
|
@ -200,7 +200,7 @@ public:
|
|||
\param loop: True if the animation should loop, false if not
|
||||
\param scale: True if the sprite should scale to button size, false if not */
|
||||
virtual void setSprite(EGUI_BUTTON_STATE state, s32 index,
|
||||
video::SColor color = video::SColor(255, 255, 255, 255), bool loop = false, bool scale = false) = 0;
|
||||
video::SColor color = video::SColor(255, 255, 255, 255), bool loop = false) = 0;
|
||||
|
||||
//! Get the sprite-index for the given state or -1 when no sprite is set
|
||||
virtual s32 getSpriteIndex(EGUI_BUTTON_STATE state) const = 0;
|
||||
|
@ -211,9 +211,6 @@ public:
|
|||
//! Returns if the sprite in the given state does loop
|
||||
virtual bool getSpriteLoop(EGUI_BUTTON_STATE state) const = 0;
|
||||
|
||||
//! Returns if the sprite in the given state is scaled
|
||||
virtual bool getSpriteScale(EGUI_BUTTON_STATE state) const = 0;
|
||||
|
||||
//! Sets if the button should behave like a push button.
|
||||
/** Which means it can be in two states: Normal or Pressed. With a click on the button,
|
||||
the user can change the state of the button. */
|
||||
|
|
|
@ -374,6 +374,12 @@ const c8 *const GUISkinFontNames[EGDF_COUNT + 1] = {
|
|||
class IGUISkin : virtual public IReferenceCounted
|
||||
{
|
||||
public:
|
||||
//! returns display density scaling factor
|
||||
virtual float getScale() const = 0;
|
||||
|
||||
//! sets display density scaling factor
|
||||
virtual void setScale(float scale) = 0;
|
||||
|
||||
//! returns default color
|
||||
virtual video::SColor getColor(EGUI_DEFAULT_COLOR color) const = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue