@@ -120,8 +120,7 @@ func (p *widget) makeAnimationTab(state *widgetState) giu.Layout {
120
120
}
121
121
122
122
func (p * widget ) makeLayerTab (state * widgetState ) giu.Layout {
123
- addLayerButtonID := fmt .Sprintf ("Add a new layer...##%sAddLayer" , p .id )
124
- addLayerButton := giu .Button (addLayerButtonID ).Size (actionButtonW , actionButtonH )
123
+ addLayerButton := giu .Button ("Add a new layer..." ).Size (actionButtonW , actionButtonH )
125
124
addLayerButton .OnClick (func () {
126
125
p .createNewLayer ()
127
126
})
@@ -136,11 +135,10 @@ func (p *widget) makeLayerTab(state *widgetState) giu.Layout {
136
135
}
137
136
138
137
currentLayerName := layerStrings [state .viewerState .LayerIndex ]
139
- layerList := giu .Combo ("" , currentLayerName , layerStrings , & state .LayerIndex ). ID ( "##" + p . id + "layer" )
138
+ layerList := giu .Combo ("" , currentLayerName , layerStrings , & state .LayerIndex )
140
139
layerList .Size (layerListW ).OnChange (p .onUpdate )
141
140
142
- deleteLayerButtonID := fmt .Sprintf ("Delete current layer...##%sDeleteLayer" , p .id )
143
- deleteLayerButton := giu .Button (deleteLayerButtonID ).Size (actionButtonW , actionButtonH )
141
+ deleteLayerButton := giu .Button ("Delete current layer..." ).Size (actionButtonW , actionButtonH )
144
142
deleteLayerButton .OnClick (func () {
145
143
const (
146
144
strPrompt = "Do you really want to remove this layer?"
@@ -193,8 +191,7 @@ func (p *widget) makePriorityTab(state *widgetState) giu.Layout {
193
191
}
194
192
195
193
directionString := directionStrings [state .viewerState .DirectionIndex ]
196
- directionList := giu .Combo ("" , directionString , directionStrings , & state .DirectionIndex ).
197
- ID ("##" + p .id + "dir" )
194
+ directionList := giu .Combo ("" , directionString , directionStrings , & state .DirectionIndex )
198
195
directionList .Size (layerListW ).OnChange (p .onUpdate )
199
196
200
197
frameStrings := make ([]string , 0 )
@@ -203,23 +200,20 @@ func (p *widget) makePriorityTab(state *widgetState) giu.Layout {
203
200
}
204
201
205
202
frameString := frameStrings [state .FrameIndex ]
206
- frameList := giu .Combo ("" , frameString , frameStrings , & state .FrameIndex ).
207
- ID ("##" + p .id + "frame" )
203
+ frameList := giu .Combo ("" , frameString , frameStrings , & state .FrameIndex )
208
204
frameList .Size (layerListW ).OnChange (p .onUpdate )
209
205
210
206
const (
211
207
strPrompt = "Do you really want to remove this direction?"
212
208
strMessage = "If you'll click YES, all data from this direction will be lost. Continue?"
213
209
)
214
210
215
- duplicateButtonID := fmt .Sprintf ("Duplicate current direction...##%sDuplicateDirection" , p .id )
216
- duplicateButton := giu .Button (duplicateButtonID ).Size (actionButtonW , actionButtonH )
211
+ duplicateButton := giu .Button ("Duplicate current direction..." ).Size (actionButtonW , actionButtonH )
217
212
duplicateButton .OnClick (func () {
218
213
p .duplicateDirection ()
219
214
})
220
215
221
- deleteButtonID := fmt .Sprintf ("Delete current direction...##%sDeleteDirection" , p .id )
222
- deleteButton := giu .Button (deleteButtonID ).Size (actionButtonW , actionButtonH )
216
+ deleteButton := giu .Button ("Delete current direction..." ).Size (actionButtonW , actionButtonH )
223
217
deleteButton .OnClick (func () {
224
218
fnYes := func () {
225
219
p .deleteCurrentDirection ()
@@ -432,35 +426,29 @@ func (p *widget) makeAddLayerLayout() giu.Layout {
432
426
giu .Row (
433
427
giu .Label ("Type: " ),
434
428
giu .Combo ("" , compositeTypeList [state .newLayerFields .LayerType ],
435
- compositeTypeList , & state .newLayerFields .LayerType ).Size (bigListW ).ID (
436
- "##" + p .id + "AddLayerType" ,
437
- ),
429
+ compositeTypeList , & state .newLayerFields .LayerType ).Size (bigListW ),
438
430
),
439
431
giu .Row (
440
432
giu .Label ("Shadow: " ),
441
433
widgets .MakeCheckboxFromByte ("##" + p .id + "AddLayerShadow" , & state .newLayerFields .Shadow ),
442
434
),
443
435
giu .Row (
444
436
giu .Label ("Selectable: " ),
445
- giu .Checkbox ("" , & state .newLayerFields .Selectable ). ID ( "##" + p . id + "AddLayerSelectable" ) ,
437
+ giu .Checkbox ("" , & state .newLayerFields .Selectable ),
446
438
),
447
439
giu .Row (
448
440
giu .Label ("Transparent: " ),
449
- giu .Checkbox ("" , & state .newLayerFields .Transparent ). ID ( "##" + p . id + "AddLayerTransparent" ) ,
441
+ giu .Checkbox ("" , & state .newLayerFields .Transparent ),
450
442
),
451
443
giu .Row (
452
444
giu .Label ("Draw effect: " ),
453
445
giu .Combo ("" , drawEffectList [state .newLayerFields .DrawEffect ],
454
- drawEffectList , & state .newLayerFields .DrawEffect ).Size (bigListW ).ID (
455
- "##" + p .id + "AddLayerDrawEffect" ,
456
- ),
446
+ drawEffectList , & state .newLayerFields .DrawEffect ).Size (bigListW ),
457
447
),
458
448
giu .Row (
459
449
giu .Label ("Weapon class: " ),
460
450
giu .Combo ("" , weaponClassList [state .newLayerFields .WeaponClass ],
461
- weaponClassList , & state .newLayerFields .WeaponClass ).Size (bigListW ).ID (
462
- "##" + p .id + "AddLayerWeaponClass" ,
463
- ),
451
+ weaponClassList , & state .newLayerFields .WeaponClass ).Size (bigListW ),
464
452
),
465
453
giu .Separator (),
466
454
p .makeSaveCancelButtonRow (available , state ),
0 commit comments