From 9469c63d819d5b6e0e36672e6474d0b5b1acc7a2 Mon Sep 17 00:00:00 2001 From: Spencer Killen Date: Sat, 26 Sep 2026 21:13:20 -0600 Subject: [PATCH] . --- CameraMove.gd | 14 +++++++++----- game.tscn | 12 ++++++++++++ gui/currency_inspector_panel.tscn | 19 ++++++------------- project.godot | 3 ++- test/test_economy.tscn | 10 +++++++++- 5 files changed, 38 insertions(+), 20 deletions(-) create mode 100644 game.tscn diff --git a/CameraMove.gd b/CameraMove.gd index 501c2ab..808bc43 100644 --- a/CameraMove.gd +++ b/CameraMove.gd @@ -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,14 +24,18 @@ 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: - - zoom.x -=1 - zoom.y -=1 + if zoom.x - 1 < 1: + zoom.x = 1 + else: + zoom.x -= 1 + if zoom.y - 1 < 1: + zoom.y = 1 + else: + zoom.y -= 1 diff --git a/game.tscn b/game.tscn new file mode 100644 index 0000000..5fb05fb --- /dev/null +++ b/game.tscn @@ -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")] diff --git a/gui/currency_inspector_panel.tscn b/gui/currency_inspector_panel.tscn index d437f63..d0f05e3 100644 --- a/gui/currency_inspector_panel.tscn +++ b/gui/currency_inspector_panel.tscn @@ -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 diff --git a/project.godot b/project.godot index 2fc66c8..ab6cd35 100644 --- a/project.godot +++ b/project.godot @@ -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" diff --git a/test/test_economy.tscn b/test/test_economy.tscn index 505b07b..ecc5fe5 100644 --- a/test/test_economy.tscn +++ b/test/test_economy.tscn @@ -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)