Fix focus/unfocus in MultiInputDialog (#4060)

Also fix size of window DCREREADER_CONFIG_FONT_SIZE
in Advanced settings
pull/4064/head
Robert 6 years ago committed by poire-z
parent 6835c18ee6
commit 6220d05a34

@ -173,6 +173,8 @@ function SetDefaults:init()
table.insert(fields, {
text = tostring(k) .. " = " .. tostring(v),
hint = "",
padding = Screen:scaleBySize(2),
margin = Screen:scaleBySize(2),
})
end
self.set_dialog = MultiInputDialog:new{

@ -47,6 +47,8 @@ function MultiInputDialog:init()
focused = k == 1 and true or false,
scroll = false,
parent = self,
padding = field.padding or nil,
margin = field.margin or nil,
}
if Device:hasKeys() then
--little hack to piggyback on the layout of the button_table to handle the new InputText
@ -134,6 +136,9 @@ function MultiInputDialog:onSwitchFocus(inputbox)
-- unfocus current inputbox
self._input_widget:unfocus()
self._input_widget:onCloseKeyboard()
UIManager:setDirty(nil, function()
return "ui", self.dialog_frame.dimen
end)
-- focus new inputbox
self._input_widget = inputbox

Loading…
Cancel
Save