Skip to content

Commit

Permalink
use HotkeyLabel to make actions clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
TymurGubayev committed Nov 5, 2023
1 parent 590dd4a commit 7603249
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions gui/job-details.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,26 @@ function JobDetails:init(args)
' ', status
}
},
widgets.Label{
frame = { l = 0, t = 4 },
text = {
{ key = 'CUSTOM_I', text = ': Input item, ',
enabled = self:callback('canChangeIType'),
on_activate = self:callback('onChangeIType') },
{ key = 'CUSTOM_M', text = ': Material, ',
enabled = self:callback('canChangeMat'),
on_activate = self:callback('onChangeMat') },
{ key = 'CUSTOM_T', text = ': Traits',
enabled = self:callback('canChangeTrait'),
on_activate = self:callback('onChangeTrait') }
}
widgets.HotkeyLabel{
frame = { l = 0, t = 4},
key = 'CUSTOM_I',
label = "Input item",
enabled = self:callback('canChangeIType'),
on_activate = self:callback('onChangeIType'),
},
widgets.HotkeyLabel{
frame = { l = string.len("i: Input item") + 1, t = 4},
key = 'CUSTOM_M',
label = "Material",
enabled = self:callback('canChangeMat'),
on_activate = self:callback('onChangeMat'),
},
widgets.HotkeyLabel{
frame = { l = string.len("i: Input item m: Material") + 1, t = 4},
key = 'CUSTOM_T',
label = "Traits",
enabled = self:callback('canChangeTrait'),
on_activate = self:callback('onChangeTrait'),
},
widgets.List{
view_id = 'list',
Expand Down

0 comments on commit 7603249

Please sign in to comment.