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:
parent
f69e4bdc9e
commit
bd90f28de8
|
@ -2,12 +2,13 @@ extends Node2D
|
|||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue