Restore ocean palette to technical menus
This commit is contained in:
parent
59bdb07fc5
commit
99775ddbfb
11 changed files with 200 additions and 123 deletions
|
|
@ -97,19 +97,17 @@ func _update_visual_pivot() -> void:
|
|||
|
||||
func _refresh_style() -> void:
|
||||
var style := StyleBoxFlat.new()
|
||||
style.bg_color = Color(0.95, 0.9, 0.75, 0.12) if _selected else Color.TRANSPARENT
|
||||
style.border_color = Color.TRANSPARENT
|
||||
var width: int = 0
|
||||
style.bg_color = (
|
||||
UtilityPageStyle.OCEAN_SELECTED
|
||||
if _selected else Color(UtilityPageStyle.OCEAN_FIELD, 0.48)
|
||||
)
|
||||
if _selected:
|
||||
style.border_color = Color(0.28, 0.19, 0.1, 1.0)
|
||||
width = 4
|
||||
style.bg_color = UtilityPageStyle.OCEAN_SELECTED
|
||||
if has_focus():
|
||||
style.border_color = Color(0.035, 0.145, 0.22, 1.0)
|
||||
width = 4
|
||||
style.bg_color = UtilityPageStyle.OCEAN_BUTTON_HOVER
|
||||
elif _hovered:
|
||||
style.border_color = Color(0.48, 0.35, 0.2, 0.9)
|
||||
width = 2
|
||||
style.set_border_width_all(width)
|
||||
style.bg_color = Color(UtilityPageStyle.OCEAN_PANEL_MID, 0.88)
|
||||
style.set_border_width_all(0)
|
||||
style.set_corner_radius_all(64)
|
||||
for state: StringName in [
|
||||
&"normal",
|
||||
|
|
@ -122,9 +120,8 @@ func _refresh_style() -> void:
|
|||
|
||||
func _apply_quantity_style() -> void:
|
||||
var style := StyleBoxFlat.new()
|
||||
style.bg_color = Color(0.94, 0.86, 0.64, 1.0)
|
||||
style.border_color = Color(0.31, 0.22, 0.12, 1.0)
|
||||
style.set_border_width_all(2)
|
||||
style.bg_color = UtilityPageStyle.OCEAN_SELECTED
|
||||
style.set_border_width_all(0)
|
||||
style.set_corner_radius_all(18)
|
||||
style.content_margin_left = 5.0
|
||||
style.content_margin_right = 5.0
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ mouse_filter = 2
|
|||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
mouse_filter = 2
|
||||
theme_override_colors/font_color = Color(0.17, 0.105, 0.05, 1)
|
||||
theme_override_colors/font_color = Color(0.902, 0.969, 0.969, 1)
|
||||
theme_override_font_sizes/font_size = 15
|
||||
text = "×2"
|
||||
horizontal_alignment = 1
|
||||
|
|
@ -75,9 +75,7 @@ offset_right = -2.0
|
|||
offset_bottom = 24.0
|
||||
grow_horizontal = 0
|
||||
mouse_filter = 2
|
||||
theme_override_colors/font_color = Color(0.31, 0.22, 0.12, 1)
|
||||
theme_override_colors/font_outline_color = Color(0.96, 0.93, 0.82, 1)
|
||||
theme_override_constants/outline_size = 2
|
||||
theme_override_colors/font_color = Color(0.624, 0.812, 0.824, 1)
|
||||
theme_override_font_sizes/font_size = 17
|
||||
text = "×"
|
||||
horizontal_alignment = 1
|
||||
|
|
|
|||
|
|
@ -135,7 +135,9 @@ func _build_ui() -> void:
|
|||
_status.position = Vector2(18, 448)
|
||||
_status.size = Vector2(900, 28)
|
||||
_status.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
_status.add_theme_color_override("font_color", Color("4a3f31"))
|
||||
_status.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_SECONDARY
|
||||
)
|
||||
root.add_child(_status)
|
||||
_style_controls(root)
|
||||
_show_inbox()
|
||||
|
|
@ -449,7 +451,7 @@ func _refresh_inbox() -> void:
|
|||
button.custom_minimum_size = Vector2(930, 54)
|
||||
button.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
button.pressed.connect(_open_letter.bind(str(letter["mail_id"])))
|
||||
UtilityPageStyle.apply_button(button)
|
||||
UtilityPageStyle.apply_ocean_button(button)
|
||||
_inbox_list.add_child(button)
|
||||
|
||||
|
||||
|
|
@ -744,19 +746,12 @@ func _focus_first() -> void:
|
|||
func _style_controls(root: Node) -> void:
|
||||
for node: Node in root.find_children("*", "", true, false):
|
||||
if node is BaseButton:
|
||||
UtilityPageStyle.apply_button(node)
|
||||
UtilityPageStyle.apply_ocean_button(node)
|
||||
elif node is LineEdit:
|
||||
UtilityPageStyle.apply_line_edit(node)
|
||||
UtilityPageStyle.apply_ocean_line_edit(node)
|
||||
elif node is Label:
|
||||
node.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.INK
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_PRIMARY
|
||||
)
|
||||
elif node is TextEdit:
|
||||
node.add_theme_font_override("font", UtilityPageStyle.TuffyFont)
|
||||
node.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.LIGHT_TEXT
|
||||
)
|
||||
node.add_theme_color_override(
|
||||
"font_placeholder_color",
|
||||
Color(0.82, 0.80, 0.71, 0.84)
|
||||
)
|
||||
UtilityPageStyle.apply_text_edit(node)
|
||||
|
|
|
|||
|
|
@ -66,9 +66,9 @@ func _ready() -> void:
|
|||
_save_button, _edit_button, _favorite_button, _delete_button,
|
||||
_cancel_button, _back_button, _open_close_button,
|
||||
]:
|
||||
UtilityPageStyle.apply_button(button)
|
||||
UtilityPageStyle.apply_line_edit(_address)
|
||||
UtilityPageStyle.apply_line_edit(_name_edit)
|
||||
UtilityPageStyle.apply_ocean_button(button)
|
||||
UtilityPageStyle.apply_ocean_line_edit(_address)
|
||||
UtilityPageStyle.apply_ocean_line_edit(_name_edit)
|
||||
_direct_button.pressed.connect(_set_mode.bind(Mode.DIRECT))
|
||||
_saved_button.pressed.connect(_set_mode.bind(Mode.SAVED))
|
||||
_recent_button.pressed.connect(_set_mode.bind(Mode.RECENT))
|
||||
|
|
@ -546,9 +546,9 @@ func _set_status(message: String, is_error: bool = false) -> void:
|
|||
_status.text = message
|
||||
_status.add_theme_color_override(
|
||||
"font_color",
|
||||
Color(0.45, 0.09, 0.08, 1.0)
|
||||
UtilityPageStyle.OCEAN_DANGER
|
||||
if is_error
|
||||
else Color(0.035, 0.145, 0.22, 1.0),
|
||||
else UtilityPageStyle.OCEAN_TEXT_PRIMARY,
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,29 +5,21 @@
|
|||
[ext_resource type="PackedScene" path="res://ui/components/bubble_menu/bubble_confirmation_page.tscn" id="4_confirmation"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBox_paper"]
|
||||
bg_color = Color(0.93, 0.885, 0.73, 1)
|
||||
shadow_color = Color(0.02, 0.075, 0.11, 0.42)
|
||||
shadow_size = 10
|
||||
shadow_offset = Vector2(7, 8)
|
||||
bg_color = Color(0.051, 0.173, 0.227, 1)
|
||||
corner_radius_top_left = 54
|
||||
corner_radius_top_right = 46
|
||||
corner_radius_bottom_right = 58
|
||||
corner_radius_bottom_left = 48
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBox_list"]
|
||||
bg_color = Color(0.89, 0.835, 0.67, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.035, 0.145, 0.22, 0.36)
|
||||
bg_color = Color(0.071, 0.247, 0.306, 1)
|
||||
corner_radius_top_left = 12
|
||||
corner_radius_top_right = 9
|
||||
corner_radius_bottom_right = 13
|
||||
corner_radius_bottom_left = 10
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBox_selected"]
|
||||
bg_color = Color(0.08, 0.24, 0.31, 0.92)
|
||||
bg_color = Color(0.137, 0.525, 0.592, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 7
|
||||
corner_radius_bottom_right = 9
|
||||
|
|
@ -40,7 +32,7 @@ content_margin_left = 12.0
|
|||
content_margin_top = 7.0
|
||||
content_margin_right = 12.0
|
||||
content_margin_bottom = 7.0
|
||||
bg_color = Color(0.035, 0.145, 0.22, 1)
|
||||
bg_color = Color(0.031, 0.122, 0.169, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 7
|
||||
corner_radius_bottom_right = 9
|
||||
|
|
@ -51,12 +43,7 @@ content_margin_left = 12.0
|
|||
content_margin_top = 7.0
|
||||
content_margin_right = 12.0
|
||||
content_margin_bottom = 7.0
|
||||
bg_color = Color(0.035, 0.145, 0.22, 1)
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.93, 0.885, 0.73, 0.9)
|
||||
bg_color = Color(0.137, 0.525, 0.592, 1)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 7
|
||||
corner_radius_bottom_right = 9
|
||||
|
|
@ -67,7 +54,7 @@ content_margin_left = 12.0
|
|||
content_margin_top = 7.0
|
||||
content_margin_right = 12.0
|
||||
content_margin_bottom = 7.0
|
||||
bg_color = Color(0.035, 0.145, 0.22, 0.82)
|
||||
bg_color = Color(0.031, 0.122, 0.169, 0.82)
|
||||
corner_radius_top_left = 8
|
||||
corner_radius_top_right = 7
|
||||
corner_radius_bottom_right = 9
|
||||
|
|
@ -78,7 +65,7 @@ content_margin_left = 10.0
|
|||
content_margin_top = 4.0
|
||||
content_margin_right = 10.0
|
||||
content_margin_bottom = 4.0
|
||||
bg_color = Color(0.89, 0.835, 0.67, 0.72)
|
||||
bg_color = Color(0.071, 0.247, 0.306, 0.9)
|
||||
corner_radius_top_left = 7
|
||||
corner_radius_top_right = 6
|
||||
corner_radius_bottom_right = 8
|
||||
|
|
@ -117,7 +104,7 @@ alignment = 1
|
|||
|
||||
[node name="Title" type="Label" parent="Paper/Margin/Layout"]
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.035, 0.145, 0.22, 1)
|
||||
theme_override_colors/font_color = Color(0.902, 0.969, 0.969, 1)
|
||||
theme_override_font_sizes/font_size = 30
|
||||
text = "join game"
|
||||
horizontal_alignment = 1
|
||||
|
|
@ -148,7 +135,7 @@ text = "recent"
|
|||
[node name="AddressLabel" type="Label" parent="Paper/Margin/Layout"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.035, 0.145, 0.22, 1)
|
||||
theme_override_colors/font_color = Color(0.902, 0.969, 0.969, 1)
|
||||
theme_override_font_sizes/font_size = 17
|
||||
text = "server address"
|
||||
horizontal_alignment = 1
|
||||
|
|
@ -158,10 +145,10 @@ unique_name_in_owner = true
|
|||
custom_minimum_size = Vector2(0, 42)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.96, 0.93, 0.82, 1)
|
||||
theme_override_colors/font_uneditable_color = Color(0.8, 0.77, 0.68, 0.9)
|
||||
theme_override_colors/font_uneditable_color = Color(0.624, 0.812, 0.824, 1)
|
||||
theme_override_colors/font_selected_color = Color(1, 0.98, 0.9, 1)
|
||||
theme_override_colors/font_placeholder_color = Color(0.78, 0.75, 0.66, 0.86)
|
||||
theme_override_colors/caret_color = Color(1, 0.96, 0.8, 1)
|
||||
theme_override_colors/font_placeholder_color = Color(0.624, 0.812, 0.824, 0.78)
|
||||
theme_override_colors/caret_color = Color(0.902, 0.969, 0.969, 1)
|
||||
theme_override_colors/selection_color = Color(0.2, 0.48, 0.59, 0.9)
|
||||
theme_override_font_sizes/font_size = 19
|
||||
theme_override_styles/normal = SubResource("StyleBox_input")
|
||||
|
|
@ -174,7 +161,7 @@ max_length = 300
|
|||
[node name="AddressHelper" type="Label" parent="Paper/Margin/Layout"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.035, 0.145, 0.22, 0.78)
|
||||
theme_override_colors/font_color = Color(0.624, 0.812, 0.824, 1)
|
||||
theme_override_font_sizes/font_size = 13
|
||||
text = "Hostname, IPv4, or [IPv6]. Port 7777 is used when omitted.\nJoin Now connects once; Save Server stores this address locally."
|
||||
horizontal_alignment = 1
|
||||
|
|
@ -184,7 +171,7 @@ autowrap_mode = 2
|
|||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.035, 0.145, 0.22, 1)
|
||||
theme_override_colors/font_color = Color(0.902, 0.969, 0.969, 1)
|
||||
theme_override_font_sizes/font_size = 17
|
||||
text = "server name"
|
||||
horizontal_alignment = 1
|
||||
|
|
@ -195,10 +182,10 @@ visible = false
|
|||
custom_minimum_size = Vector2(0, 42)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.96, 0.93, 0.82, 1)
|
||||
theme_override_colors/font_uneditable_color = Color(0.8, 0.77, 0.68, 0.9)
|
||||
theme_override_colors/font_uneditable_color = Color(0.624, 0.812, 0.824, 1)
|
||||
theme_override_colors/font_selected_color = Color(1, 0.98, 0.9, 1)
|
||||
theme_override_colors/font_placeholder_color = Color(0.78, 0.75, 0.66, 0.86)
|
||||
theme_override_colors/caret_color = Color(1, 0.96, 0.8, 1)
|
||||
theme_override_colors/font_placeholder_color = Color(0.624, 0.812, 0.824, 0.78)
|
||||
theme_override_colors/caret_color = Color(0.902, 0.969, 0.969, 1)
|
||||
theme_override_colors/selection_color = Color(0.2, 0.48, 0.59, 0.9)
|
||||
theme_override_font_sizes/font_size = 19
|
||||
theme_override_styles/normal = SubResource("StyleBox_input")
|
||||
|
|
@ -212,7 +199,7 @@ max_length = 80
|
|||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.035, 0.145, 0.22, 0.78)
|
||||
theme_override_colors/font_color = Color(0.624, 0.812, 0.824, 1)
|
||||
theme_override_font_sizes/font_size = 13
|
||||
text = "Only visible on this device."
|
||||
horizontal_alignment = 1
|
||||
|
|
@ -222,9 +209,9 @@ unique_name_in_owner = true
|
|||
visible = false
|
||||
custom_minimum_size = Vector2(0, 145)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.035, 0.145, 0.22, 1)
|
||||
theme_override_colors/font_selected_color = Color(0.93, 0.885, 0.73, 1)
|
||||
theme_override_colors/guide_color = Color(0.035, 0.145, 0.22, 0.25)
|
||||
theme_override_colors/font_color = Color(0.902, 0.969, 0.969, 1)
|
||||
theme_override_colors/font_selected_color = Color(0.902, 0.969, 0.969, 1)
|
||||
theme_override_colors/guide_color = Color(0.624, 0.812, 0.824, 0.22)
|
||||
theme_override_font_sizes/font_size = 17
|
||||
theme_override_styles/panel = SubResource("StyleBox_list")
|
||||
theme_override_styles/focus = SubResource("StyleBox_focus")
|
||||
|
|
@ -238,7 +225,7 @@ unique_name_in_owner = true
|
|||
visible = false
|
||||
custom_minimum_size = Vector2(0, 92)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.035, 0.145, 0.22, 1)
|
||||
theme_override_colors/font_color = Color(0.902, 0.969, 0.969, 1)
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "Select a server."
|
||||
horizontal_alignment = 1
|
||||
|
|
@ -249,7 +236,7 @@ autowrap_mode = 2
|
|||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 38)
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.035, 0.145, 0.22, 1)
|
||||
theme_override_colors/font_color = Color(0.902, 0.969, 0.969, 1)
|
||||
theme_override_font_sizes/font_size = 15
|
||||
theme_override_styles/normal = SubResource("StyleBox_status")
|
||||
text = "Direct UDP connection • default port 7777"
|
||||
|
|
@ -261,7 +248,7 @@ autowrap_mode = 2
|
|||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.035, 0.145, 0.22, 1)
|
||||
theme_override_colors/font_color = Color(0.624, 0.812, 0.824, 1)
|
||||
theme_override_font_sizes/font_size = 15
|
||||
text = "1 / 8 players"
|
||||
horizontal_alignment = 1
|
||||
|
|
|
|||
|
|
@ -1026,7 +1026,7 @@ func _apply_inventory_styles() -> void:
|
|||
_bait_filter,
|
||||
_lures_filter,
|
||||
]:
|
||||
UtilityPageStyle.apply_button(button)
|
||||
UtilityPageStyle.apply_ocean_button(button)
|
||||
for panel: PanelContainer in [_tackle_main_panel]:
|
||||
var panel_style := UtilityPageStyle.panel_style()
|
||||
panel_style.set_corner_radius_all(INVENTORY_MAIN_CORNER_RADIUS)
|
||||
|
|
@ -1038,7 +1038,7 @@ func _apply_inventory_styles() -> void:
|
|||
label.add_theme_font_override("font", UtilityPageStyle.TuffyFont)
|
||||
label.add_theme_color_override(
|
||||
"font_color",
|
||||
UtilityPageStyle.INK,
|
||||
UtilityPageStyle.OCEAN_TEXT_PRIMARY,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -1090,7 +1090,7 @@ func _refresh_tackle_box() -> void:
|
|||
row.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
row.toggle_mode = true
|
||||
row.button_pressed = owned.item_id == _selected_tackle_item_id
|
||||
UtilityPageStyle.apply_button(row)
|
||||
UtilityPageStyle.apply_ocean_button(row)
|
||||
row.pressed.connect(_select_tackle_item.bind(owned.item_id))
|
||||
_tackle_item_list.add_child(row)
|
||||
_tackle_empty.text = (
|
||||
|
|
@ -1268,15 +1268,13 @@ func _apply_navigation_selection_presentation() -> void:
|
|||
|
||||
func _apply_bag_styles() -> void:
|
||||
var outer := StyleBoxFlat.new()
|
||||
outer.bg_color = Color(0.39, 0.31, 0.2, 1.0)
|
||||
outer.border_color = Color(0.67, 0.54, 0.33, 1.0)
|
||||
outer.set_border_width_all(7)
|
||||
outer.bg_color = UtilityPageStyle.OCEAN_PANEL_DEEP
|
||||
outer.set_border_width_all(0)
|
||||
outer.set_corner_radius_all(INVENTORY_MAIN_CORNER_RADIUS)
|
||||
_bag_outer_wall.add_theme_stylebox_override("panel", outer)
|
||||
var inner := StyleBoxFlat.new()
|
||||
inner.bg_color = Color(0.92, 0.85, 0.68, 1.0)
|
||||
inner.border_color = Color(0.75, 0.62, 0.38, 1.0)
|
||||
inner.set_border_width_all(4)
|
||||
inner.bg_color = UtilityPageStyle.OCEAN_PANEL_MID
|
||||
inner.set_border_width_all(0)
|
||||
inner.set_corner_radius_all(INVENTORY_INNER_CORNER_RADIUS)
|
||||
_bag_inner_liner.add_theme_stylebox_override("panel", inner)
|
||||
func _apply_logbook_styles() -> void:
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ anchor_bottom = 1.0
|
|||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
theme_override_colors/font_color = Color(0.22, 0.15, 0.08, 0.8)
|
||||
theme_override_colors/font_color = Color(0.624, 0.812, 0.824, 1)
|
||||
theme_override_font_sizes/font_size = 24
|
||||
text = "your bag is empty"
|
||||
horizontal_alignment = 1
|
||||
|
|
|
|||
|
|
@ -46,7 +46,9 @@ func _build() -> void:
|
|||
paper.add_child(root)
|
||||
_header = Label.new()
|
||||
_header.add_theme_font_size_override("font_size", 27)
|
||||
_header.add_theme_color_override("font_color", Color("28251f"))
|
||||
_header.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_PRIMARY
|
||||
)
|
||||
root.add_child(_header)
|
||||
_tabs = HBoxContainer.new()
|
||||
_tabs.add_theme_constant_override("separation", 10)
|
||||
|
|
@ -56,7 +58,7 @@ func _build() -> void:
|
|||
button.text = ["players", "relationships", "banned"][index]
|
||||
button.toggle_mode = true
|
||||
button.pressed.connect(_select_tab.bind(index))
|
||||
UtilityPageStyle.apply_button(button)
|
||||
UtilityPageStyle.apply_ocean_button(button)
|
||||
_tabs.add_child(button)
|
||||
var scroll := ScrollContainer.new()
|
||||
scroll.custom_minimum_size = Vector2(0, 392)
|
||||
|
|
@ -67,7 +69,9 @@ func _build() -> void:
|
|||
_list.add_theme_constant_override("separation", 7)
|
||||
scroll.add_child(_list)
|
||||
_status = Label.new()
|
||||
_status.add_theme_color_override("font_color", Color("514535"))
|
||||
_status.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_SECONDARY
|
||||
)
|
||||
root.add_child(_status)
|
||||
|
||||
|
||||
|
|
@ -124,7 +128,7 @@ func _build_active_rows() -> void:
|
|||
entry.full_fingerprint
|
||||
)
|
||||
identity.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.INK
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_PRIMARY
|
||||
)
|
||||
row.add_child(identity)
|
||||
var ping := Label.new()
|
||||
|
|
@ -134,31 +138,33 @@ func _build_active_rows() -> void:
|
|||
else "%d ms" % entry.ping_to_host_ms
|
||||
if entry.ping_to_host_ms >= 0 else "—"
|
||||
)
|
||||
ping.add_theme_color_override("font_color", UtilityPageStyle.INK)
|
||||
ping.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_SECONDARY
|
||||
)
|
||||
row.add_child(ping)
|
||||
var mute := Button.new()
|
||||
mute.text = "unmute" if entry.muted else "mute"
|
||||
mute.disabled = entry.is_local_player
|
||||
mute.pressed.connect(_toggle_mute.bind(entry))
|
||||
UtilityPageStyle.apply_button(mute)
|
||||
UtilityPageStyle.apply_ocean_button(mute)
|
||||
row.add_child(mute)
|
||||
var block := Button.new()
|
||||
block.text = "block"
|
||||
block.disabled = entry.is_local_player
|
||||
block.pressed.connect(_confirm_block.bind(entry))
|
||||
UtilityPageStyle.apply_button(block)
|
||||
UtilityPageStyle.apply_ocean_button(block)
|
||||
row.add_child(block)
|
||||
var kick := Button.new()
|
||||
kick.text = "kick"
|
||||
kick.disabled = not entry.can_kick
|
||||
kick.pressed.connect(_confirm_kick.bind(entry))
|
||||
UtilityPageStyle.apply_button(kick)
|
||||
UtilityPageStyle.apply_ocean_button(kick)
|
||||
row.add_child(kick)
|
||||
var ban := Button.new()
|
||||
ban.text = "ban"
|
||||
ban.disabled = not entry.can_ban
|
||||
ban.pressed.connect(_confirm_ban.bind(entry))
|
||||
UtilityPageStyle.apply_button(ban)
|
||||
UtilityPageStyle.apply_ocean_button(ban)
|
||||
row.add_child(ban)
|
||||
_list.add_child(row)
|
||||
|
||||
|
|
@ -179,7 +185,9 @@ func _build_relationship_rows() -> void:
|
|||
"Blocked" if bool(record.get("blocked", false)) else "Muted",
|
||||
]
|
||||
label.tooltip_text = NetworkIdentityCrypto.format_fingerprint(fingerprint)
|
||||
label.add_theme_color_override("font_color", UtilityPageStyle.INK)
|
||||
label.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_PRIMARY
|
||||
)
|
||||
row.add_child(label)
|
||||
if bool(record.get("blocked", false)):
|
||||
var unblock := Button.new()
|
||||
|
|
@ -187,7 +195,7 @@ func _build_relationship_rows() -> void:
|
|||
unblock.pressed.connect(func() -> void:
|
||||
_service.set_blocked(fingerprint, str(record["last_known_display_name"]), false)
|
||||
)
|
||||
UtilityPageStyle.apply_button(unblock)
|
||||
UtilityPageStyle.apply_ocean_button(unblock)
|
||||
row.add_child(unblock)
|
||||
var unmute := Button.new()
|
||||
unmute.text = "unmute"
|
||||
|
|
@ -195,7 +203,7 @@ func _build_relationship_rows() -> void:
|
|||
unmute.pressed.connect(func() -> void:
|
||||
_service.set_muted(fingerprint, str(record["last_known_display_name"]), false)
|
||||
)
|
||||
UtilityPageStyle.apply_button(unmute)
|
||||
UtilityPageStyle.apply_ocean_button(unmute)
|
||||
row.add_child(unmute)
|
||||
_list.add_child(row)
|
||||
|
||||
|
|
@ -216,12 +224,14 @@ func _build_ban_rows() -> void:
|
|||
Time.get_date_string_from_unix_time(int(record.get("banned_unix", 0))),
|
||||
]
|
||||
label.tooltip_text = NetworkIdentityCrypto.format_fingerprint(fingerprint)
|
||||
label.add_theme_color_override("font_color", UtilityPageStyle.INK)
|
||||
label.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_PRIMARY
|
||||
)
|
||||
row.add_child(label)
|
||||
var unban := Button.new()
|
||||
unban.text = "unban"
|
||||
unban.pressed.connect(_confirm_unban.bind(fingerprint))
|
||||
UtilityPageStyle.apply_button(unban)
|
||||
UtilityPageStyle.apply_ocean_button(unban)
|
||||
row.add_child(unban)
|
||||
_list.add_child(row)
|
||||
|
||||
|
|
@ -239,7 +249,9 @@ func _add_empty(text: String) -> void:
|
|||
label.text = text
|
||||
label.custom_minimum_size.y = 100
|
||||
label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||
label.add_theme_color_override("font_color", UtilityPageStyle.MUTED_INK)
|
||||
label.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_SECONDARY
|
||||
)
|
||||
_list.add_child(label)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,9 @@ func _build_ui() -> void:
|
|||
var heading := Label.new()
|
||||
heading.text = "Player Profile"
|
||||
heading.add_theme_font_size_override("font_size", 25)
|
||||
heading.add_theme_color_override("font_color", Color("302b27"))
|
||||
heading.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_PRIMARY
|
||||
)
|
||||
layout.add_child(heading)
|
||||
|
||||
var name_row := HBoxContainer.new()
|
||||
|
|
@ -142,40 +144,46 @@ func _build_ui() -> void:
|
|||
name_row.add_child(name_stack)
|
||||
var name_label := Label.new()
|
||||
name_label.text = "player name"
|
||||
name_label.add_theme_color_override("font_color", Color("302b27"))
|
||||
name_label.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_PRIMARY
|
||||
)
|
||||
name_stack.add_child(name_label)
|
||||
_name_edit = LineEdit.new()
|
||||
_name_edit.max_length = NetworkProtocol.MAX_DISPLAY_NAME_LENGTH
|
||||
_name_edit.placeholder_text = "Player"
|
||||
_name_edit.custom_minimum_size = Vector2(300, 40)
|
||||
UtilityPageStyle.apply_line_edit(_name_edit)
|
||||
UtilityPageStyle.apply_ocean_line_edit(_name_edit)
|
||||
_name_edit.text_changed.connect(_on_name_changed)
|
||||
name_stack.add_child(_name_edit)
|
||||
var helper := Label.new()
|
||||
helper.text = "Shown to other players in multiplayer."
|
||||
helper.add_theme_color_override("font_color", Color("665e52"))
|
||||
helper.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_SECONDARY
|
||||
)
|
||||
name_stack.add_child(helper)
|
||||
_apply_button = Button.new()
|
||||
_apply_button.text = "apply"
|
||||
_apply_button.custom_minimum_size = Vector2(92, 40)
|
||||
UtilityPageStyle.apply_button(_apply_button)
|
||||
UtilityPageStyle.apply_ocean_button(_apply_button)
|
||||
_apply_button.pressed.connect(_apply)
|
||||
name_row.add_child(_apply_button)
|
||||
_revert_button = Button.new()
|
||||
_revert_button.text = "revert"
|
||||
_revert_button.custom_minimum_size = Vector2(88, 40)
|
||||
UtilityPageStyle.apply_button(_revert_button)
|
||||
UtilityPageStyle.apply_ocean_button(_revert_button)
|
||||
_revert_button.pressed.connect(_revert)
|
||||
name_row.add_child(_revert_button)
|
||||
var defaults_button := Button.new()
|
||||
defaults_button.text = "defaults"
|
||||
defaults_button.custom_minimum_size = Vector2(88, 40)
|
||||
UtilityPageStyle.apply_button(defaults_button)
|
||||
UtilityPageStyle.apply_ocean_button(defaults_button)
|
||||
defaults_button.pressed.connect(_show_confirmation.bind("defaults"))
|
||||
name_row.add_child(defaults_button)
|
||||
|
||||
_name_status = Label.new()
|
||||
_name_status.add_theme_color_override("font_color", Color("704c36"))
|
||||
_name_status.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_SECONDARY
|
||||
)
|
||||
layout.add_child(_name_status)
|
||||
_suggestions = HBoxContainer.new()
|
||||
_suggestions.add_theme_constant_override("separation", 8)
|
||||
|
|
@ -187,7 +195,9 @@ func _build_ui() -> void:
|
|||
identity_value.tooltip_text = (
|
||||
"This identity helps other players recognize you between sessions."
|
||||
)
|
||||
identity_value.add_theme_color_override("font_color", Color("665e52"))
|
||||
identity_value.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_SECONDARY
|
||||
)
|
||||
layout.add_child(identity_value)
|
||||
|
||||
var body := HBoxContainer.new()
|
||||
|
|
@ -212,12 +222,14 @@ func _build_ui() -> void:
|
|||
preview_stack.add_child(preview_actions)
|
||||
var preview_note := Label.new()
|
||||
preview_note.text = "Current player • drag or use left / right"
|
||||
preview_note.add_theme_color_override("font_color", Color("514a42"))
|
||||
preview_note.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_SECONDARY
|
||||
)
|
||||
preview_actions.add_child(preview_note)
|
||||
var reset_view := Button.new()
|
||||
reset_view.text = "reset view"
|
||||
reset_view.pressed.connect(_preview.reset_view)
|
||||
UtilityPageStyle.apply_button(reset_view)
|
||||
UtilityPageStyle.apply_ocean_button(reset_view)
|
||||
preview_actions.add_child(reset_view)
|
||||
|
||||
_discard_confirmation = PanelContainer.new()
|
||||
|
|
@ -261,7 +273,7 @@ func _build_categories() -> void:
|
|||
button.custom_minimum_size = Vector2(0, 34)
|
||||
button.button_pressed = category_id == _category_id
|
||||
button.pressed.connect(_select_category.bind(category_id))
|
||||
UtilityPageStyle.apply_button(button)
|
||||
UtilityPageStyle.apply_ocean_button(button)
|
||||
_category_list.add_child(button)
|
||||
_refresh_options()
|
||||
|
||||
|
|
@ -283,7 +295,9 @@ func _refresh_options() -> void:
|
|||
var title := Label.new()
|
||||
title.text = CharacterCustomizationCatalog.category_label(_category_id)
|
||||
title.add_theme_font_size_override("font_size", 22)
|
||||
title.add_theme_color_override("font_color", Color("302b27"))
|
||||
title.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_PRIMARY
|
||||
)
|
||||
_option_list.add_child(title)
|
||||
var options := CharacterCustomizationCatalog.options_for(_category_id)
|
||||
if options.is_empty():
|
||||
|
|
@ -300,7 +314,7 @@ func _refresh_options() -> void:
|
|||
button.custom_minimum_size = Vector2(0, 34)
|
||||
button.button_pressed = _draft_appearance.get(_category_id) == option_id
|
||||
button.pressed.connect(_select_option.bind(_category_id, option_id))
|
||||
UtilityPageStyle.apply_button(button)
|
||||
UtilityPageStyle.apply_ocean_button(button)
|
||||
_option_list.add_child(button)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -732,10 +732,10 @@ func _style_data_page() -> void:
|
|||
content.add_theme_constant_override("separation", 12)
|
||||
for node: Node in content.find_children("*", "", true, false):
|
||||
if node is BaseButton:
|
||||
UtilityPageStyle.apply_button(node)
|
||||
UtilityPageStyle.apply_ocean_button(node)
|
||||
elif node is Label:
|
||||
node.add_theme_color_override(
|
||||
"font_color", UtilityPageStyle.INK
|
||||
"font_color", UtilityPageStyle.OCEAN_TEXT_PRIMARY
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,23 @@ const PAPER: Color = Color("eee2bd")
|
|||
const PAPER_ALT: Color = Color("f3ecd7")
|
||||
const INK: Color = Color("28251f")
|
||||
const MUTED_INK: Color = Color("5f5547")
|
||||
const BORDER: Color = Color("473d2e")
|
||||
# PAPER/INK remain available only for intentionally paper-like content such as
|
||||
# a letter body. Technical surfaces use this shared ocean palette.
|
||||
const OCEAN_PANEL_DEEP: Color = Color("0d2c3a")
|
||||
const OCEAN_PANEL_MID: Color = Color("123f4e")
|
||||
const OCEAN_FIELD: Color = Color("081f2b")
|
||||
const OCEAN_BUTTON: Color = Color("123f4e")
|
||||
const OCEAN_BUTTON_HOVER: Color = Color("196072")
|
||||
const OCEAN_BUTTON_PRESSED: Color = Color("0b3341")
|
||||
const OCEAN_SELECTED: Color = Color("238697")
|
||||
const OCEAN_TEXT_PRIMARY: Color = Color("e6f7f7")
|
||||
const OCEAN_TEXT_SECONDARY: Color = Color("9fcfd2")
|
||||
const OCEAN_DISABLED: Color = Color("38535b")
|
||||
const OCEAN_DANGER: Color = Color("9e4550")
|
||||
const NAVY: Color = Color("092b3d")
|
||||
const NAVY_HOVER: Color = Color("12465b")
|
||||
const GREEN: Color = Color("31594d")
|
||||
const BORDER: Color = Color("473d2e")
|
||||
const LIGHT_TEXT: Color = Color("f5eed9")
|
||||
const DISABLED_TEXT: Color = Color(0.33, 0.36, 0.35, 0.72)
|
||||
const MOTION_TWEEN_META: StringName = &"utility_page_motion_tween"
|
||||
|
|
@ -21,25 +34,20 @@ static func apply_page(root: Control) -> void:
|
|||
|
||||
static func panel_style() -> StyleBoxFlat:
|
||||
var style := StyleBoxFlat.new()
|
||||
style.bg_color = PAPER
|
||||
style.border_color = BORDER
|
||||
style.set_border_width_all(4)
|
||||
style.bg_color = OCEAN_PANEL_DEEP
|
||||
style.set_border_width_all(0)
|
||||
style.set_corner_radius_all(16)
|
||||
style.content_margin_left = 26
|
||||
style.content_margin_right = 26
|
||||
style.content_margin_top = 20
|
||||
style.content_margin_bottom = 20
|
||||
style.shadow_color = Color(0.02, 0.075, 0.11, 0.34)
|
||||
style.shadow_size = 7
|
||||
style.shadow_offset = Vector2(5, 6)
|
||||
return style
|
||||
|
||||
|
||||
static func row_style(selected: bool = false) -> StyleBoxFlat:
|
||||
var style := StyleBoxFlat.new()
|
||||
style.bg_color = NAVY if selected else PAPER_ALT
|
||||
style.border_color = Color(BORDER, 0.55)
|
||||
style.set_border_width_all(2)
|
||||
style.bg_color = OCEAN_SELECTED if selected else OCEAN_PANEL_MID
|
||||
style.set_border_width_all(0)
|
||||
style.set_corner_radius_all(8)
|
||||
style.content_margin_left = 12
|
||||
style.content_margin_right = 12
|
||||
|
|
@ -78,6 +86,40 @@ static func apply_button(button: BaseButton) -> void:
|
|||
button.custom_minimum_size.y = maxf(button.custom_minimum_size.y, 40.0)
|
||||
|
||||
|
||||
static func ocean_button_style(color: Color) -> StyleBoxFlat:
|
||||
var style := button_style(color)
|
||||
style.set_border_width_all(0)
|
||||
return style
|
||||
|
||||
|
||||
static func apply_ocean_button(button: BaseButton) -> void:
|
||||
button.add_theme_font_override("font", TuffyFont)
|
||||
button.add_theme_color_override("font_color", OCEAN_TEXT_PRIMARY)
|
||||
button.add_theme_color_override("font_hover_color", Color.WHITE)
|
||||
button.add_theme_color_override("font_pressed_color", Color.WHITE)
|
||||
button.add_theme_color_override("font_focus_color", Color.WHITE)
|
||||
button.add_theme_color_override(
|
||||
"font_disabled_color",
|
||||
Color(OCEAN_TEXT_SECONDARY, 0.52),
|
||||
)
|
||||
button.add_theme_stylebox_override(
|
||||
"normal", ocean_button_style(OCEAN_BUTTON)
|
||||
)
|
||||
button.add_theme_stylebox_override(
|
||||
"hover", ocean_button_style(OCEAN_BUTTON_HOVER)
|
||||
)
|
||||
button.add_theme_stylebox_override(
|
||||
"pressed", ocean_button_style(OCEAN_SELECTED)
|
||||
)
|
||||
button.add_theme_stylebox_override(
|
||||
"focus", ocean_button_style(OCEAN_SELECTED)
|
||||
)
|
||||
button.add_theme_stylebox_override(
|
||||
"disabled", ocean_button_style(OCEAN_DISABLED)
|
||||
)
|
||||
button.custom_minimum_size.y = maxf(button.custom_minimum_size.y, 40.0)
|
||||
|
||||
|
||||
static func apply_line_edit(edit: LineEdit) -> void:
|
||||
edit.add_theme_font_override("font", TuffyFont)
|
||||
edit.add_theme_color_override("font_color", LIGHT_TEXT)
|
||||
|
|
@ -95,6 +137,40 @@ static func apply_line_edit(edit: LineEdit) -> void:
|
|||
)
|
||||
|
||||
|
||||
static func apply_ocean_line_edit(edit: LineEdit) -> void:
|
||||
edit.add_theme_font_override("font", TuffyFont)
|
||||
edit.add_theme_color_override("font_color", OCEAN_TEXT_PRIMARY)
|
||||
edit.add_theme_color_override(
|
||||
"font_placeholder_color", Color(OCEAN_TEXT_SECONDARY, 0.78)
|
||||
)
|
||||
edit.add_theme_color_override("font_selected_color", Color.WHITE)
|
||||
edit.add_theme_color_override("caret_color", OCEAN_TEXT_PRIMARY)
|
||||
edit.add_theme_color_override("selection_color", OCEAN_SELECTED)
|
||||
edit.add_theme_color_override("font_uneditable_color", OCEAN_TEXT_SECONDARY)
|
||||
edit.add_theme_stylebox_override(
|
||||
"normal", ocean_button_style(OCEAN_FIELD)
|
||||
)
|
||||
edit.add_theme_stylebox_override(
|
||||
"focus", ocean_button_style(OCEAN_SELECTED)
|
||||
)
|
||||
edit.add_theme_stylebox_override(
|
||||
"read_only", ocean_button_style(Color(OCEAN_FIELD, 0.82))
|
||||
)
|
||||
|
||||
|
||||
static func apply_text_edit(edit: TextEdit) -> void:
|
||||
edit.add_theme_font_override("font", TuffyFont)
|
||||
edit.add_theme_color_override("font_color", OCEAN_TEXT_PRIMARY)
|
||||
edit.add_theme_color_override(
|
||||
"font_placeholder_color", Color(OCEAN_TEXT_SECONDARY, 0.78)
|
||||
)
|
||||
edit.add_theme_color_override("font_selected_color", Color.WHITE)
|
||||
edit.add_theme_color_override("caret_color", OCEAN_TEXT_PRIMARY)
|
||||
edit.add_theme_color_override("selection_color", OCEAN_SELECTED)
|
||||
edit.add_theme_stylebox_override("normal", ocean_button_style(OCEAN_FIELD))
|
||||
edit.add_theme_stylebox_override("focus", ocean_button_style(OCEAN_SELECTED))
|
||||
|
||||
|
||||
static func animate_in(control: Control) -> void:
|
||||
_cancel_motion(control)
|
||||
control.pivot_offset = control.size * 0.5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue