Skip to content

Commit

Permalink
Rework credits and shortcut help into popups
Browse files Browse the repository at this point in the history
This way we don't have to struggle for space in
tight places. I'm a bit concerned about the UX
changing from this. But I tried my best to make
the look as easy to follow as before.

This also adds shortcuts missing from the
previous commit.
  • Loading branch information
YuriSizov committed Dec 6, 2024
1 parent eafff7b commit ce2f8c7
Show file tree
Hide file tree
Showing 22 changed files with 1,073 additions and 1,176 deletions.
7 changes: 2 additions & 5 deletions globals/Controller.gd
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,12 @@ func _finalize_file_dialog() -> void:
settings_manager.set_last_opened_folder(_file_dialog.current_dir)


func get_info_popup(override: bool = false) -> InfoPopup:
func get_info_popup() -> InfoPopup:
if not _info_popup:
_info_popup = INFO_POPUP_SCENE.instantiate()

if _info_popup.is_visible_in_tree():
if not override:
return null

_info_popup.close_popup()
return null

_info_popup.clear()
return _info_popup
Expand Down
26 changes: 3 additions & 23 deletions gui/Menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,7 @@ enum NavigationTarget {
ARRANGEMENT,
INSTRUMENT,
ADVANCED,
CREDITS,
THIRD_PARTY,
LEGACY_CREDITS,
GENERAL_HELP,
PATTERN_HELP,
ARRANGEMENT_HELP,
TIMELINE_HELP,
}

var _current_tab: int = 0
Expand All @@ -33,14 +27,8 @@ var _current_tab: int = 0
@onready var _instrument_tab_button: Button = %InstrumentTab
@onready var _advanced_tab_button: Button = %AdvancedTab

@onready var _credits_tab_button: Button = %CreditsTab
@onready var _thirdparty_tab_button: Button = %ThirdPartyTab
@onready var _legacy_tab_button: Button = %LegacyTab

@onready var _general_help_tab_button: Button = %GeneralHelpTab
@onready var _pattern_help_tab_button: Button = %PatternHelpTab
@onready var _arrangement_help_tab_button: Button = %ArrangementHelpTab
@onready var _timeline_help_tab_button: Button = %TimelineHelpTab
@onready var _navigation_filler: PanelContainer = %NavigationFiller

# Menu collections.

Expand All @@ -50,16 +38,8 @@ var _current_tab: int = 0
_instrument_tab_button,
_advanced_tab_button,
]
@onready var CREDITS_MENU: Array[Button] = [
_credits_tab_button,
_thirdparty_tab_button,
_legacy_tab_button,
]
@onready var HELP_MENU: Array[Button] = [
_general_help_tab_button,
_pattern_help_tab_button,
_arrangement_help_tab_button,
_timeline_help_tab_button,
]


Expand Down Expand Up @@ -102,8 +82,6 @@ func _navigate(target: NavigationTarget) -> void:

if button in MAIN_MENU:
_update_menu_collection(MAIN_MENU)
elif button in CREDITS_MENU:
_update_menu_collection(CREDITS_MENU)
elif button in HELP_MENU:
_update_menu_collection(HELP_MENU)

Expand All @@ -116,6 +94,8 @@ func _update_menu_collection(menu_buttons: Array[Button]) -> void:

for button in menu_buttons:
button.visible = true

_navigation_filler.visible = (menu_buttons.size() < 3)


func _update_current_tab() -> void:
Expand Down
98 changes: 5 additions & 93 deletions gui/Menu.tscn
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
[gd_scene load_steps=16 format=3 uid="uid://l0bjoy6vwtbx"]
[gd_scene load_steps=10 format=3 uid="uid://l0bjoy6vwtbx"]

[ext_resource type="Script" path="res://gui/Menu.gd" id="1_pjxdv"]
[ext_resource type="PackedScene" uid="uid://7lvvn5lu3ywt" path="res://gui/widgets/NavigationButton.tscn" id="2_l3q7q"]
[ext_resource type="ButtonGroup" uid="uid://duqg28jfenc12" path="res://gui/theme/navigation_buttons.tres" id="3_kmmx3"]
[ext_resource type="Texture2D" uid="uid://b2uo4lffopiu7" path="res://assets/icons/fullscreen_on.png" id="4_b53yk"]
[ext_resource type="PackedScene" uid="uid://d0lne8svx0ysl" path="res://gui/views/FileView.tscn" id="5_6f3ft"]
[ext_resource type="PackedScene" uid="uid://c1oriajgloul5" path="res://gui/views/ArrangementView.tscn" id="6_0weha"]
[ext_resource type="PackedScene" uid="uid://diwy8fi3i4ti1" path="res://gui/views/CreditsView.tscn" id="6_x0vu5"]
[ext_resource type="PackedScene" uid="uid://cw48njslxrtsl" path="res://gui/views/InstrumentView.tscn" id="7_32hp6"]
[ext_resource type="PackedScene" uid="uid://bhydnchi7pmla" path="res://gui/views/GeneralHelpView.tscn" id="7_efw7d"]
[ext_resource type="PackedScene" uid="uid://ggnvgntxytdg" path="res://gui/views/AdvancedView.tscn" id="8_b5sqt"]
[ext_resource type="PackedScene" uid="uid://cci6pssfnh4q6" path="res://gui/views/ThirdPartyView.tscn" id="10_c4eyv"]
[ext_resource type="PackedScene" uid="uid://c0a2d6er3rr81" path="res://gui/views/LegacyView.tscn" id="11_vw4b6"]
[ext_resource type="PackedScene" uid="uid://dx08w2jjjtnag" path="res://gui/views/PatternHelpView.tscn" id="13_4cens"]
[ext_resource type="PackedScene" uid="uid://dwl0v0nsr8r2n" path="res://gui/views/ArrangementHelpView.tscn" id="14_hrknx"]
[ext_resource type="PackedScene" uid="uid://b78pyknxb23fd" path="res://gui/views/TimelineHelpView.tscn" id="15_3ona3"]

[node name="Menu" type="VBoxContainer"]
auto_translate_mode = 1
Expand Down Expand Up @@ -66,36 +60,6 @@ focus_mode = 0
button_group = ExtResource("3_kmmx3")
label_text = "ADVANCED"

[node name="CreditsTab" parent="Navigation" instance=ExtResource("2_l3q7q")]
unique_name_in_owner = true
auto_translate_mode = 1
visible = false
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 0
button_group = ExtResource("3_kmmx3")
label_text = "CREDITS"

[node name="ThirdPartyTab" parent="Navigation" instance=ExtResource("2_l3q7q")]
unique_name_in_owner = true
auto_translate_mode = 1
visible = false
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 0
button_group = ExtResource("3_kmmx3")
label_text = "THIRD PARTY"

[node name="LegacyTab" parent="Navigation" instance=ExtResource("2_l3q7q")]
unique_name_in_owner = true
auto_translate_mode = 1
visible = false
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 0
button_group = ExtResource("3_kmmx3")
label_text = "LEGACY CREDITS"

[node name="GeneralHelpTab" parent="Navigation" instance=ExtResource("2_l3q7q")]
unique_name_in_owner = true
auto_translate_mode = 1
Expand All @@ -104,37 +68,15 @@ layout_mode = 2
size_flags_horizontal = 3
focus_mode = 0
button_group = ExtResource("3_kmmx3")
label_text = "GENERAL HELP"
label_text = "TUTORIALS & SHORTCUTS"

[node name="PatternHelpTab" parent="Navigation" instance=ExtResource("2_l3q7q")]
[node name="NavigationFiller" type="PanelContainer" parent="Navigation"]
unique_name_in_owner = true
auto_translate_mode = 1
visible = false
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 0
button_group = ExtResource("3_kmmx3")
label_text = "PATTERNS"

[node name="ArrangementHelpTab" parent="Navigation" instance=ExtResource("2_l3q7q")]
unique_name_in_owner = true
auto_translate_mode = 1
visible = false
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 0
button_group = ExtResource("3_kmmx3")
label_text = "ARRANGEMENTS"

[node name="TimelineHelpTab" parent="Navigation" instance=ExtResource("2_l3q7q")]
unique_name_in_owner = true
auto_translate_mode = 1
visible = false
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 0
button_group = ExtResource("3_kmmx3")
label_text = "TIMELINE"
size_flags_stretch_ratio = 2.0
theme_type_variation = &"NavigationPanel"

[node name="FullscreenToggle" type="Button" parent="Navigation"]
unique_name_in_owner = true
Expand Down Expand Up @@ -172,37 +114,7 @@ unique_name_in_owner = true
visible = false
layout_mode = 2

[node name="CreditsView" parent="Contents" instance=ExtResource("6_x0vu5")]
unique_name_in_owner = true
visible = false
layout_mode = 2

[node name="ThirdPartyView" parent="Contents" instance=ExtResource("10_c4eyv")]
unique_name_in_owner = true
visible = false
layout_mode = 2

[node name="LegacyView" parent="Contents" instance=ExtResource("11_vw4b6")]
unique_name_in_owner = true
visible = false
layout_mode = 2

[node name="GeneralHelpView" parent="Contents" instance=ExtResource("7_efw7d")]
unique_name_in_owner = true
visible = false
layout_mode = 2

[node name="PatternHelpView" parent="Contents" instance=ExtResource("13_4cens")]
unique_name_in_owner = true
visible = false
layout_mode = 2

[node name="ArrangementHelpView" parent="Contents" instance=ExtResource("14_hrknx")]
unique_name_in_owner = true
visible = false
layout_mode = 2

[node name="TimelineHelpView" parent="Contents" instance=ExtResource("15_3ona3")]
unique_name_in_owner = true
visible = false
layout_mode = 2
60 changes: 58 additions & 2 deletions gui/theme/project_theme.tres
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_resource type="Theme" load_steps=72 format=3 uid="uid://chpsnl8o0raaf"]
[gd_resource type="Theme" load_steps=81 format=3 uid="uid://chpsnl8o0raaf"]

[ext_resource type="Texture2D" uid="uid://n8jw4gat8tg7" path="res://assets/icons/arrow_down_small.png" id="1_1ij5d"]
[ext_resource type="Texture2D" uid="uid://d2aswndmtik56" path="res://assets/overlap-dither.png" id="1_4kypt"]
Expand Down Expand Up @@ -52,6 +52,15 @@ shadow_color = Color(0, 0, 0, 1)
shadow_size = 2
shadow_offset = Vector2(2, 2)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6nexf"]
content_margin_left = 8.0
content_margin_top = 3.0
content_margin_right = 8.0
content_margin_bottom = 3.0
bg_color = Color(0.203922, 0.258824, 0.27451, 1)
expand_margin_left = 4.0
expand_margin_right = 8.0

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lg4yk"]
content_margin_left = 24.0
content_margin_top = 3.0
Expand Down Expand Up @@ -89,6 +98,10 @@ content_margin_right = 1.0
content_margin_bottom = 2.0
bg_color = Color(0.415113, 0.478785, 0.504881, 1)

[sub_resource type="StyleBoxLine" id="StyleBoxLine_rqga1"]
color = Color(0.203922, 0.258824, 0.27451, 1)
thickness = 3

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_520ht"]

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_8fwph"]
Expand Down Expand Up @@ -177,6 +190,9 @@ content_margin_right = 24.0
content_margin_bottom = 1.0
bg_color = Color(0.313726, 0.396078, 0.415686, 1)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_odn4q"]
bg_color = Color(0.203922, 0.258824, 0.27451, 1)

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_lgaqy"]
content_margin_left = 8.0
content_margin_top = 3.0
Expand Down Expand Up @@ -277,6 +293,9 @@ content_margin_top = 4.0
content_margin_right = 4.0
content_margin_bottom = 4.0

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3pybi"]
bg_color = Color(0.313726, 0.396078, 0.415686, 1)

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_kv1pc"]

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_3fj3y"]
Expand Down Expand Up @@ -369,6 +388,25 @@ content_margin_right = 12.0
content_margin_bottom = 1.0
bg_color = Color(0.8, 0.533333, 0, 1)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dp3tg"]
bg_color = Color(0.203922, 0.258824, 0.27451, 1)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yn8qv"]
bg_color = Color(0.203922, 0.258824, 0.27451, 1)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0noio"]
bg_color = Color(0.203922, 0.258824, 0.27451, 1)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3jpdy"]
content_margin_left = 8.0
content_margin_right = 8.0
bg_color = Color(0.427451, 0.521569, 0.552941, 1)

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bivqn"]
content_margin_left = 8.0
content_margin_right = 8.0
bg_color = Color(0.427451, 0.521569, 0.552941, 1)

[sub_resource type="StyleBoxLine" id="StyleBoxLine_m646a"]
thickness = 3
vertical = true
Expand Down Expand Up @@ -427,16 +465,20 @@ Button/styles/hover = SubResource("StyleBoxFlat_bd2w5")
Button/styles/normal = SubResource("StyleBoxFlat_5mfai")
Button/styles/pressed = SubResource("StyleBoxFlat_2x6kt")
CreditsBox/base_type = &"VBoxContainer"
CreditsBox/constants/separation = 3
CreditsBox/constants/separation = 4
CreditsLabel/base_type = &"Label"
CreditsLabel/colors/font_color = Color(0.737255, 0.784314, 0.8, 1)
CreditsLabel/colors/font_shadow_color = Color(0, 0, 0, 1)
CreditsLabelAccented/base_type = &"CreditsLabel"
CreditsLabelAccented/colors/font_color = Color(1, 1, 0, 1)
CreditsLabelHeader/base_type = &"CreditsLabel"
CreditsLabelHeader/colors/font_color = Color(1, 1, 1, 1)
CreditsLabelHeaderPanel/base_type = &"CreditsLabelHeader"
CreditsLabelHeaderPanel/styles/normal = SubResource("StyleBoxFlat_6nexf")
CreditsLabelLink/base_type = &"CreditsLabel"
CreditsLabelLink/colors/font_color = Color(0.524228, 0.680104, 0.824375, 1)
CreditsSectionBox/base_type = &"VBoxContainer"
CreditsSectionBox/constants/separation = 10
DeleteArea/base_type = &"Label"
DeleteArea/colors/hover_color = Color(0.890395, 0.382085, 0.507052, 0.235294)
DeleteArea/styles/normal = SubResource("StyleBoxFlat_lg4yk")
Expand All @@ -451,6 +493,12 @@ FullscreenButton/styles/pressed = SubResource("StyleBoxFlat_dqdf2")
HBoxContainer/constants/separation = 0
HBoxSpaced/base_type = &"HBoxContainer"
HBoxSpaced/constants/separation = 20
HSeparator/styles/separator = SubResource("StyleBoxLine_rqga1")
HelpMarginContainer/base_type = &"MarginContainer"
HelpMarginContainer/constants/margin_bottom = 8
HelpMarginContainer/constants/margin_left = 12
HelpMarginContainer/constants/margin_right = 16
HelpMarginContainer/constants/margin_top = 8
HighlightManager/colors/highlight_bevel_color = Color(0.891203, 0.891203, 0, 1)
HighlightManager/colors/highlight_color = Color(1, 1, 0, 1)
HighlightManager/constants/highlight_thickness = 4
Expand Down Expand Up @@ -510,6 +558,8 @@ NavigationButton/styles/pressed = SubResource("StyleBoxFlat_llx58")
NavigationLabel/base_type = &"Label"
NavigationLabel/colors/font_shadow_color = Color(0, 0, 0, 0.784314)
NavigationLabel/font_sizes/font_size = 16
NavigationPanel/base_type = &"PanelContainer"
NavigationPanel/styles/panel = SubResource("StyleBoxFlat_odn4q")
NoteMap/colors/active_note_bevel_color = Color(1, 0.72549, 0.372549, 1)
NoteMap/colors/active_note_color = Color(1, 1, 0.752941, 1)
NoteMap/colors/gutter_color = Color(0.427451, 0.521569, 0.552941, 1)
Expand Down Expand Up @@ -597,6 +647,7 @@ RichTextLabel/colors/default_color = Color(1, 1, 1, 1)
RichTextLabel/colors/font_shadow_color = Color(0, 0, 0, 1)
RichTextLabel/constants/shadow_offset_x = 2
RichTextLabel/constants/shadow_offset_y = 1
ScrollContainer/styles/panel = SubResource("StyleBoxFlat_3pybi")
ScrollbarButton/base_type = &"Button"
ScrollbarButton/styles/disabled = SubResource("StyleBoxEmpty_kv1pc")
ScrollbarButton/styles/focus = SubResource("StyleBoxEmpty_3fj3y")
Expand Down Expand Up @@ -624,6 +675,11 @@ ToastMessageWarning/styles/normal = SubResource("StyleBoxFlat_sndmm")
VBoxContainer/constants/separation = 0
VBoxSpaced/base_type = &"VBoxContainer"
VBoxSpaced/constants/separation = 20
VScrollBar/styles/grabber = SubResource("StyleBoxFlat_dp3tg")
VScrollBar/styles/grabber_highlight = SubResource("StyleBoxFlat_yn8qv")
VScrollBar/styles/grabber_pressed = SubResource("StyleBoxFlat_0noio")
VScrollBar/styles/scroll = SubResource("StyleBoxFlat_3jpdy")
VScrollBar/styles/scroll_focus = SubResource("StyleBoxFlat_bivqn")
VSeparator/styles/separator = SubResource("StyleBoxLine_m646a")
WidgetPanel/base_type = &"PanelContainer"
WidgetPanel/styles/panel = SubResource("StyleBoxFlat_cjrsp")
Expand Down
13 changes: 0 additions & 13 deletions gui/views/ArrangementHelpView.gd

This file was deleted.

Loading

0 comments on commit ce2f8c7

Please sign in to comment.