.
This commit is contained in:
parent
3c4e3642ca
commit
9469c63d81
5 changed files with 38 additions and 20 deletions
|
|
@ -8,7 +8,7 @@ func _ready() -> void:
|
|||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
func _process(_delta: float) -> void:
|
||||
var mouse: = get_viewport().get_mouse_position()
|
||||
var size: = get_viewport().get_visible_rect().size
|
||||
if (mouse.x < (0.10*size.x)):
|
||||
|
|
@ -24,13 +24,17 @@ func _process(delta: float) -> void:
|
|||
func _input(event):
|
||||
if event is InputEventMouseButton:
|
||||
if event.button_index == MOUSE_BUTTON_WHEEL_UP and event.pressed:
|
||||
|
||||
zoom.x +=1
|
||||
zoom.y +=1
|
||||
|
||||
elif event.button_index == MOUSE_BUTTON_WHEEL_DOWN and event.pressed:
|
||||
|
||||
if zoom.x - 1 < 1:
|
||||
zoom.x = 1
|
||||
else:
|
||||
zoom.x -= 1
|
||||
if zoom.y - 1 < 1:
|
||||
zoom.y = 1
|
||||
else:
|
||||
zoom.y -= 1
|
||||
|
||||
|
||||
|
|
|
|||
12
game.tscn
Normal file
12
game.tscn
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[gd_scene format=3 uid="uid://dkui3dlb4vu1c"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bdk1r2u8clllr" path="res://map.tscn" id="1_e2o6t"]
|
||||
[ext_resource type="PackedScene" uid="uid://d06w1wtct0mfs" path="res://test/test_economy.tscn" id="2_feb5d"]
|
||||
|
||||
[node name="Game" type="Node2D" unique_id=1791439508]
|
||||
|
||||
[node name="map" parent="." unique_id=575553336 instance=ExtResource("1_e2o6t")]
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1213874033]
|
||||
|
||||
[node name="TestEconomy" parent="CanvasLayer" unique_id=629898212 instance=ExtResource("2_feb5d")]
|
||||
|
|
@ -3,15 +3,12 @@
|
|||
[ext_resource type="Script" uid="uid://bkptc7j6c1r7p" path="res://gui/currency_inspector_panel.gd" id="1_tj5vo"]
|
||||
[ext_resource type="Texture2D" uid="uid://bplvus0ytk2f8" path="res://thumbnails/beer.png" id="2_p4bd1"]
|
||||
|
||||
[node name="CurrencyInspectorPanel" type="Control" unique_id=169191981]
|
||||
custom_minimum_size = Vector2(0, 100)
|
||||
layout_mode = 3
|
||||
[node name="CurrencyInspectorPanel" type="Panel" unique_id=1489159816]
|
||||
custom_minimum_size = Vector2(500, 100)
|
||||
anchors_preset = 11
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -188.0
|
||||
offset_right = -188.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_tj5vo")
|
||||
|
|
@ -19,14 +16,10 @@ script = ExtResource("1_tj5vo")
|
|||
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=362599487]
|
||||
custom_minimum_size = Vector2(400, 0)
|
||||
custom_maximum_size = Vector2(400, -1)
|
||||
layout_mode = 1
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -253.0
|
||||
offset_right = 47.0
|
||||
offset_bottom = 149.0
|
||||
grow_horizontal = 2
|
||||
layout_mode = 0
|
||||
offset_left = 50.0
|
||||
offset_right = 450.0
|
||||
offset_bottom = 503.0
|
||||
|
||||
[node name="InspectedCurrency" type="Label" parent="VBoxContainer" unique_id=1206438498]
|
||||
unique_name_in_owner = true
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ config_version=5
|
|||
|
||||
[application]
|
||||
|
||||
run/main_scene="uid://d06w1wtct0mfs"
|
||||
run/main_scene="uid://dkui3dlb4vu1c"
|
||||
config/features=PackedStringArray("4.7")
|
||||
|
||||
[autoload]
|
||||
|
|
@ -133,5 +133,6 @@ dialogic_default_action={
|
|||
|
||||
[rendering]
|
||||
|
||||
textures/canvas_textures/default_texture_filter=0
|
||||
rendering_device/driver.windows="d3d12"
|
||||
renderer/rendering_method="gl_compatibility"
|
||||
|
|
|
|||
|
|
@ -19,8 +19,13 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
script = ExtResource("1_s48qe")
|
||||
|
||||
[node name="ProductionChart" parent="." unique_id=1301678172 instance=ExtResource("2_jd86c")]
|
||||
[node name="ScrollContainer2" type="ScrollContainer" parent="." unique_id=872959271]
|
||||
layout_mode = 0
|
||||
offset_right = 432.0
|
||||
offset_bottom = 297.0
|
||||
|
||||
[node name="ProductionChart" parent="ScrollContainer2" unique_id=1301678172 instance=ExtResource("2_jd86c")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ScrollContainer" parent="." unique_id=587807919 instance=ExtResource("3_n4oyp")]
|
||||
layout_mode = 1
|
||||
|
|
@ -51,6 +56,7 @@ grow_horizontal = 0
|
|||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Control" unique_id=74649172]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
|
@ -71,6 +77,7 @@ text = "OpenInbox"
|
|||
layout_mode = 1
|
||||
|
||||
[node name="MemberInspectorPanel" parent="." unique_id=1641024074 instance=ExtResource("5_i7808")]
|
||||
custom_minimum_size = Vector2(0, 100)
|
||||
layout_mode = 1
|
||||
offset_left = -189.0
|
||||
offset_right = -189.0
|
||||
|
|
@ -79,6 +86,7 @@ offset_right = -189.0
|
|||
layout_mode = 1
|
||||
|
||||
[node name="MemberSprite" parent="." unique_id=283117283 instance=ExtResource("6_vua3v")]
|
||||
visible = false
|
||||
instance_shader_parameters/border_color = Color(1, 0, 0, 1)
|
||||
instance_shader_parameters/border_width = 0.16
|
||||
instance_shader_parameters/fill_color = Color(1, 0.7529412, 0.79607844, 1)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue