mirror of
https://github.com/HarmonyHoney/tiny_crate.git
synced 2026-01-23 02:34:53 +00:00
Improve Key Readability & Contrast (=
This commit is contained in:
parent
27fecf9310
commit
b6f6311685
2 changed files with 11 additions and 10 deletions
|
|
@ -41,15 +41,16 @@ func set_text(arg := text):
|
|||
var l = text.length() * font_width
|
||||
|
||||
rect_min_size = Vector2(l + 3, 9)
|
||||
rect_size = rect_min_size
|
||||
var in_size = Vector2(l + 1, 7)
|
||||
|
||||
if is_instance_valid(label):
|
||||
label.text = text
|
||||
label.rect_size = Vector2.ONE
|
||||
|
||||
if is_instance_valid(white):
|
||||
white.rect_size = rect_min_size
|
||||
white.rect_size = in_size
|
||||
if is_instance_valid(black):
|
||||
black.rect_size = Vector2(l + 1, 7)
|
||||
black.rect_size = rect_min_size
|
||||
|
||||
update()
|
||||
|
||||
|
|
|
|||
|
|
@ -5,35 +5,35 @@
|
|||
|
||||
[sub_resource type="DynamicFont" id=1]
|
||||
size = 5
|
||||
outline_size = 1
|
||||
outline_color = Color( 0, 0, 0, 1 )
|
||||
extra_spacing_top = -1
|
||||
extra_spacing_bottom = -1
|
||||
font_data = ExtResource( 1 )
|
||||
|
||||
[node name="Key" type="Control"]
|
||||
margin_right = 8.0
|
||||
margin_bottom = 8.0
|
||||
margin_right = 21.0
|
||||
margin_bottom = 9.0
|
||||
rect_min_size = Vector2( 21, 9 )
|
||||
size_flags_vertical = 4
|
||||
script = ExtResource( 2 )
|
||||
action = "jump"
|
||||
|
||||
[node name="White" type="ColorRect" parent="."]
|
||||
[node name="Black" type="ColorRect" parent="."]
|
||||
modulate = Color( 0, 0, 0, 1 )
|
||||
margin_right = 21.0
|
||||
margin_bottom = 9.0
|
||||
|
||||
[node name="Black" type="ColorRect" parent="."]
|
||||
modulate = Color( 0, 0, 0, 1 )
|
||||
[node name="White" type="ColorRect" parent="."]
|
||||
margin_left = 1.0
|
||||
margin_top = 1.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = 8.0
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
modulate = Color( 0, 0, 0, 1 )
|
||||
margin_left = 2.0
|
||||
margin_top = 2.0
|
||||
margin_right = 20.0
|
||||
margin_right = 26.0
|
||||
margin_bottom = 7.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "key"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue