Migrate settings UI to OGPU themed widgets and add logout
All checks were successful
Build plugin / build (push) Successful in 1m6s
All checks were successful
Build plugin / build (push) Successful in 1m6s
- Replace plain Godot Controls with StatusPanel, ComponentTextInput, Toggle, CardButton, and Dropdown components - Add logout functionality that clears API key or closes session - Match Steam plugin's settings UI style
This commit is contained in:
parent
b9effee104
commit
c15d49bfd1
3 changed files with 166 additions and 84 deletions
|
|
@ -1,88 +1,111 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://itch_settings_scene"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://itch_settings_scene"]
|
||||
|
||||
[ext_resource type="Script" path="res://plugins/itch/core/itch_settings.gd" id="1"]
|
||||
[ext_resource type="PackedScene" uid="uid://d1hlp6c8wrqgv" path="res://core/ui/components/status.tscn" id="2"]
|
||||
[ext_resource type="PackedScene" uid="uid://d1rjdfxxrdccf" path="res://core/ui/components/text_input.tscn" id="3"]
|
||||
[ext_resource type="PackedScene" uid="uid://d1qb7euwlu7bh" path="res://core/ui/components/toggle.tscn" id="4"]
|
||||
[ext_resource type="PackedScene" uid="uid://c71ayw7pcw6u6" path="res://core/ui/components/card_button.tscn" id="5"]
|
||||
[ext_resource type="PackedScene" uid="uid://xei5afwefxud" path="res://core/ui/components/dropdown.tscn" id="6"]
|
||||
|
||||
[node name="ItchSettings" type="Control"]
|
||||
layout_mode = 3
|
||||
[node name="ItchSettings" type="MarginContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -200.0
|
||||
offset_top = -120.0
|
||||
offset_right = 200.0
|
||||
offset_bottom = 120.0
|
||||
|
||||
[node name="TitleLabel" type="Label" parent="VBoxContainer"]
|
||||
[node name="ContentContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
text = "itch.io"
|
||||
horizontal_alignment = 1
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
theme_override_constants/separation = 10
|
||||
|
||||
[node name="StatusLabel" type="Label" parent="VBoxContainer"]
|
||||
[node name="Status" parent="ContentContainer" instance=ExtResource("2")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Status: starting butlerd..."
|
||||
title = "Status"
|
||||
description = ""
|
||||
status = 2
|
||||
color = "red"
|
||||
|
||||
[node name="LoginMethod" type="OptionButton" parent="VBoxContainer"]
|
||||
[node name="ConnectedStatus" parent="ContentContainer" instance=ExtResource("2")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
item_count = 2
|
||||
popup/item_0_text = "API Key"
|
||||
popup/item_1_text = "Username & Password"
|
||||
title = "Connected"
|
||||
description = ""
|
||||
color = "gray"
|
||||
|
||||
[node name="ApiKeyInput" type="LineEdit" parent="VBoxContainer"]
|
||||
[node name="LoggedInStatus" parent="ContentContainer" instance=ExtResource("2")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
placeholder_text = "itch.io API key"
|
||||
title = "Logged In"
|
||||
description = ""
|
||||
color = "gray"
|
||||
|
||||
[node name="UsernameInput" type="LineEdit" parent="VBoxContainer"]
|
||||
[node name="HSeparator" type="HSeparator" parent="ContentContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="LoginMethod" parent="ContentContainer" instance=ExtResource("6")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
placeholder_text = "Username"
|
||||
title = "Login Method"
|
||||
description = ""
|
||||
|
||||
[node name="ApiKeyInput" parent="ContentContainer" instance=ExtResource("3")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
title = "API Key"
|
||||
description = "Get an API key from https://itch.io/user/settings/api-keys"
|
||||
secret = true
|
||||
|
||||
[node name="UsernameInput" parent="ContentContainer" instance=ExtResource("3")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
title = "Username"
|
||||
description = ""
|
||||
visible = false
|
||||
|
||||
[node name="PasswordInput" type="LineEdit" parent="VBoxContainer"]
|
||||
[node name="PasswordInput" parent="ContentContainer" instance=ExtResource("3")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
placeholder_text = "Password"
|
||||
title = "Password"
|
||||
description = ""
|
||||
secret = true
|
||||
visible = false
|
||||
|
||||
[node name="HelpLabel" type="Label" parent="VBoxContainer"]
|
||||
[node name="HSeparatorLogin" type="HSeparator" parent="ContentContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SaveButton" parent="ContentContainer" instance=ExtResource("5")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
autowrap_mode = 2
|
||||
text = "Get an API key from https://itch.io/user/settings/api-keys"
|
||||
text = "Save and Log In"
|
||||
|
||||
[node name="FilterUnsupported" type="CheckBox" parent="VBoxContainer"]
|
||||
[node name="LogoutButton" parent="ContentContainer" instance=ExtResource("5")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Logout"
|
||||
|
||||
[node name="HSeparator2" type="HSeparator" parent="ContentContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="FilterUnsupported" parent="ContentContainer" instance=ExtResource("4")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Only show games available on this platform"
|
||||
button_pressed = true
|
||||
|
||||
[node name="ShowPurchases" type="CheckBox" parent="VBoxContainer"]
|
||||
[node name="ShowPurchases" parent="ContentContainer" instance=ExtResource("4")]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Show main purchases"
|
||||
button_pressed = true
|
||||
|
||||
[node name="CollectionsLabel" type="Label" parent="VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
[node name="CollectionsLabel" type="Label" parent="ContentContainer"]
|
||||
layout_mode = 2
|
||||
text = "Show collections:"
|
||||
|
||||
[node name="CollectionsContainer" type="VBoxContainer" parent="VBoxContainer"]
|
||||
[node name="CollectionsContainer" type="VBoxContainer" parent="ContentContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SaveButton" type="Button" parent="VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Save and Log In"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue