Added a trainer window. It's functionality has not been implemented yet.

This commit is contained in:
Relintai 2020-05-25 12:44:03 +02:00
parent 7bd29dcf83
commit 048bb06eea
6 changed files with 231 additions and 24 deletions

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=28 format=2] [gd_scene load_steps=29 format=2]
[ext_resource path="res://player/GUI.gd" type="Script" id=1] [ext_resource path="res://player/GUI.gd" type="Script" id=1]
[ext_resource path="res://ui/ingame_menu/IngameMenu.tscn" type="PackedScene" id=2] [ext_resource path="res://ui/ingame_menu/IngameMenu.tscn" type="PackedScene" id=2]
@ -26,6 +26,7 @@
[ext_resource path="res://ui/theme/bag_icon.tres" type="Texture" id=24] [ext_resource path="res://ui/theme/bag_icon.tres" type="Texture" id=24]
[ext_resource path="res://ui/theme/locked_icon.tres" type="Texture" id=25] [ext_resource path="res://ui/theme/locked_icon.tres" type="Texture" id=25]
[ext_resource path="res://ui/theme/unlocked_icon.tres" type="Texture" id=26] [ext_resource path="res://ui/theme/unlocked_icon.tres" type="Texture" id=26]
[ext_resource path="res://ui/windows/TrainerWindow.tscn" type="PackedScene" id=27]
[ext_resource path="res://ui/player_ui/player_ui.gd" type="Script" id=28] [ext_resource path="res://ui/player_ui/player_ui.gd" type="Script" id=28]
[node name="GUILayer" type="CanvasLayer"] [node name="GUILayer" type="CanvasLayer"]
@ -54,8 +55,7 @@ custom_constants/margin_top = 481
custom_constants/margin_left = 60 custom_constants/margin_left = 60
custom_constants/margin_bottom = 41 custom_constants/margin_bottom = 41
__meta__ = { __meta__ = {
"_edit_group_": true, "_edit_group_": true
"_edit_lock_": true
} }
[node name="HBoxContainer" type="HBoxContainer" parent="GUI/TouchTargetControls"] [node name="HBoxContainer" type="HBoxContainer" parent="GUI/TouchTargetControls"]
@ -98,7 +98,6 @@ mouse_filter = 2
custom_constants/margin_top = 200 custom_constants/margin_top = 200
__meta__ = { __meta__ = {
"_edit_group_": true, "_edit_group_": true,
"_edit_lock_": true,
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
@ -406,6 +405,15 @@ visible = false
[node name="Map" parent="GUI/Windows" instance=ExtResource( 6 )] [node name="Map" parent="GUI/Windows" instance=ExtResource( 6 )]
visible = false visible = false
[node name="TrainerWindow" parent="GUI/Windows" instance=ExtResource( 27 )]
visible = false
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 84.0
margin_top = 59.0
margin_right = 430.0
margin_bottom = 504.0
[node name="Unitframes" type="Control" parent="GUI"] [node name="Unitframes" type="Control" parent="GUI"]
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0

View File

@ -2,7 +2,6 @@
[ext_resource path="res://fonts/VT323-Regular.ttf" type="DynamicFontData" id=1] [ext_resource path="res://fonts/VT323-Regular.ttf" type="DynamicFontData" id=1]
[resource] [resource]
size = 14 size = 14
font_data = ExtResource( 1 ) font_data = ExtResource( 1 )

File diff suppressed because one or more lines are too long

View File

@ -29,13 +29,13 @@ margin_right = 876.0
margin_bottom = 30.0 margin_bottom = 30.0
[node name="Label" type="Label" parent="PagedContent/Header"] [node name="Label" type="Label" parent="PagedContent/Header"]
margin_top = 7.0 margin_top = 6.0
margin_right = 54.0 margin_right = 63.0
margin_bottom = 22.0 margin_bottom = 23.0
text = "Spellbook" text = "Spellbook"
[node name="HBoxContainer" type="HBoxContainer" parent="PagedContent/Header"] [node name="HBoxContainer" type="HBoxContainer" parent="PagedContent/Header"]
margin_left = 58.0 margin_left = 67.0
margin_right = 832.0 margin_right = 832.0
margin_bottom = 30.0 margin_bottom = 30.0
size_flags_horizontal = 3 size_flags_horizontal = 3
@ -43,8 +43,8 @@ size_flags_vertical = 3
alignment = 1 alignment = 1
[node name="Button" type="Button" parent="PagedContent/Header/HBoxContainer"] [node name="Button" type="Button" parent="PagedContent/Header/HBoxContainer"]
margin_left = 337.0 margin_left = 332.0
margin_right = 437.0 margin_right = 432.0
margin_bottom = 30.0 margin_bottom = 30.0
rect_min_size = Vector2( 100, 0 ) rect_min_size = Vector2( 100, 0 )
text = "Nature" text = "Nature"
@ -59,7 +59,7 @@ text = "X"
[node name="GridContainer" type="GridContainer" parent="PagedContent"] [node name="GridContainer" type="GridContainer" parent="PagedContent"]
margin_top = 38.0 margin_top = 38.0
margin_right = 876.0 margin_right = 876.0
margin_bottom = 464.0 margin_bottom = 462.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
columns = 2 columns = 2
@ -137,7 +137,7 @@ margin_right = 876.0
margin_bottom = 422.0 margin_bottom = 422.0
[node name="Controls" type="MarginContainer" parent="PagedContent"] [node name="Controls" type="MarginContainer" parent="PagedContent"]
margin_top = 472.0 margin_top = 470.0
margin_right = 876.0 margin_right = 876.0
margin_bottom = 502.0 margin_bottom = 502.0
custom_constants/margin_right = 2 custom_constants/margin_right = 2
@ -149,13 +149,13 @@ custom_constants/margin_bottom = 2
margin_left = 2.0 margin_left = 2.0
margin_top = 2.0 margin_top = 2.0
margin_right = 874.0 margin_right = 874.0
margin_bottom = 28.0 margin_bottom = 30.0
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
[node name="Button2" type="Button" parent="PagedContent/Controls/HBoxContainer"] [node name="Button2" type="Button" parent="PagedContent/Controls/HBoxContainer"]
margin_right = 434.0 margin_right = 434.0
margin_bottom = 26.269 margin_bottom = 28.269
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
text = "< Previous page" text = "< Previous page"
@ -173,7 +173,7 @@ valign = 1
[node name="Button" type="Button" parent="PagedContent/Controls/HBoxContainer"] [node name="Button" type="Button" parent="PagedContent/Controls/HBoxContainer"]
margin_left = 438.0 margin_left = 438.0
margin_right = 872.0 margin_right = 872.0
margin_bottom = 26.269 margin_bottom = 28.269
size_flags_horizontal = 3 size_flags_horizontal = 3
size_flags_vertical = 3 size_flags_vertical = 3
text = "Next page >" text = "Next page >"

View File

@ -0,0 +1,16 @@
extends PanelContainer
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

View File

@ -0,0 +1,184 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://ui/windows/TrainerWindow.gd" type="Script" id=1]
[ext_resource path="res://ui/theme/ui_theme.tres" type="Theme" id=2]
[node name="TrainerWindow" type="PanelContainer"]
anchor_right = 1.0
anchor_bottom = 1.0
size_flags_horizontal = 3
size_flags_vertical = 3
theme = ExtResource( 2 )
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="VBoxContainer" type="VBoxContainer" parent="."]
margin_left = 4.0
margin_top = 4.0
margin_right = 1020.0
margin_bottom = 596.0
[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"]
margin_right = 1016.0
margin_bottom = 34.0
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/PanelContainer"]
margin_left = 4.0
margin_top = 4.0
margin_right = 1012.0
margin_bottom = 30.0
[node name="Label" type="Label" parent="VBoxContainer/PanelContainer/HBoxContainer"]
margin_top = 5.0
margin_right = 974.0
margin_bottom = 20.0
size_flags_horizontal = 3
text = "Trainer"
[node name="Button" type="Button" parent="VBoxContainer/PanelContainer/HBoxContainer"]
margin_left = 978.0
margin_right = 1008.0
margin_bottom = 26.269
rect_min_size = Vector2( 30, 0 )
text = "X"
[node name="PanelContainer3" type="PanelContainer" parent="VBoxContainer"]
margin_top = 42.0
margin_right = 1016.0
margin_bottom = 296.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer/PanelContainer3"]
margin_left = 4.0
margin_top = 4.0
margin_right = 1012.0
margin_bottom = 250.0
size_flags_horizontal = 3
size_flags_vertical = 3
scroll_horizontal_enabled = false
[node name="Spells" type="VBoxContainer" parent="VBoxContainer/PanelContainer3/ScrollContainer"]
margin_right = 998.0
margin_bottom = 306.0
size_flags_horizontal = 3
custom_constants/separation = 2
[node name="Button" type="Button" parent="VBoxContainer/PanelContainer3/ScrollContainer/Spells"]
margin_right = 998.0
margin_bottom = 26.269
[node name="Button2" type="Button" parent="VBoxContainer/PanelContainer3/ScrollContainer/Spells"]
margin_top = 28.0
margin_right = 998.0
margin_bottom = 54.269
[node name="Button3" type="Button" parent="VBoxContainer/PanelContainer3/ScrollContainer/Spells"]
margin_top = 56.0
margin_right = 998.0
margin_bottom = 82.269
[node name="Button4" type="Button" parent="VBoxContainer/PanelContainer3/ScrollContainer/Spells"]
margin_top = 84.0
margin_right = 998.0
margin_bottom = 110.269
[node name="Button5" type="Button" parent="VBoxContainer/PanelContainer3/ScrollContainer/Spells"]
margin_top = 112.0
margin_right = 998.0
margin_bottom = 138.269
[node name="Button6" type="Button" parent="VBoxContainer/PanelContainer3/ScrollContainer/Spells"]
margin_top = 140.0
margin_right = 998.0
margin_bottom = 166.269
[node name="Button7" type="Button" parent="VBoxContainer/PanelContainer3/ScrollContainer/Spells"]
margin_top = 168.0
margin_right = 998.0
margin_bottom = 194.269
[node name="Button8" type="Button" parent="VBoxContainer/PanelContainer3/ScrollContainer/Spells"]
margin_top = 196.0
margin_right = 998.0
margin_bottom = 222.269
[node name="Button9" type="Button" parent="VBoxContainer/PanelContainer3/ScrollContainer/Spells"]
margin_top = 224.0
margin_right = 998.0
margin_bottom = 250.269
[node name="Button10" type="Button" parent="VBoxContainer/PanelContainer3/ScrollContainer/Spells"]
margin_top = 252.0
margin_right = 998.0
margin_bottom = 278.269
[node name="Button11" type="Button" parent="VBoxContainer/PanelContainer3/ScrollContainer/Spells"]
margin_top = 280.0
margin_right = 998.0
margin_bottom = 306.269
[node name="PanelContainer2" type="PanelContainer" parent="VBoxContainer"]
margin_top = 304.0
margin_right = 1016.0
margin_bottom = 558.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/PanelContainer2"]
margin_left = 4.0
margin_top = 4.0
margin_right = 1012.0
margin_bottom = 250.0
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/PanelContainer2/VBoxContainer"]
margin_right = 1008.0
margin_bottom = 223.0
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer"]
margin_right = 60.0
margin_bottom = 223.0
[node name="Icon" type="TextureRect" parent="VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer/VBoxContainer"]
margin_right = 60.0
margin_bottom = 60.0
rect_min_size = Vector2( 60, 60 )
[node name="Description" type="Label" parent="VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer"]
margin_left = 64.0
margin_right = 1008.0
margin_bottom = 223.0
size_flags_horizontal = 3
size_flags_vertical = 7
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer/PanelContainer2/VBoxContainer"]
margin_top = 231.0
margin_right = 1008.0
margin_bottom = 246.0
[node name="Label" type="Label" parent="VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer2"]
margin_right = 36.0
margin_bottom = 15.0
text = "Costs "
[node name="Price" type="Label" parent="VBoxContainer/PanelContainer2/VBoxContainer/HBoxContainer2"]
margin_left = 40.0
margin_right = 40.0
margin_bottom = 15.0
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
margin_top = 566.0
margin_right = 1016.0
margin_bottom = 592.0
alignment = 2
[node name="Train" type="Button" parent="VBoxContainer/HBoxContainer"]
margin_left = 916.0
margin_right = 1016.0
margin_bottom = 26.269
rect_min_size = Vector2( 100, 0 )
text = "Learn"