mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 01:02:34 +00:00
Removed window as central storage, added Store class to be central memory store
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
class W3DHub
|
||||
class Window < CyberarmEngine::Window
|
||||
attr_reader :settings, :application_manager
|
||||
attr_accessor :account, :service_status, :applications
|
||||
|
||||
def setup
|
||||
self.caption = I18n.t(:app_name)
|
||||
|
||||
@settings = Settings.new
|
||||
@application_manager = ApplicationManager.new
|
||||
Store[:settings] = Settings.new
|
||||
Store[:application_manager] = ApplicationManager.new
|
||||
|
||||
@settings.save_settings
|
||||
Store.settings.save_settings
|
||||
|
||||
push_state(W3DHub::States::Boot)
|
||||
end
|
||||
@@ -17,14 +14,14 @@ class W3DHub
|
||||
def update
|
||||
super
|
||||
|
||||
@application_manager.start_next_available_task if @application_manager.idle?
|
||||
Store.application_manager.start_next_available_task if Store.application_manager.idle?
|
||||
current_state.update_application_manager_status if current_state.is_a?(States::Interface)
|
||||
end
|
||||
|
||||
def close
|
||||
@settings.save_settings
|
||||
Store.settings.save_settings
|
||||
|
||||
super if @application_manager.idle?
|
||||
super if Store.application_manager.idle?
|
||||
end
|
||||
|
||||
def main_thread_queue
|
||||
|
||||
Reference in New Issue
Block a user