Added core.set_active_view(); removed focusable boolean from View

This commit is contained in:
rxi
2020-05-19 14:55:46 +01:00
parent 8ec717f240
commit bc4bf3d384
7 changed files with 27 additions and 21 deletions
+2 -3
View File
@@ -111,9 +111,8 @@ function CommandView:enter(text, submit, suggest, cancel)
submit = submit or noop,
suggest = suggest or noop,
cancel = cancel or noop,
view = core.active_view
}
core.active_view = self
core.set_active_view(self)
self:update_suggestions()
self.gutter_text_brightness = 100
self.label = text .. ": "
@@ -122,7 +121,7 @@ end
function CommandView:exit(submitted, inexplicit)
if core.active_view == self then
core.active_view = self.state.view
core.set_active_view(core.last_active_view)
end
local cancel = self.state.cancel
self.state = default_state