|
|
|
|
|
|
|
|
|
|
void AddField(int index, string subLabel) |
|
|
|
{ |
|
|
|
Add(new Label(subLabel)); |
|
|
|
var label = new Label(subLabel); |
|
|
|
Add(label); |
|
|
|
var dragger = new FieldMouseDragger<double>(doubleField); |
|
|
|
dragger.SetDragZone(label); |
|
|
|
doubleField.RegisterCallback<MouseDownEvent>(Repaint); |
|
|
|
doubleField.RegisterCallback<MouseMoveEvent>(Repaint); |
|
|
|
doubleField.OnValueChanged(evt => |
|
|
|
|
|
|
SetValue(value); |
|
|
|
m_UndoGroup = -1; |
|
|
|
Dirty(ChangeType.Repaint); |
|
|
|
}); |
|
|
|
doubleField.RegisterCallback<InputEvent>(evt => |
|
|
|
{ |
|
|
|
|
|
|
var value = GetValue(); |
|
|
|
value[index] = newValue; |
|
|
|
SetValue(value); |
|
|
|
Dirty(ChangeType.Repaint); |
|
|
|
}); |
|
|
|
doubleField.RegisterCallback<KeyDownEvent>(evt => |
|
|
|
{ |
|
|
|