mirror of
https://github.com/tonytins/citylimits.git
synced 2025-03-15 12:21:22 +00:00
City name and game speed options
- Added city name and game speed options to the right side of the top bar. - HBox was renamed to CityStatus
This commit is contained in:
parent
cabd5d8817
commit
bb607c208a
2 changed files with 51 additions and 13 deletions
60
src/gui.tscn
60
src/gui.tscn
|
@ -3,28 +3,66 @@
|
|||
[node name="GUI" type="Control"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="GPanel" type="Panel" parent="."]
|
||||
anchor_right = 1.0
|
||||
margin_bottom = 23.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="HBox" type="HBoxContainer" parent="GPanel"]
|
||||
anchor_right = 1.0
|
||||
margin_top = 2.0
|
||||
margin_bottom = 22.0
|
||||
alignment = 2
|
||||
[node name="CityMenus" type="HBoxContainer" parent="GPanel"]
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
margin_left = 3.0
|
||||
margin_top = -10.0
|
||||
margin_right = 166.0
|
||||
margin_bottom = 10.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CurrencyLbl" type="Label" parent="GPanel/HBox"]
|
||||
margin_left = 1003.0
|
||||
[node name="CityNameLbl" type="Label" parent="GPanel/CityMenus"]
|
||||
margin_top = 3.0
|
||||
margin_right = 1011.0
|
||||
margin_right = 66.0
|
||||
margin_bottom = 17.0
|
||||
text = "City Name"
|
||||
|
||||
[node name="GameSpeed" type="MenuButton" parent="GPanel/CityMenus"]
|
||||
margin_left = 70.0
|
||||
margin_right = 163.0
|
||||
margin_bottom = 20.0
|
||||
text = "Game Speed"
|
||||
items = [ "Slow", null, 0, false, false, 0, 0, null, "", false, "Medium", null, 0, false, false, 1, 0, null, "", false, "Fast", null, 0, false, false, 2, 0, null, "", false ]
|
||||
|
||||
[node name="CityStatus" type="HBoxContainer" parent="GPanel"]
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
margin_left = -276.0
|
||||
margin_top = -9.5
|
||||
margin_right = -4.0
|
||||
margin_bottom = 10.5
|
||||
alignment = 2
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="CurrencyLbl" type="Label" parent="GPanel/CityStatus"]
|
||||
margin_left = 251.0
|
||||
margin_top = 3.0
|
||||
margin_right = 259.0
|
||||
margin_bottom = 17.0
|
||||
text = "$"
|
||||
|
||||
[node name="MoneyLbl" type="Label" parent="GPanel/HBox"]
|
||||
margin_left = 1015.0
|
||||
[node name="MoneyLbl" type="Label" parent="GPanel/CityStatus"]
|
||||
margin_left = 263.0
|
||||
margin_top = 3.0
|
||||
margin_right = 1024.0
|
||||
margin_right = 272.0
|
||||
margin_bottom = 17.0
|
||||
text = "#"
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ var terrian_cap = 0.3
|
|||
|
||||
func _process(delta):
|
||||
|
||||
$GUI/GPanel/HBox/MoneyLbl.text = str(bank.budget)
|
||||
$GUI/GPanel/CityStatus/MoneyLbl.text = str(bank.budget)
|
||||
|
||||
func _input(event):
|
||||
pass
|
||||
|
@ -39,4 +39,4 @@ func make_water():
|
|||
if $Terrian.get_cell(x, y):
|
||||
$Water.set_cell(x, y, 0)
|
||||
|
||||
$Water.update_bitmask_region(Vector2(0.0, 0.0), Vector2(map_size.x, map_size.y))
|
||||
$Water.update_bitmask_region(Vector2(0.0, 0.0), Vector2(map_size.x, map_size.y))
|
||||
|
|
Loading…
Add table
Reference in a new issue