This commit is contained in:
Torsten 2025-11-21 08:45:53 +01:00
parent 8b18fca47e
commit 4b8417ceb6
11 changed files with 35 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Before After
Before After

View file

@ -127,6 +127,7 @@ size_flags_vertical = 3
metadata/_edit_use_anchors_ = true
[node name="Camera2D" type="Camera2D" parent="."]
unique_name_in_owner = true
anchor_mode = 0
editor_draw_limits = true
editor_draw_drag_margin = true
@ -271,7 +272,8 @@ text = "MapName"
horizontal_alignment = 2
vertical_alignment = 1
[node name="TextureButtonUp" type="TextureButton" parent="UI/MenuTop"]
[node name="ScrollButtonUp" type="TextureButton" parent="UI/MenuTop"]
unique_name_in_owner = true
clip_contents = true
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
@ -280,7 +282,8 @@ texture_normal = ExtResource("9_e5fbg")
ignore_texture_size = true
stretch_mode = 4
[node name="TextureButtonDown" type="TextureButton" parent="UI/MenuTop"]
[node name="ScrollButtonDown" type="TextureButton" parent="UI/MenuTop"]
unique_name_in_owner = true
clip_contents = true
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
@ -289,7 +292,8 @@ texture_normal = ExtResource("10_26b7d")
ignore_texture_size = true
stretch_mode = 4
[node name="TextureButtonLeft" type="TextureButton" parent="UI/MenuTop"]
[node name="ScrollButtonLeft" type="TextureButton" parent="UI/MenuTop"]
unique_name_in_owner = true
clip_contents = true
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
@ -298,7 +302,8 @@ texture_normal = ExtResource("11_33jd8")
ignore_texture_size = true
stretch_mode = 4
[node name="TextureButtonRight" type="TextureButton" parent="UI/MenuTop"]
[node name="ScrollButtonRight" type="TextureButton" parent="UI/MenuTop"]
unique_name_in_owner = true
clip_contents = true
custom_minimum_size = Vector2(32, 32)
layout_mode = 2

View file

@ -3,6 +3,7 @@ extends Node
@onready var vbox_palette: VBoxContainer = %PaletteContainer
@onready var ground_map = %GroundMapLayer
@onready var map_menu_container = %MapMenuContainer
@onready var camera_2d = %Camera2D
var content = null
var coord2tilename = {}
@ -175,3 +176,19 @@ func load_map_from():
func _on_load_map_from(full_filename):
%ResourceSaver.loadMap(full_filename)
func scroll_up():
var tile_width = ground_map.tile_set.tile_size.x
camera_2d.position.y -= tile_width
func scroll_down():
var tile_width = ground_map.tile_set.tile_size.x
camera_2d.position.y += tile_width
func scroll_left():
var tile_width = ground_map.tile_set.tile_size.x
camera_2d.position.x -= tile_width
func scroll_right():
var tile_width = ground_map.tile_set.tile_size.x
camera_2d.position.x += tile_width

View file

@ -10,6 +10,11 @@ extends Node
@onready var map_cursor_timer:Timer = %MapCursorTimer
@onready var menu_top:HBoxContainer = %MenuTop
@onready var scroll_button_up = %ScrollButtonUp
@onready var scroll_button_down = %ScrollButtonDown
@onready var scroll_button_left = %ScrollButtonLeft
@onready var scroll_button_right = %ScrollButtonRight
signal selected_map_for_loading(map_file_name:String)
func _ready():
@ -25,6 +30,10 @@ func _ready():
map_menu.mouse_entered.connect(map_cursor_timer.disable_cursor)
map_menu.mouse_exited.connect(map_cursor_timer.enable_cursor)
scroll_button_up.pressed.connect(map_manager.scroll_up)
scroll_button_down.pressed.connect(map_manager.scroll_down)
scroll_button_left.pressed.connect(map_manager.scroll_left)
scroll_button_right.pressed.connect(map_manager.scroll_right)
load_settings()
func load_settings():

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 6 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 714 B

Before After
Before After