From 96a32aa92806fbedd84bfff8d3757a12ee53be63 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 22 Sep 2020 16:47:09 +0200 Subject: [PATCH] AuraFrame is also a module now. --- game/ui/auraframe/AuraFrame.gd | 2 +- game/ui/auraframe/AuraFrame.tscn | 35 ++++++++++++++++-------------- game/ui/auraframe/game_module.tres | 10 +++++++++ game/ui/player_ui/player_ui.tscn | 7 +----- 4 files changed, 31 insertions(+), 23 deletions(-) create mode 100644 game/ui/auraframe/game_module.tres diff --git a/game/ui/auraframe/AuraFrame.gd b/game/ui/auraframe/AuraFrame.gd index 55101f8a..a0391f71 100644 --- a/game/ui/auraframe/AuraFrame.gd +++ b/game/ui/auraframe/AuraFrame.gd @@ -1,4 +1,4 @@ -extends MarginContainer +extends Control # Copyright (c) 2019-2020 Péter Magyar # diff --git a/game/ui/auraframe/AuraFrame.tscn b/game/ui/auraframe/AuraFrame.tscn index e7682d56..3290e0ab 100644 --- a/game/ui/auraframe/AuraFrame.tscn +++ b/game/ui/auraframe/AuraFrame.tscn @@ -3,38 +3,41 @@ [ext_resource path="res://ui/auraframe/AuraFrame.gd" type="Script" id=1] [ext_resource path="res://ui/auraframe/AuraEntry.tscn" type="PackedScene" id=2] -[node name="AuraFrame" type="MarginContainer"] -anchor_left = 1.0 +[node name="AuraFrame" type="Control"] anchor_right = 1.0 -margin_left = -376.0 -margin_right = -1.0 -margin_bottom = 160.0 +anchor_bottom = 1.0 mouse_filter = 2 script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false } aura_entry_scene = ExtResource( 2 ) -buff_container_path = NodePath("VBoxContainer/Buffs") -debuff_container_path = NodePath("VBoxContainer/Debuffs") +buff_container_path = NodePath("MarginContainer/VBoxContainer/Buffs") +debuff_container_path = NodePath("MarginContainer/VBoxContainer/Debuffs") -[node name="VBoxContainer" type="VBoxContainer" parent="."] -margin_right = 375.0 -margin_bottom = 160.0 +[node name="MarginContainer" type="MarginContainer" parent="."] +anchor_left = 1.0 +anchor_right = 1.0 +margin_left = -335.0 +margin_bottom = 157.0 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +margin_right = 335.0 +margin_bottom = 157.0 mouse_filter = 2 -[node name="Buffs" type="GridContainer" parent="VBoxContainer"] -margin_right = 375.0 +[node name="Buffs" type="GridContainer" parent="MarginContainer/VBoxContainer"] +margin_right = 335.0 margin_bottom = 76.0 mouse_filter = 2 size_flags_horizontal = 3 size_flags_vertical = 3 columns = 9 -[node name="Debuffs" type="GridContainer" parent="VBoxContainer"] -margin_top = 84.0 -margin_right = 375.0 -margin_bottom = 160.0 +[node name="Debuffs" type="GridContainer" parent="MarginContainer/VBoxContainer"] +margin_top = 80.0 +margin_right = 335.0 +margin_bottom = 157.0 mouse_filter = 2 size_flags_horizontal = 3 size_flags_vertical = 3 diff --git a/game/ui/auraframe/game_module.tres b/game/ui/auraframe/game_module.tres new file mode 100644 index 00000000..bf19038b --- /dev/null +++ b/game/ui/auraframe/game_module.tres @@ -0,0 +1,10 @@ +[gd_resource type="Resource" load_steps=3 format=2] + +[ext_resource path="res://scripts/game_modules/ui_gui_child_module.gd" type="Script" id=1] +[ext_resource path="res://ui/auraframe/AuraFrame.tscn" type="PackedScene" id=2] + +[resource] +script = ExtResource( 1 ) +enabled = true +scene = ExtResource( 2 ) +hide = false diff --git a/game/ui/player_ui/player_ui.tscn b/game/ui/player_ui/player_ui.tscn index 8418219b..d41915bb 100644 --- a/game/ui/player_ui/player_ui.tscn +++ b/game/ui/player_ui/player_ui.tscn @@ -1,9 +1,8 @@ -[gd_scene load_steps=26 format=2] +[gd_scene load_steps=25 format=2] [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://player/Unitframes.gd" type="Script" id=3] -[ext_resource path="res://ui/auraframe/AuraFrame.tscn" type="PackedScene" id=5] [ext_resource path="res://ui/theme/menu_icon.tres" type="Texture" id=6] [ext_resource path="res://ui/buttons/Buttons.gd" type="Script" id=9] [ext_resource path="res://ui/theme/ui_theme.tres" type="Theme" id=10] @@ -277,10 +276,6 @@ margin_right = 151.0 [node name="TargetUnitframe" parent="GUI/Unitframes" instance=ExtResource( 12 )] visible = false -[node name="AuraFrame" parent="GUI" instance=ExtResource( 5 )] -margin_left = -331.0 -margin_bottom = 123.0 - [node name="Castbar" parent="GUI" instance=ExtResource( 16 )] visible = false