Setting text color via config
parent
1c892e4aa9
commit
0b7720cad6
|
|
@ -16,5 +16,9 @@ func _ready() -> void:
|
||||||
self.label_node.text = self.label
|
self.label_node.text = self.label
|
||||||
else:
|
else:
|
||||||
self.label_node.text = ""
|
self.label_node.text = ""
|
||||||
|
|
||||||
|
var text_color: Color = Config.text_color.value
|
||||||
|
self.label_node.add_theme_color_override("default_color", text_color)
|
||||||
|
|
||||||
assert(self.input_code, "Missing input code for %s" % self.name)
|
assert(self.input_code, "Missing input code for %s" % self.name)
|
||||||
assert(InputMap.has_action(self.input_code), "Invalid input code for %s" % self.name)
|
assert(InputMap.has_action(self.input_code), "Invalid input code for %s" % self.name)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ offset_bottom = 96.0
|
||||||
pivot_offset = Vector2(48, 48)
|
pivot_offset = Vector2(48, 48)
|
||||||
color = Color(0.164706, 0.164706, 0.164706, 1)
|
color = Color(0.164706, 0.164706, 0.164706, 1)
|
||||||
script = ExtResource("2_t8ak6")
|
script = ExtResource("2_t8ak6")
|
||||||
input_code = null
|
|
||||||
|
|
||||||
[node name="Label" type="RichTextLabel" parent="."]
|
[node name="Label" type="RichTextLabel" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,10 @@ func _ready() -> void:
|
||||||
(self.get_theme_stylebox("background") as StyleBoxFlat).border_color = bg_color
|
(self.get_theme_stylebox("background") as StyleBoxFlat).border_color = bg_color
|
||||||
(self.get_theme_stylebox("fill") as StyleBoxFlat).bg_color = fill_color
|
(self.get_theme_stylebox("fill") as StyleBoxFlat).bg_color = fill_color
|
||||||
|
|
||||||
|
var text_color: Color = Config.text_color.value
|
||||||
|
self.label_node.add_theme_color_override("default_color", text_color)
|
||||||
|
self.progress_label.add_theme_color_override("default_color", text_color)
|
||||||
|
|
||||||
func _process(_delta: float) -> void:
|
func _process(_delta: float) -> void:
|
||||||
if !Engine.is_editor_hint() && Config.buttons_labels.value:
|
if !Engine.is_editor_hint() && Config.buttons_labels.value:
|
||||||
self.progress_label.text = "%s%%" % str(self.value * 100.0)
|
self.progress_label.text = "%s%%" % str(self.value * 100.0)
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,11 @@ config_version=5
|
||||||
|
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="gamo-gd"
|
config/name="gamo"
|
||||||
|
config/description="local gamepad tester"
|
||||||
|
config/version="1.0.0"
|
||||||
run/main_scene="uid://c7bwo3h0leip4"
|
run/main_scene="uid://c7bwo3h0leip4"
|
||||||
|
config/use_custom_user_dir=true
|
||||||
config/features=PackedStringArray("4.5", "GL Compatibility")
|
config/features=PackedStringArray("4.5", "GL Compatibility")
|
||||||
run/max_fps=24
|
run/max_fps=24
|
||||||
run/low_processor_mode=true
|
run/low_processor_mode=true
|
||||||
|
|
@ -39,6 +42,8 @@ window/size/viewport_width=1280
|
||||||
window/size/viewport_height=720
|
window/size/viewport_height=720
|
||||||
window/size/borderless=true
|
window/size/borderless=true
|
||||||
window/size/transparent=true
|
window/size/transparent=true
|
||||||
|
window/size/window_width_override=640
|
||||||
|
window/size/window_height_override=360
|
||||||
window/stretch/mode="canvas_items"
|
window/stretch/mode="canvas_items"
|
||||||
window/stretch/aspect="expand"
|
window/stretch/aspect="expand"
|
||||||
window/per_pixel_transparency/allowed=true
|
window/per_pixel_transparency/allowed=true
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue