mirror of
https://github.com/Relintai/broken_seals.git
synced 2025-01-08 01:49:35 +01:00
Actionbars are now using built in control functionality for layout. Also Vsync is on now.
This commit is contained in:
parent
0755ceb74d
commit
582f2298f2
@ -248,7 +248,6 @@ gdscript/warnings/integer_division=false
|
|||||||
[display]
|
[display]
|
||||||
|
|
||||||
window/dpi/allow_hidpi=true
|
window/dpi/allow_hidpi=true
|
||||||
window/vsync/use_vsync=false
|
|
||||||
window/handheld/orientation="sensor_landscape"
|
window/handheld/orientation="sensor_landscape"
|
||||||
window/stretch/mode="2d"
|
window/stretch/mode="2d"
|
||||||
window/stretch/aspect="expand"
|
window/stretch/aspect="expand"
|
||||||
|
@ -8,28 +8,10 @@ export (PackedScene) var action_bar_entry_scene
|
|||||||
export (NodePath) var child_container_path
|
export (NodePath) var child_container_path
|
||||||
var child_container
|
var child_container
|
||||||
|
|
||||||
# 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() -> void:
|
func _ready() -> void:
|
||||||
child_container = get_node(child_container_path)
|
child_container = get_node(child_container_path)
|
||||||
# pass # Replace with function body.
|
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
||||||
#func _process(delta):
|
|
||||||
# pass
|
|
||||||
|
|
||||||
func set_actionbar_entry(action_bar_entry : ActionBarEntry, player: Entity) -> void:
|
func set_actionbar_entry(action_bar_entry : ActionBarEntry, player: Entity) -> void:
|
||||||
#rect_size = Vector2(action_bar_entry.size, (action_bar_entry.size) * action_bar_entry.slot_num)
|
|
||||||
#set_anchors_preset(Control.PRESET_BOTTOM_RIGHT, false)
|
|
||||||
#margin_left = action_bar_entry.action_bar_id * -(action_bar_entry.size + 5) - 10
|
|
||||||
|
|
||||||
margin_top = - ((action_bar_entry.size) * action_bar_entry.slot_num)
|
|
||||||
#margin_bottom = 0
|
|
||||||
margin_right = -((action_bar_entry.action_bar_id - 1) * action_bar_entry.size)
|
|
||||||
margin_left = -((action_bar_entry.action_bar_id) * action_bar_entry.size)
|
|
||||||
|
|
||||||
for i in range(action_bar_entry.slot_num):
|
for i in range(action_bar_entry.slot_num):
|
||||||
var b : ActionBarButtonEntry = action_bar_entry.get_button_for_slotid(i)
|
var b : ActionBarButtonEntry = action_bar_entry.get_button_for_slotid(i)
|
||||||
|
@ -3,14 +3,15 @@
|
|||||||
[ext_resource path="res://ui/actionbars/ActionBarEntry.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://ui/actionbars/ActionBarEntry.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://ui/actionbars/ActionBar.gd" type="Script" id=2]
|
[ext_resource path="res://ui/actionbars/ActionBar.gd" type="Script" id=2]
|
||||||
|
|
||||||
[node name="ActionBar" type="Control"]
|
[node name="ActionBar" type="VBoxContainer"]
|
||||||
anchor_left = 1.0
|
anchor_left = 1.0
|
||||||
anchor_top = 1.0
|
anchor_top = 1.0
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
margin_left = -63.0
|
margin_left = -40.0
|
||||||
margin_top = -580.0
|
margin_top = -553.0
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
custom_constants/separation = 0
|
||||||
script = ExtResource( 2 )
|
script = ExtResource( 2 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_use_anchors_": false
|
"_edit_use_anchors_": false
|
||||||
@ -18,13 +19,15 @@ __meta__ = {
|
|||||||
action_bar_entry_scene = ExtResource( 1 )
|
action_bar_entry_scene = ExtResource( 1 )
|
||||||
child_container_path = NodePath("GridContainer")
|
child_container_path = NodePath("GridContainer")
|
||||||
|
|
||||||
[node name="GridContainer" type="GridContainer" parent="."]
|
[node name="Control" type="Control" parent="."]
|
||||||
anchor_right = 1.0
|
margin_right = 40.0
|
||||||
anchor_bottom = 1.0
|
margin_bottom = 553.0
|
||||||
mouse_filter = 2
|
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
|
||||||
|
[node name="GridContainer" type="GridContainer" parent="."]
|
||||||
|
margin_top = 553.0
|
||||||
|
margin_right = 40.0
|
||||||
|
margin_bottom = 553.0
|
||||||
custom_constants/vseparation = 0
|
custom_constants/vseparation = 0
|
||||||
__meta__ = {
|
custom_constants/hseparation = 0
|
||||||
"_edit_use_anchors_": false
|
|
||||||
}
|
|
||||||
|
@ -6,12 +6,10 @@
|
|||||||
[ext_resource path="res://ui/theme/actionbar_dynamicfont.tres" type="DynamicFont" id=5]
|
[ext_resource path="res://ui/theme/actionbar_dynamicfont.tres" type="DynamicFont" id=5]
|
||||||
|
|
||||||
[node name="ActionBarEntry" type="TouchButton"]
|
[node name="ActionBarEntry" type="TouchButton"]
|
||||||
margin_top = 1.0
|
margin_right = 46.0
|
||||||
margin_right = 70.0
|
margin_bottom = 46.0
|
||||||
margin_bottom = 71.0
|
rect_min_size = Vector2( 46, 46 )
|
||||||
focus_mode = 0
|
focus_mode = 0
|
||||||
size_flags_horizontal = 3
|
|
||||||
size_flags_vertical = 3
|
|
||||||
theme = ExtResource( 3 )
|
theme = ExtResource( 3 )
|
||||||
shortcut_in_tooltip = false
|
shortcut_in_tooltip = false
|
||||||
action_mode = 0
|
action_mode = 0
|
||||||
@ -43,8 +41,8 @@ __meta__ = {
|
|||||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer"]
|
[node name="TextureRect" type="TextureRect" parent="MarginContainer"]
|
||||||
margin_left = 2.0
|
margin_left = 2.0
|
||||||
margin_top = 2.0
|
margin_top = 2.0
|
||||||
margin_right = 68.0
|
margin_right = 44.0
|
||||||
margin_bottom = 68.0
|
margin_bottom = 44.0
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
@ -319,15 +319,17 @@ enabled_focus_mode = 0
|
|||||||
keep_pressed_outside = true
|
keep_pressed_outside = true
|
||||||
text = "M"
|
text = "M"
|
||||||
|
|
||||||
[node name="Actionbars" type="Control" parent="GUI"]
|
[node name="Actionbars" type="HBoxContainer" parent="GUI"]
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
custom_constants/separation = 0
|
||||||
|
alignment = 2
|
||||||
script = ExtResource( 8 )
|
script = ExtResource( 8 )
|
||||||
__meta__ = {
|
__meta__ = {
|
||||||
"_edit_lock_": true
|
"_edit_use_anchors_": false
|
||||||
}
|
}
|
||||||
actionbar_scene = ExtResource( 14 )
|
actionbar_scene = ExtResource( 14 )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user