1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-19 01:29:49 +00:00

Show tile indices when pressing Control

This commit is contained in:
Emmanouil Papadeas 2024-11-23 01:51:26 +02:00
parent f69e4bdc9e
commit bd90f28de8
2 changed files with 4 additions and 3 deletions

View file

@ -2,12 +2,13 @@ extends Node2D
func _input(event: InputEvent) -> void:
queue_redraw()
if event.is_action("ctrl"):
queue_redraw()
func _draw() -> void:
var current_cel := Global.current_project.get_current_cel()
if current_cel is CelTileMap:
if current_cel is CelTileMap and Input.is_action_pressed("ctrl"):
var tilemap_cel := current_cel as CelTileMap
for i in tilemap_cel.indices.size():
var x := float(tilemap_cel.tileset.tile_size.x) * (i % tilemap_cel.indices_x)

View file

@ -3,8 +3,8 @@ extends PanelContainer
enum TileEditingMode { MANUAL, AUTO, STACK }
var current_tileset: TileSetCustom
static var tile_editing_mode := TileEditingMode.AUTO
var current_tileset: TileSetCustom
@onready var h_flow_container: HFlowContainer = $VBoxContainer/ScrollContainer/HFlowContainer