Moved Action UI
parent
0a46a5fc10
commit
a74145fc57
|
@ -67,9 +67,9 @@ public class Game : Spatial {
|
||||||
Debug.Assert(_woodCountLabel != null);
|
Debug.Assert(_woodCountLabel != null);
|
||||||
_goldCountLabel = _gameUi.GetNode<Label>("TopRight/GoldCount");
|
_goldCountLabel = _gameUi.GetNode<Label>("TopRight/GoldCount");
|
||||||
Debug.Assert(_goldCountLabel != null);
|
Debug.Assert(_goldCountLabel != null);
|
||||||
_walkActionButton = _gameUi.GetNode<Button>("BottomCenter/WalkActionButton");
|
_walkActionButton = _gameUi.GetNode<Button>("Actions/WalkActionButton");
|
||||||
Debug.Assert(_walkActionButton != null);
|
Debug.Assert(_walkActionButton != null);
|
||||||
_buildActionButton = _gameUi.GetNode<Button>("BottomCenter/BuildActionButton");
|
_buildActionButton = _gameUi.GetNode<Button>("Actions/BuildActionButton");
|
||||||
Debug.Assert(_buildActionButton != null);
|
Debug.Assert(_buildActionButton != null);
|
||||||
|
|
||||||
// scene nodes
|
// scene nodes
|
||||||
|
@ -216,7 +216,9 @@ public class Game : Spatial {
|
||||||
if (_actionMode == ActionMode.Building) {
|
if (_actionMode == ActionMode.Building) {
|
||||||
Workbench workbench = (Workbench)_workbenchScene.Instance();
|
Workbench workbench = (Workbench)_workbenchScene.Instance();
|
||||||
|
|
||||||
|
workbench.Connect("EntityClicked", this, nameof(OnEntityClicked));
|
||||||
workbench.Transform = tile.GlobalTransform;
|
workbench.Transform = tile.GlobalTransform;
|
||||||
|
|
||||||
AddChild(workbench);
|
AddChild(workbench);
|
||||||
_world.MarkCellUnwalkable(tile.Cell);
|
_world.MarkCellUnwalkable(tile.Cell);
|
||||||
|
|
||||||
|
|
|
@ -135,17 +135,12 @@ align = 1
|
||||||
root_node = NodePath("../..")
|
root_node = NodePath("../..")
|
||||||
anims/FlashLabel = SubResource( 25 )
|
anims/FlashLabel = SubResource( 25 )
|
||||||
|
|
||||||
[node name="BottomCenter" type="HBoxContainer" parent="GameUI"]
|
[node name="Actions" type="HBoxContainer" parent="GameUI"]
|
||||||
anchor_left = 0.5
|
margin_left = 10.0
|
||||||
anchor_top = 1.0
|
margin_top = 10.0
|
||||||
anchor_right = 0.5
|
margin_bottom = 40.0
|
||||||
anchor_bottom = 1.0
|
|
||||||
margin_left = -61.0
|
|
||||||
margin_top = -46.0
|
|
||||||
margin_right = 59.0
|
|
||||||
margin_bottom = -6.0
|
|
||||||
|
|
||||||
[node name="WalkActionButton" type="Button" parent="GameUI/BottomCenter"]
|
[node name="WalkActionButton" type="Button" parent="GameUI/Actions"]
|
||||||
margin_right = 58.0
|
margin_right = 58.0
|
||||||
margin_bottom = 40.0
|
margin_bottom = 40.0
|
||||||
rect_min_size = Vector2( 40, 40 )
|
rect_min_size = Vector2( 40, 40 )
|
||||||
|
@ -154,7 +149,7 @@ pressed = true
|
||||||
group = ExtResource( 13 )
|
group = ExtResource( 13 )
|
||||||
text = "Walk"
|
text = "Walk"
|
||||||
|
|
||||||
[node name="BuildActionButton" type="Button" parent="GameUI/BottomCenter"]
|
[node name="BuildActionButton" type="Button" parent="GameUI/Actions"]
|
||||||
margin_left = 62.0
|
margin_left = 62.0
|
||||||
margin_right = 120.0
|
margin_right = 120.0
|
||||||
margin_bottom = 40.0
|
margin_bottom = 40.0
|
||||||
|
|
Loading…
Reference in New Issue