hugoam / kiui

Auto-layout Ui library, lightweight, skinnable and system agnostic, with an OpenGL backend
zlib License
749 stars 70 forks source link

[Enchantment] Make int/uint overflow optional in TypeIn #23

Closed alexeyknyshev closed 9 years ago

alexeyknyshev commented 9 years ago

Is it possible to implement it without inheritance?

Reagards, Alexey Knyshev

hugoam commented 9 years ago

I don't understand the question. You mean prevent entering a value that is higher than MAX_INT for example ?

alexeyknyshev commented 9 years ago

In qt for example increment button disables when you reach maximum value of representing type

BTW I think it requires numeric specific TypeIn with API such:

void setMaximum(const T &max) void setMinimum(const T &min) void setRange(const T& min, const T &max)

and getters

see: http://doc.qt.io/qt-4.8/qspinbox.html http://doc.qt.io/qt-4.8/qdoublespinbox.html

hugoam commented 9 years ago

Yes, this will be taken care of. The sliders already have a min max values in the Stat parameter that they take, it's just a matter of "moving" that feature to TypeIn also.

hugoam commented 9 years ago

Fixed in da79125