Рефакторинг.
This commit is contained in:
@@ -30,8 +30,12 @@ extends PanelContainer
|
||||
get: return $button.is_toggle_mode()
|
||||
|
||||
|
||||
func set_text (val: String): $button.set_text(val)
|
||||
func set_pressed (val: bool): $button.set_pressed(val)
|
||||
func set_text(val: String): $button.set_text(val)
|
||||
func set_pressed(val: bool): $button.set_pressed(val)
|
||||
func button_connect(button_signal: String, proc: Callable): $button.connect(button_signal, proc)
|
||||
func get_text(): return $button.get_text()
|
||||
func is_pressed(): return $button.is_pressed()
|
||||
func is_toggle_mode(): return $button.is_toggle_mode()
|
||||
|
||||
|
||||
func set_toggle_mode (val: bool):
|
||||
@@ -39,15 +43,6 @@ func set_toggle_mode (val: bool):
|
||||
$button.set_toggle_mode(val)
|
||||
|
||||
|
||||
func get_text(): return $button.get_text()
|
||||
func is_pressed(): return $button.is_pressed()
|
||||
func is_toggle_mode(): return $button.is_toggle_mode()
|
||||
|
||||
|
||||
func _on_button_toggled(val: bool):
|
||||
if val: $state.set_texture(texture_state1)
|
||||
else: $state.set_texture(texture_state0)
|
||||
|
||||
|
||||
func button_connect(button_signal: String, proc: Callable):
|
||||
$button.connect(button_signal, proc)
|
||||
|
||||
Reference in New Issue
Block a user