mirror of
https://github.com/TimeCrafters/timecrafters_configuration_tool_desktop.git
synced 2025-12-16 05:42:35 +00:00
Stubbed preset manager state, added confirm and variable dialogs, variables can now be created, everything is now mutatable
This commit is contained in:
@@ -12,5 +12,21 @@ module TAC
|
||||
def needs_cursor?
|
||||
true
|
||||
end
|
||||
|
||||
def close
|
||||
if @backend.config_changed?
|
||||
push_state(Dialog::ConfirmDialog, title: "Are you sure?", message: "Config has unsaved changes!", callback_method: proc { cleanup_and_close })
|
||||
else
|
||||
cleanup_and_close
|
||||
end
|
||||
end
|
||||
|
||||
def cleanup_and_close
|
||||
if @backend.tacnet.connected?
|
||||
@backend.tacnet.close
|
||||
end
|
||||
|
||||
close!
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user