Skip to content

Commit 1f6a58e

Browse files
committed
NOTE; add unique id to default control names, fix #16, see issue for discussion
1 parent 28dbfa8 commit 1f6a58e

File tree

15 files changed

+32
-14
lines changed

15 files changed

+32
-14
lines changed

mint/Button.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Button extends Control {
3232

3333
options = _options;
3434

35-
def(options.name, 'button');
35+
def(options.name, 'button.${Helper.uniqueid()}');
3636
def(options.mouse_input, true);
3737

3838
super(options);

mint/Checkbox.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Checkbox extends Control {
4343

4444
options = _options;
4545

46-
def(options.name, 'checkbox');
46+
def(options.name, 'checkbox.${Helper.uniqueid()}');
4747
def(options.mouse_input, true);
4848

4949
super(_options);

mint/Control.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class Control {
228228

229229
children = [];
230230

231-
name = def(_options_.name, 'control');
231+
name = def(_options_.name, 'control.${Helper.uniqueid()}');
232232
user = _options_.user;
233233
depth_offset = def(_options_.depth, 0);
234234

mint/Dropdown.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Dropdown extends Control {
3535

3636
options = _options;
3737

38-
def(options.name, 'dropdown');
38+
def(options.name, 'dropdown.${Helper.uniqueid()}');
3939
def(options.mouse_input, true);
4040

4141
//create the base control

mint/Image.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Image extends Control {
4040

4141
options = _options;
4242

43-
def(options.name, 'image');
43+
def(options.name, 'image.${Helper.uniqueid()}');
4444

4545
super(_options);
4646

mint/Label.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Label extends Control {
4848

4949
options = _options;
5050

51-
def(options.name, 'label');
51+
def(options.name, 'label.${Helper.uniqueid()}');
5252

5353
super(options);
5454

mint/List.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class List extends Control {
2626
items = [];
2727
options = _options;
2828

29-
def(options.name, 'list');
29+
def(options.name, 'list.${Helper.uniqueid()}');
3030
def(options.mouse_input, true);
3131

3232
super(options);

mint/Panel.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Panel extends Control {
2828

2929
options = _options;
3030

31-
def(options.name, 'panel');
31+
def(options.name, 'panel.${Helper.uniqueid()}');
3232

3333
super(options);
3434

mint/Progress.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Progress extends Control {
3535

3636
options = _options;
3737

38-
def(options.name, 'progress');
38+
def(options.name, 'progress.${Helper.uniqueid()}');
3939

4040
super(options);
4141

mint/Scroll.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Scroll extends Control {
5555

5656
options = _options;
5757

58-
def(options.name, 'scroll');
58+
def(options.name, 'scroll.${Helper.uniqueid()}');
5959
def(options.mouse_input, true);
6060

6161
units_to_scroll_h = def(options.units_to_scroll_h, 16);

0 commit comments

Comments
 (0)