mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
Make sure the Slider can't step in increments of less than 1.
This commit is contained in:
parent
fbdf659723
commit
45f475675d
@ -439,8 +439,12 @@ class Slider : public Clickable {
|
||||
public:
|
||||
Slider(int *value, int minValue, int maxValue, LayoutParams *layoutParams = 0)
|
||||
: Clickable(layoutParams), value_(value), showPercent_(false), minValue_(minValue), maxValue_(maxValue), paddingLeft_(5), paddingRight_(70) {}
|
||||
|
||||
Slider(int *value, int minValue, int maxValue, int step = 1, LayoutParams *layoutParams = 0)
|
||||
: Clickable(layoutParams), value_(value), showPercent_(false), minValue_(minValue), maxValue_(maxValue), paddingLeft_(5), paddingRight_(70), step_(step) {}
|
||||
: Clickable(layoutParams), value_(value), showPercent_(false), minValue_(minValue), maxValue_(maxValue), paddingLeft_(5), paddingRight_(70), step_(step) {
|
||||
if (step <= 0)
|
||||
step_ = 1.0f;
|
||||
}
|
||||
virtual void Draw(UIContext &dc);
|
||||
virtual void Key(const KeyInput &input);
|
||||
virtual void Touch(const TouchInput &input);
|
||||
|
Loading…
Reference in New Issue
Block a user