Files
uarep-ctl/scenes/tabs-switch/tab-switch.gd

18 lines
529 B
GDScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

extends TabContainer
const TAB_TOSIGNAL_NAME = {0: 'режим_работа', 1: 'режим_контроль', 2: 'режим_журнал', 3: 'режим_эмс', 4: 'режим_настройки'}
func _enter_tree() -> void:
network.logger_page = $Журнал
signaller.connect('ems2_hide_pressed', on_ems2_hide_pressed)
func on_ems2_hide_pressed(state):
set_tab_hidden(4, state)
func _on_tab_changed(tab) -> void:
if TAB_TOSIGNAL_NAME.has(tab):
signaller.emit_signal(TAB_TOSIGNAL_NAME[tab])