Changed resource spawning

added interact functionality
temp added zoom with scroll wheel
This commit is contained in:
2024-02-27 10:21:28 -06:00
parent 5467e044a7
commit f87b1cfa9a
17 changed files with 163 additions and 41 deletions

View File

@@ -11,7 +11,7 @@ func _on_resource_manager_changed_resource(changed: ResourceChangedSignal) -> vo
if not _resource_displays.has(resource):
var atlas_tex := AtlasTexture.new()
atlas_tex.atlas = SCIFI_TILESHEET
atlas_tex.region = Rect2(128 * resource.atlas_location.x, 128 * resource.atlas_location.y, 128, 128)
atlas_tex.region = Rect2(Grid.GRID_SIZE * resource.atlas_location.x, Grid.GRID_SIZE * resource.atlas_location.y, Grid.GRID_SIZE, Grid.GRID_SIZE)
var img := TextureRect.new()
img.texture = atlas_tex
img.expand_mode = TextureRect.EXPAND_FIT_WIDTH_PROPORTIONAL