mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-26 13:34:42 -04:00
Drag and drop palette files to open them
This commit is contained in:
parent
f7cc9a8104
commit
25d9aca0c4
4 changed files with 11 additions and 7 deletions
|
@ -13,15 +13,12 @@ onready var texture_rect : TextureRect = $VBoxContainer/CenterContainer/TextureR
|
|||
onready var spritesheet_options = $VBoxContainer/HBoxContainer/SpritesheetOptions
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
spritesheet_options.get_node("HorizontalFrames").max_value = min(spritesheet_options.get_node("HorizontalFrames").max_value, image.get_size().x)
|
||||
spritesheet_options.get_node("VerticalFrames").max_value = min(spritesheet_options.get_node("VerticalFrames").max_value, image.get_size().y)
|
||||
|
||||
|
||||
func _on_PreviewDialog_about_to_show() -> void:
|
||||
var img_texture := ImageTexture.new()
|
||||
img_texture.create_from_image(image)
|
||||
texture_rect.texture = img_texture
|
||||
spritesheet_options.get_node("HorizontalFrames").max_value = min(spritesheet_options.get_node("HorizontalFrames").max_value, image.get_size().x)
|
||||
spritesheet_options.get_node("VerticalFrames").max_value = min(spritesheet_options.get_node("VerticalFrames").max_value, image.get_size().y)
|
||||
|
||||
|
||||
func _on_PreviewDialog_popup_hide() -> void:
|
||||
|
|
|
@ -7,6 +7,7 @@ margin_right = 200.0
|
|||
margin_bottom = 70.0
|
||||
rect_min_size = Vector2( 550, 70 )
|
||||
popup_exclusive = true
|
||||
window_title = "Import Options"
|
||||
resizable = true
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue