From c0b1bf0efb316741dbffdd47313ea0351bbc9fda Mon Sep 17 00:00:00 2001 From: notdraimdev Date: Mon, 30 Sep 2024 13:46:45 +0200 Subject: [PATCH] better update checker commit 2 --- CustomButtonColor.gd | 14 ++++++++++++++ Main.tscn | 8 +++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 CustomButtonColor.gd diff --git a/CustomButtonColor.gd b/CustomButtonColor.gd new file mode 100644 index 0000000..52db081 --- /dev/null +++ b/CustomButtonColor.gd @@ -0,0 +1,14 @@ +extends ColorRect +@onready var StandardColor = color + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + if get_parent().is_hovered(): + color = StandardColor.lightened(0.3) + else: + color = StandardColor diff --git a/Main.tscn b/Main.tscn index c71d96f..6ef02a1 100644 --- a/Main.tscn +++ b/Main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=61 format=3 uid="uid://b2sygl55s6fng"] +[gd_scene load_steps=62 format=3 uid="uid://b2sygl55s6fng"] [ext_resource type="Script" path="res://main.gd" id="1_ubs1p"] [ext_resource type="Texture2D" uid="uid://b8on1case224h" path="res://LoopPressed.png" id="2_iolk5"] @@ -31,6 +31,7 @@ [ext_resource type="Script" path="res://yt_tab_button.gd" id="16_2t15p"] [ext_resource type="Script" path="res://update_checker.gd" id="30_byc5i"] [ext_resource type="Script" path="res://patch_notes_button.gd" id="31_hjsj1"] +[ext_resource type="Script" path="res://CustomButtonColor.gd" id="32_pwgec"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_ku7tv"] shader = ExtResource("10_20857") @@ -842,6 +843,7 @@ dialog_autowrap = true cancel_button_text = "Download Song" [node name="UpdateChecker" type="Control" parent="."] +visible = false layout_mode = 1 anchors_preset = 3 anchor_left = 1.0 @@ -899,7 +901,9 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +mouse_filter = 2 color = Color(0.19706, 0.279877, 0.326012, 1) +script = ExtResource("32_pwgec") [node name="LinkButton" type="Button" parent="UpdateChecker/ColorRect"] z_index = 1 @@ -922,7 +926,9 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +mouse_filter = 2 color = Color(0.264012, 0.463229, 0.504783, 1) +script = ExtResource("32_pwgec") [node name="CloseBuen" type="Button" parent="UpdateChecker/ColorRect"] layout_mode = 1