Skip to content
Extraits de code Groupes Projets
Valider 907221c9 rédigé par Niels Martin Hansen's avatar Niels Martin Hansen
Parcourir les fichiers

Added spec for step in floatedit controls in Lua config dialogs and intedit...

Added spec for step in floatedit controls in Lua config dialogs and intedit spin controls seem to work properly now.

Originally committed to SVN as r1307.
parent 53f429c1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -284,9 +284,12 @@ nospin:
wxControl *Create(wxWindow *parent)
{
if (hasspin) {
cw = new wxSpinCtrl(parent, -1, wxString::Format(_T("%d"), value), wxDefaultPosition, wxDefaultSize, min, max, value);
wxSpinCtrl *scw = new wxSpinCtrl(parent, -1, wxString::Format(_T("%d"), value), wxDefaultPosition, wxDefaultSize, min, max, value);
scw->SetRange(min, max);
scw->SetValue(value);
cw = scw;
} else {
cw = new wxTextCtrl(parent, -1, text, wxDefaultPosition, wxDefaultSize, 0); //, IntTextValidator());
cw = new wxTextCtrl(parent, -1, wxString::Format(_T("%d"), value), wxDefaultPosition, wxDefaultSize, 0); //, IntTextValidator());
}
cw->SetToolTip(hint);
return cw;
......@@ -318,6 +321,8 @@ nospin:
class FloatEdit : public Edit {
public:
float value;
bool hasspin;
float min, max;
// FIXME: Can't support spin button atm
FloatEdit(lua_State *L)
......
......@@ -73,6 +73,13 @@ max (number or nil)
dialog if the value is outside the range between "min" and "max".
Key defined only for the "floatedit" class:
step (number or nil)
If nil/undefined, the value 1 (one) is used instead.
Specifies the size of change when the spin buttons are clicked.
Keys defined only for the "dropdown" class:
items (table)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter