mirror of https://github.com/buggins/dlangui.git
fix my stupitidy
This commit is contained in:
parent
6abd917549
commit
4d21e9d340
|
@ -2531,7 +2531,6 @@ class EditLine : EditWidgetBase {
|
||||||
// SpinCtrl
|
// SpinCtrl
|
||||||
private {
|
private {
|
||||||
import std.ascii;
|
import std.ascii;
|
||||||
alias _ui = UIString.fromRaw;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class SpinCtrl : HorizontalLayout {
|
class SpinCtrl : HorizontalLayout {
|
||||||
|
@ -2556,12 +2555,12 @@ class SpinCtrl : HorizontalLayout {
|
||||||
butDown.enabled = status;
|
butDown.enabled = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
this(int min, int max, int initialVal = 0, string labelText = null){
|
this(int min, int max, int initialVal = 0, dstring labelText = null){
|
||||||
this.min = min;
|
this.min = min;
|
||||||
this.max = max;
|
this.max = max;
|
||||||
|
|
||||||
if(labelText !is null){
|
if(labelText !is null){
|
||||||
label = new TextWidget("label", _ui(labelText));
|
label = new TextWidget("label", labelText);
|
||||||
addChild(label);
|
addChild(label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2625,14 +2624,14 @@ class SpinCtrl : HorizontalLayout {
|
||||||
butUp.click = delegate(Widget w) {
|
butUp.click = delegate(Widget w) {
|
||||||
immutable val = linEdit.text.to!int;
|
immutable val = linEdit.text.to!int;
|
||||||
if(val < max )
|
if(val < max )
|
||||||
linEdit.text = (val + 1).to!string._ui;
|
linEdit.text = (val + 1).to!dstring;
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
butDown.click = delegate(Widget w) {
|
butDown.click = delegate(Widget w) {
|
||||||
immutable val = linEdit.text.to!int;
|
immutable val = linEdit.text.to!int;
|
||||||
if(val > min )
|
if(val > min )
|
||||||
linEdit.text = (val - 1).to!string._ui;
|
linEdit.text = (val - 1).to!dstring;
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue