Add update_pressed_state() method to all buttons

This commit is contained in:
JeremyStar™ 2024-05-08 23:19:15 +02:00
parent 0828d019b6
commit 5046cc782d
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
2 changed files with 6 additions and 0 deletions

View file

@ -76,3 +76,6 @@ func update_element() -> void:
$Icon.patch_margin_bottom = pm_bottom
$Icon.axis_stretch_horizontal = as_horizontal
$Icon.axis_stretch_vertical = as_vertical
func update_pressed_state(is_pressed: bool) -> void:
$Button.button_pressed = is_pressed

View file

@ -52,3 +52,6 @@ func update_element() -> void:
$Text.add_theme_font_size_override("italics_font_size", font_size)
$Text.add_theme_font_size_override("bold_italics_font_size", font_size)
$Text.add_theme_font_size_override("mono_font_size", font_size)
func update_pressed_state(is_pressed: bool) -> void:
$Button.button_pressed = is_pressed