mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
The touch controls are also a module now.
This commit is contained in:
parent
c6e4c8f4f0
commit
4ea4478158
@ -130,6 +130,11 @@ _global_script_classes=[ {
|
||||
"path": "res://voxelman/debug/TestVoxelMesher.gd"
|
||||
}, {
|
||||
"base": "GameModule",
|
||||
"class": "UIGuiChildModule",
|
||||
"language": "GDScript",
|
||||
"path": "res://scripts/game_modules/ui_gui_child_module.gd"
|
||||
}, {
|
||||
"base": "GameModule",
|
||||
"class": "UIWindowModule",
|
||||
"language": "GDScript",
|
||||
"path": "res://scripts/game_modules/ui_window_module.gd"
|
||||
@ -159,6 +164,7 @@ _global_script_class_icons={
|
||||
"TVVoxelChunk": "",
|
||||
"TVVoxelMesher": "",
|
||||
"TestVoxelMesher": "",
|
||||
"UIGuiChildModule": "",
|
||||
"UIWindowModule": ""
|
||||
}
|
||||
Node="input/actionbar_5_11"
|
||||
|
15
game/scripts/game_modules/ui_gui_child_module.gd
Normal file
15
game/scripts/game_modules/ui_gui_child_module.gd
Normal file
@ -0,0 +1,15 @@
|
||||
extends GameModule
|
||||
class_name UIGuiChildModule
|
||||
|
||||
export(PackedScene) var scene : PackedScene
|
||||
export(bool) var hide : bool = false
|
||||
|
||||
func on_request_instance(what : int, node : Node) -> void:
|
||||
if what == DataManager.PLAYER_UI_INSTANCE:
|
||||
var sc = scene.instance()
|
||||
|
||||
node.gui_base.add_child(sc)
|
||||
|
||||
if hide:
|
||||
sc.hide()
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=32 format=2]
|
||||
[gd_scene load_steps=30 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]
|
||||
@ -6,13 +6,11 @@
|
||||
[ext_resource path="res://ui/errorframe/ErrorFrame.tscn" type="PackedScene" id=4]
|
||||
[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/touch_pad/TurnPanel.gd" type="Script" id=7]
|
||||
[ext_resource path="res://ui/actionbars/Actionbars.gd" type="Script" id=8]
|
||||
[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]
|
||||
[ext_resource path="res://ui/windows/TalentWindow.tscn" type="PackedScene" id=11]
|
||||
[ext_resource path="res://ui/unitframes/TargetUnitframe.tscn" type="PackedScene" id=12]
|
||||
[ext_resource path="res://ui/touch_pad/analog.tscn" type="PackedScene" id=13]
|
||||
[ext_resource path="res://ui/actionbars/ActionBar.tscn" type="PackedScene" id=14]
|
||||
[ext_resource path="res://ui/bags/Bag.tscn" type="PackedScene" id=15]
|
||||
[ext_resource path="res://ui/castbar/Castbar.tscn" type="PackedScene" id=16]
|
||||
@ -50,134 +48,6 @@ __meta__ = {
|
||||
}
|
||||
child_controls = [ NodePath("Unitframes"), NodePath("Actionbars"), NodePath("Buttons"), NodePath("Castbar"), NodePath("AuraFrame"), NodePath("IngameMenu/KeybindWindow"), NodePath("IngameMenu/InterfaceOptions") ]
|
||||
|
||||
[node name="TouchTargetControls" type="MarginContainer" parent="GUI"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
custom_constants/margin_right = 272
|
||||
custom_constants/margin_top = 481
|
||||
custom_constants/margin_left = 60
|
||||
custom_constants/margin_bottom = 41
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="GUI/TouchTargetControls"]
|
||||
margin_left = 60.0
|
||||
margin_top = 481.0
|
||||
margin_right = 752.0
|
||||
margin_bottom = 559.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 7
|
||||
size_flags_vertical = 7
|
||||
|
||||
[node name="Control" type="Control" parent="GUI/TouchTargetControls/HBoxContainer"]
|
||||
margin_right = 603.0
|
||||
margin_bottom = 78.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
size_flags_stretch_ratio = 12.0
|
||||
|
||||
[node name="TargetPad" type="Control" parent="GUI/TouchTargetControls/HBoxContainer"]
|
||||
margin_left = 611.0
|
||||
margin_right = 692.0
|
||||
margin_bottom = 78.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
size_flags_stretch_ratio = 1.6
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Analog" parent="GUI/TouchTargetControls/HBoxContainer/TargetPad" instance=ExtResource( 13 )]
|
||||
position = Vector2( 40, 30 )
|
||||
padname = "TargetPad"
|
||||
|
||||
[node name="TouchMovementControls" type="MarginContainer" parent="GUI"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
custom_constants/margin_top = 200
|
||||
__meta__ = {
|
||||
"_edit_group_": true,
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="GUI/TouchMovementControls"]
|
||||
margin_top = 200.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 7
|
||||
size_flags_vertical = 7
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="GUI/TouchMovementControls/HBoxContainer"]
|
||||
margin_right = 323.0
|
||||
margin_bottom = 400.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 1.4
|
||||
|
||||
[node name="Control" type="Control" parent="GUI/TouchMovementControls/HBoxContainer/VBoxContainer"]
|
||||
margin_right = 323.0
|
||||
margin_bottom = 196.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="TouchPad" type="Control" parent="GUI/TouchMovementControls/HBoxContainer/VBoxContainer"]
|
||||
margin_top = 204.0
|
||||
margin_right = 323.0
|
||||
margin_bottom = 400.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
|
||||
[node name="Analog" parent="GUI/TouchMovementControls/HBoxContainer/VBoxContainer/TouchPad" instance=ExtResource( 13 )]
|
||||
position = Vector2( 107.368, 94.2101 )
|
||||
padname = "TouchPad"
|
||||
|
||||
[node name="Control" type="Control" parent="GUI/TouchMovementControls/HBoxContainer"]
|
||||
margin_left = 327.0
|
||||
margin_right = 558.0
|
||||
margin_bottom = 400.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="GUI/TouchMovementControls/HBoxContainer"]
|
||||
margin_left = 562.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 400.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 2.0
|
||||
|
||||
[node name="Control" type="Control" parent="GUI/TouchMovementControls/HBoxContainer/VBoxContainer2"]
|
||||
margin_right = 462.0
|
||||
margin_bottom = 150.0
|
||||
mouse_filter = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="TurnPanel" type="Control" parent="GUI/TouchMovementControls/HBoxContainer/VBoxContainer2"]
|
||||
margin_top = 158.0
|
||||
margin_right = 462.0
|
||||
margin_bottom = 400.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
size_flags_stretch_ratio = 1.6
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="GUI/TouchMovementControls/HBoxContainer/VBoxContainer2/TurnPanel"]
|
||||
position = Vector2( -600, -200 )
|
||||
script = ExtResource( 7 )
|
||||
listenerNodePath = "../../../../../../.."
|
||||
|
||||
[node name="Buttons" type="HBoxContainer" parent="GUI"]
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
92
game/ui/touch_controls/TouchMovementControls.tscn
Normal file
92
game/ui/touch_controls/TouchMovementControls.tscn
Normal file
@ -0,0 +1,92 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://ui/touch_pad/TurnPanel.gd" type="Script" id=1]
|
||||
[ext_resource path="res://ui/touch_pad/analog.gd" type="Script" id=2]
|
||||
[ext_resource path="res://ui/touch_pad/analog.tscn" type="PackedScene" id=3]
|
||||
|
||||
[node name="TouchMovementControls" type="MarginContainer"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
custom_constants/margin_top = 200
|
||||
__meta__ = {
|
||||
"_edit_group_": true,
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
margin_top = 200.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 7
|
||||
size_flags_vertical = 7
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
|
||||
margin_right = 323.0
|
||||
margin_bottom = 400.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 1.4
|
||||
|
||||
[node name="Control" type="Control" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_right = 323.0
|
||||
margin_bottom = 196.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="TouchPad" type="Control" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_top = 204.0
|
||||
margin_right = 323.0
|
||||
margin_bottom = 400.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
|
||||
[node name="Analog" type="Node2D" parent="HBoxContainer/VBoxContainer/TouchPad" instance=ExtResource( 3 )]
|
||||
position = Vector2( 107.368, 94.2101 )
|
||||
script = ExtResource( 2 )
|
||||
__meta__ = {
|
||||
"__editor_plugin_screen__": "2D"
|
||||
}
|
||||
isDynamicallyShowing = true
|
||||
padname = "TouchPad"
|
||||
|
||||
[node name="Control" type="Control" parent="HBoxContainer"]
|
||||
margin_left = 327.0
|
||||
margin_right = 558.0
|
||||
margin_bottom = 400.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="HBoxContainer"]
|
||||
margin_left = 562.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 400.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
size_flags_stretch_ratio = 2.0
|
||||
|
||||
[node name="Control" type="Control" parent="HBoxContainer/VBoxContainer2"]
|
||||
margin_right = 462.0
|
||||
margin_bottom = 150.0
|
||||
mouse_filter = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="TurnPanel" type="Control" parent="HBoxContainer/VBoxContainer2"]
|
||||
margin_top = 158.0
|
||||
margin_right = 462.0
|
||||
margin_bottom = 400.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
size_flags_stretch_ratio = 1.6
|
||||
|
||||
[node name="Node2D" type="Node2D" parent="HBoxContainer/VBoxContainer2/TurnPanel"]
|
||||
position = Vector2( -600, -200 )
|
||||
script = ExtResource( 1 )
|
||||
listenerNodePath = "../../../../../../.."
|
55
game/ui/touch_controls/TouchTargetControls.tscn
Normal file
55
game/ui/touch_controls/TouchTargetControls.tscn
Normal file
@ -0,0 +1,55 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://ui/touch_pad/analog.gd" type="Script" id=1]
|
||||
[ext_resource path="res://ui/touch_pad/analog.tscn" type="PackedScene" id=2]
|
||||
|
||||
[node name="TouchTargetControls" type="MarginContainer"]
|
||||
visible = false
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
custom_constants/margin_right = 272
|
||||
custom_constants/margin_top = 481
|
||||
custom_constants/margin_left = 60
|
||||
custom_constants/margin_bottom = 41
|
||||
__meta__ = {
|
||||
"_edit_group_": true
|
||||
}
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
margin_left = 60.0
|
||||
margin_top = 481.0
|
||||
margin_right = 752.0
|
||||
margin_bottom = 559.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 7
|
||||
size_flags_vertical = 7
|
||||
|
||||
[node name="Control" type="Control" parent="HBoxContainer"]
|
||||
margin_right = 607.0
|
||||
margin_bottom = 78.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
size_flags_stretch_ratio = 12.0
|
||||
|
||||
[node name="TargetPad" type="Control" parent="HBoxContainer"]
|
||||
margin_left = 611.0
|
||||
margin_right = 692.0
|
||||
margin_bottom = 78.0
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 15
|
||||
size_flags_vertical = 15
|
||||
size_flags_stretch_ratio = 1.6
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Analog" type="Node2D" parent="HBoxContainer/TargetPad" instance=ExtResource( 2 )]
|
||||
position = Vector2( 40, 30 )
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"__editor_plugin_screen__": "2D"
|
||||
}
|
||||
isDynamicallyShowing = true
|
||||
padname = "TargetPad"
|
10
game/ui/touch_controls/game_module.tres
Normal file
10
game/ui/touch_controls/game_module.tres
Normal file
@ -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/touch_controls/TouchMovementControls.tscn" type="PackedScene" id=2]
|
||||
|
||||
[resource]
|
||||
script = ExtResource( 1 )
|
||||
enabled = true
|
||||
scene = ExtResource( 2 )
|
||||
hide = false
|
Loading…
Reference in New Issue
Block a user