TopBar: emoji icons + tighter button sizing (less horizontal space)
This commit is contained in:
parent
53cb92041c
commit
296894ff7a
2 changed files with 19 additions and 11 deletions
|
|
@ -44,6 +44,10 @@ var _log_btn: Button = null
|
|||
|
||||
|
||||
func _ready() -> void:
|
||||
var button_row: HBoxContainer = get_node_or_null("Anchor/ButtonRow")
|
||||
if button_row != null:
|
||||
button_row.add_theme_constant_override("separation", 4)
|
||||
|
||||
pause_btn.text = Strings.t(&"speed.pause")
|
||||
normal_btn.text = Strings.t(&"speed.normal")
|
||||
fast_btn.text = Strings.t(&"speed.fast")
|
||||
|
|
@ -152,8 +156,8 @@ func _add_build_btn() -> void:
|
|||
return
|
||||
var build_btn := Button.new()
|
||||
build_btn.name = "BuildBtn"
|
||||
build_btn.text = Strings.t(&"ui.build")
|
||||
build_btn.custom_minimum_size = Vector2(60, 48)
|
||||
build_btn.text = "🔨"
|
||||
build_btn.custom_minimum_size = Vector2(40, 40)
|
||||
build_btn.focus_mode = Control.FOCUS_NONE
|
||||
build_btn.pressed.connect(_on_build_pressed)
|
||||
button_row.add_child(build_btn)
|
||||
|
|
@ -176,8 +180,8 @@ func _add_settings_btn() -> void:
|
|||
return
|
||||
var settings_btn := Button.new()
|
||||
settings_btn.name = "SettingsBtn"
|
||||
settings_btn.text = Strings.t(&"ui.settings.btn")
|
||||
settings_btn.custom_minimum_size = Vector2(80, 48)
|
||||
settings_btn.text = "⚙"
|
||||
settings_btn.custom_minimum_size = Vector2(40, 40)
|
||||
settings_btn.focus_mode = Control.FOCUS_NONE
|
||||
settings_btn.pressed.connect(_on_settings_pressed)
|
||||
button_row.add_child(settings_btn)
|
||||
|
|
@ -201,16 +205,16 @@ func _add_work_log_btns() -> void:
|
|||
|
||||
var work_btn := Button.new()
|
||||
work_btn.name = "WorkBtn"
|
||||
work_btn.text = "Work"
|
||||
work_btn.custom_minimum_size = Vector2(60, 48)
|
||||
work_btn.text = "👷"
|
||||
work_btn.custom_minimum_size = Vector2(40, 40)
|
||||
work_btn.focus_mode = Control.FOCUS_NONE
|
||||
work_btn.pressed.connect(_on_work_pressed)
|
||||
button_row.add_child(work_btn)
|
||||
|
||||
_log_btn = Button.new()
|
||||
_log_btn.name = "LogBtn"
|
||||
_log_btn.text = "Log"
|
||||
_log_btn.custom_minimum_size = Vector2(60, 48)
|
||||
_log_btn.text = "🔔"
|
||||
_log_btn.custom_minimum_size = Vector2(40, 40)
|
||||
_log_btn.focus_mode = Control.FOCUS_NONE
|
||||
_log_btn.pressed.connect(_on_log_pressed)
|
||||
button_row.add_child(_log_btn)
|
||||
|
|
|
|||
|
|
@ -20,29 +20,33 @@ offset_bottom = 40.0
|
|||
|
||||
[node name="PauseBtn" type="Button" parent="Anchor/ButtonRow"]
|
||||
focus_mode = 0
|
||||
custom_minimum_size = Vector2(36, 40)
|
||||
text = "‖"
|
||||
|
||||
[node name="NormalBtn" type="Button" parent="Anchor/ButtonRow"]
|
||||
focus_mode = 0
|
||||
custom_minimum_size = Vector2(36, 40)
|
||||
text = "1×"
|
||||
|
||||
[node name="FastBtn" type="Button" parent="Anchor/ButtonRow"]
|
||||
focus_mode = 0
|
||||
custom_minimum_size = Vector2(36, 40)
|
||||
text = "5×"
|
||||
|
||||
[node name="UltraBtn" type="Button" parent="Anchor/ButtonRow"]
|
||||
focus_mode = 0
|
||||
custom_minimum_size = Vector2(36, 40)
|
||||
text = "12×"
|
||||
|
||||
[node name="SaveBtn" type="Button" parent="Anchor/ButtonRow"]
|
||||
focus_mode = 0
|
||||
custom_minimum_size = Vector2(48, 48)
|
||||
custom_minimum_size = Vector2(40, 40)
|
||||
text = "💾"
|
||||
|
||||
[node name="LoadBtn" type="Button" parent="Anchor/ButtonRow"]
|
||||
focus_mode = 0
|
||||
custom_minimum_size = Vector2(48, 48)
|
||||
text = "Load"
|
||||
custom_minimum_size = Vector2(40, 40)
|
||||
text = "📂"
|
||||
|
||||
[node name="ClockLabel" type="Label" parent="Anchor"]
|
||||
anchor_left = 0.5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue