open gui/launcher with the command on right arrow

develop
myk002 2022-11-06 16:47:45 -08:00
parent ae2d9008ef
commit fb7b55fb11
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
1 changed files with 5 additions and 0 deletions

@ -126,11 +126,13 @@ function MenuScreen:onSelect(_, choice)
end
function MenuScreen:onSubmit(_, choice)
if not choice then return end
self:dismiss()
dfhack.run_command(choice.command)
end
function MenuScreen:onSubmit2(_, choice)
if not choice then return end
self:dismiss()
dfhack.run_script('gui/launcher', choice.command)
end
@ -139,6 +141,9 @@ function MenuScreen:onInput(keys)
if keys.LEAVESCREEN then
self:dismiss()
return true
elseif keys.STANDARDSCROLL_RIGHT then
self:onSubmit2(self.subviews.list:getSelected())
return true
end
return self:inputToSubviews(keys)
end