diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-29 19:17:51 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-07-29 19:17:51 (GMT) |
| commit | d138b2de544ab6ccdd7ec72bb5051e0bc437a1a9 (patch) | |
| tree | 05792ec51751bbe3ad62a124500738b0bb6381ea /src/game/GameView.cpp | |
| parent | 418373a3cd6cf93ee1e41ffa502b8f4754831349 (diff) | |
| download | powder-d138b2de544ab6ccdd7ec72bb5051e0bc437a1a9.zip powder-d138b2de544ab6ccdd7ec72bb5051e0bc437a1a9.tar.gz | |
Number type for text fields, addresses some of issue #39
Diffstat (limited to 'src/game/GameView.cpp')
| -rw-r--r-- | src/game/GameView.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp index d7d0a50..5c4ecee 100644 --- a/src/game/GameView.cpp +++ b/src/game/GameView.cpp @@ -253,21 +253,29 @@ GameView::GameView(): colourRSlider->SetActionCallback(new ColourChange(this)); colourRValue = new ui::Textbox(ui::Point(60, Size.Y-41), ui::Point(25, 17), "255"); colourRValue->SetActionCallback(new ColourChange(this)); + colourRValue->SetLimit(3); + colourRValue->SetInputType(ui::Textbox::Number); colourGSlider = new ui::Slider(ui::Point(95, Size.Y-39), ui::Point(50, 14), 255); colourGSlider->SetActionCallback(new ColourChange(this)); colourGValue = new ui::Textbox(ui::Point(150, Size.Y-41), ui::Point(25, 17), "255"); colourGValue->SetActionCallback(new ColourChange(this)); + colourGValue->SetLimit(3); + colourGValue->SetInputType(ui::Textbox::Number); colourBSlider = new ui::Slider(ui::Point(185, Size.Y-39), ui::Point(50, 14), 255); colourBSlider->SetActionCallback(new ColourChange(this)); colourBValue = new ui::Textbox(ui::Point(240, Size.Y-41), ui::Point(25, 17), "255"); colourBValue->SetActionCallback(new ColourChange(this)); + colourBValue->SetLimit(3); + colourBValue->SetInputType(ui::Textbox::Number); colourASlider = new ui::Slider(ui::Point(275, Size.Y-39), ui::Point(50, 14), 255); colourASlider->SetActionCallback(new ColourChange(this)); colourAValue = new ui::Textbox(ui::Point(330, Size.Y-41), ui::Point(25, 17), "255"); colourAValue->SetActionCallback(new ColourChange(this)); + colourAValue->SetLimit(3); + colourAValue->SetInputType(ui::Textbox::Number); class ElementSearchAction : public ui::ButtonAction { |
