extends GUINode var _active : bool = false const _screen : NationManagement.Screen = NationManagement.Screen.TECHNOLOGY func _ready() -> void: GameSingleton.gamestate_updated.connect(_update_info) Events.NationManagementScreens.update_active_nation_management_screen.connect(_on_update_active_nation_management_screen) add_gui_element("country_technology", "country_technology") var close_button : GUIIconButton = get_gui_icon_button_from_nodepath(^"./country_technology/close_button") if close_button: close_button.pressed.connect(Events.NationManagementScreens.close_nation_management_screen.bind(_screen)) _update_info() func _notification(what : int) -> void: match what: NOTIFICATION_TRANSLATION_CHANGED: _update_info() func _on_update_active_nation_management_screen(active_screen : NationManagement.Screen) -> void: _active = active_screen == _screen _update_info() func _update_info() -> void: if _active: # TODO - update UI state show() else: hide()