online multiplayer chess game (note server currently down)
Diffstat (limited to 'ui/barbutton/BarTextureButton.gd')
| -rw-r--r-- | ui/barbutton/BarTextureButton.gd | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/ui/barbutton/BarTextureButton.gd b/ui/barbutton/BarTextureButton.gd deleted file mode 100644 index 548ac0c..0000000 --- a/ui/barbutton/BarTextureButton.gd +++ /dev/null @@ -1,44 +0,0 @@ -extends TextureButton -class_name BarTextureButton - -var focused: bool setget _focused - -export(Color) var normal_color: Color -export(Color) var highlight_color: Color -export(Color) var pressed_color: Color -export(Color) var disabled_color: Color - -onready var background := $Background - -var n := 0 - - -func _ready() -> void: - _focused(false) - n = round(rand_range(10, 20)) - - -func set_disabled(new: bool) -> void: - disabled = new - self_modulate = Color.gray if disabled else Color.white - mouse_default_cursor_shape = CURSOR_FORBIDDEN if disabled else CURSOR_POINTING_HAND - - -func _process(_delta): - if visible: - _update() - - -func _update(): - if disabled: - background.color = disabled_color - elif pressed: - background.color = pressed_color - elif focused: - background.color = highlight_color - else: - background.color = normal_color - - -func _focused(q: bool): - focused = q |