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