-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refs #373: Create bar and settings popup for the SimpleClickGUI. These components will replace the old InventoryBar and SettingsBar as part of the update for the SimpleClickGUI as proposed be Papernoise. * refs #373: Make buttons and other components usable. Players can now open the save, load, history and quit popups. They can also change volumes, the text continue mode and the text speed. * refs #373: Update icons and add setup options to Sound Volumes component. Now devs can set if the Sound Volumens component should show the Master bus only and if it should show the label with the name for each bus. - **upd** Add custom icons for radio buttons in PopupMenu for the base_gui_theme.tres. * refs #373: Create DialogueAdvancement component with better feedback. This component uses a CheckButton with two labels so players can have a better understanding of the current dialogue advancement mode. * refs #373: Remove non used components and popups in SimpleClick GUI. This also updates the behavior of the cursor when hovering the settings button (to be improved). * refs #373: Progress on migration script to update the SimpleClick GUI. The script is executed only if the project is using the SimpleClick template, and it removes the InventoryBar, SettingsBar, TextSettingsPopup and SoundSettingsPopup components. * refs #373: Update migration script to add new components and update the SaveAndLoadPopup. The new Simple Click GUI uses the SimpleClickBar and the SimpleClickPopup components. Instead of adding a new migration step, the SaveAndLoadPopup is also removed in the first step and then added in the second one. - **upd** Remove the `@onready` vars in the Simple Click GUI to access the SaveAndLoadPopup, HistoryPopup, and QuitPopup since it is no longer used to open those popups. * refs #373: Update migration to avoid removing the SaveAndLoadPopup Instead of this, the popup's main script is updated with the content of the one in the addons folder. * refs #373: Remove commented code and improve saving * refs #373: Improve and homogenize icon sizing when items enter inventory. - **fix**: Assign unique names to the **Up** and **Down** icons in the base **InventoryGrid** component. * refs #373: Improve property value assignation based on review suggestion. Co-authored-by: Paolo Pustorino <[email protected]> * refs #373: Make improvements suggested by @stickgrinder on its PR review - **upd** Reassign the texture used by the **AtlasTexture** of all the icons in the **SimpleClickSettingsPopup** to use the `simple_click_settings_popup_icons.png` instead of a CompressedTexture2D. * refs #373: Update SimpleClickSettingsPopup icons based on PR feedback. --------- Co-authored-by: Paolo Pustorino <[email protected]>
- Loading branch information
1 parent
b55a28d
commit f19d252
Showing
22 changed files
with
827 additions
and
61 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
addons/popochiu/engine/objects/gui/components/dialogue_advancement/dialogue_advancement.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
extends Control | ||
|
||
@onready var input_button: LinkButton = $InputButton | ||
@onready var manual: Label = %Manual | ||
@onready var continue_mode: CheckButton = %ContinueMode | ||
@onready var auto: Label = %Auto | ||
|
||
|
||
#region Godot ###################################################################################### | ||
func _ready() -> void: | ||
# Set default values | ||
input_button.button_pressed = PopochiuUtils.e.settings.auto_continue_text | ||
continue_mode.button_pressed = PopochiuUtils.e.settings.auto_continue_text | ||
_update_labels() | ||
|
||
# Connect to children signals | ||
input_button.toggled.connect(_on_toggled) | ||
|
||
|
||
#endregion | ||
|
||
#region Private #################################################################################### | ||
func _update_labels() -> void: | ||
if input_button.button_pressed: | ||
manual.modulate.a = PopochiuGraphicInterface.UNSELECTED_ALPHA | ||
auto.modulate.a = PopochiuGraphicInterface.SELECTED_ALPHA | ||
else: | ||
manual.modulate.a = PopochiuGraphicInterface.SELECTED_ALPHA | ||
auto.modulate.a = PopochiuGraphicInterface.UNSELECTED_ALPHA | ||
|
||
|
||
func _on_toggled(toggled_on: bool) -> void: | ||
PopochiuUtils.e.settings.auto_continue_text = toggled_on | ||
continue_mode.button_pressed = toggled_on | ||
_update_labels() | ||
|
||
|
||
#endregion |
57 changes: 57 additions & 0 deletions
57
addons/popochiu/engine/objects/gui/components/dialogue_advancement/dialogue_advancement.tscn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[gd_scene load_steps=6 format=3 uid="uid://clhnbnew4ydpc"] | ||
|
||
[ext_resource type="Texture2D" uid="uid://cm5ik18o3ragq" path="res://addons/popochiu/engine/objects/gui/components/dialogue_advancement/images/dialogue_advancement_check_button.png" id="1_pbw0k"] | ||
[ext_resource type="Theme" uid="uid://dpequqav4rjaf" path="res://addons/popochiu/engine/objects/gui/resources/base_gui_theme.tres" id="1_woi6t"] | ||
[ext_resource type="Script" path="res://addons/popochiu/engine/objects/gui/components/dialogue_advancement/dialogue_advancement.gd" id="2_ju60a"] | ||
|
||
[sub_resource type="AtlasTexture" id="AtlasTexture_eca4m"] | ||
atlas = ExtResource("1_pbw0k") | ||
region = Rect2(26, 0, 26, 13) | ||
|
||
[sub_resource type="AtlasTexture" id="AtlasTexture_1ivvq"] | ||
atlas = ExtResource("1_pbw0k") | ||
region = Rect2(0, 0, 26, 13) | ||
|
||
[node name="DialogueAdvancement" type="Control" groups=["popochiu_gui_component"]] | ||
layout_mode = 3 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
theme = ExtResource("1_woi6t") | ||
script = ExtResource("2_ju60a") | ||
|
||
[node name="InputButton" type="LinkButton" parent="."] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
toggle_mode = true | ||
|
||
[node name="HBoxContainer" type="HBoxContainer" parent="InputButton"] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
|
||
[node name="Manual" type="Label" parent="InputButton/HBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
text = "Manual" | ||
|
||
[node name="ContinueMode" type="CheckButton" parent="InputButton/HBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
mouse_filter = 2 | ||
theme_override_icons/checked = SubResource("AtlasTexture_eca4m") | ||
theme_override_icons/unchecked = SubResource("AtlasTexture_1ivvq") | ||
|
||
[node name="Auto" type="Label" parent="InputButton/HBoxContainer"] | ||
unique_name_in_owner = true | ||
layout_mode = 2 | ||
text = "Auto" |
Binary file added
BIN
+150 Bytes
...ui/components/dialogue_advancement/images/dialogue_advancement_check_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+187 Bytes
addons/popochiu/engine/objects/gui/resources/images/radio_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+254 Bytes
...imple_click/components/simple_click_bar/images/simple_click_settings_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.