mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-12-15 18:04:42 -05:00
Merged "Scripts" and "Prefabs" folders into "src"
Made a new "src" folder that will contain the source code files, like all the GDScript and scene files. Please read this for more details: https://www.gdquest.com/docs/guidelines/best-practices/godot-gdscript/ It made no sense to keep scenes separate from their scripts. More file organizing will follow soon.
This commit is contained in:
parent
5a54235604
commit
646fc19a70
63 changed files with 135 additions and 113 deletions
|
|
@ -1,29 +0,0 @@
|
|||
extends TextureButton
|
||||
|
||||
|
||||
var image : Image
|
||||
var image_size : Vector2
|
||||
var texture : ImageTexture
|
||||
|
||||
|
||||
func _ready():
|
||||
if image:
|
||||
image_size = image.get_size()
|
||||
texture = ImageTexture.new()
|
||||
texture.create_from_image(image, 0)
|
||||
|
||||
|
||||
func _on_PatternButton_pressed() -> void:
|
||||
if Global.pattern_window_position == "left":
|
||||
Global.pattern_left_image = image
|
||||
Global.left_fill_pattern_container.get_child(0).get_child(0).texture = texture
|
||||
Global.left_fill_pattern_container.get_child(2).get_child(1).max_value = image_size.x - 1
|
||||
Global.left_fill_pattern_container.get_child(3).get_child(1).max_value = image_size.y - 1
|
||||
|
||||
elif Global.pattern_window_position == "right":
|
||||
Global.pattern_right_image = image
|
||||
Global.right_fill_pattern_container.get_child(0).get_child(0).texture = texture
|
||||
Global.right_fill_pattern_container.get_child(2).get_child(1).max_value = image_size.x - 1
|
||||
Global.right_fill_pattern_container.get_child(3).get_child(1).max_value = image_size.y - 1
|
||||
|
||||
Global.patterns_popup.hide()
|
||||
Loading…
Add table
Add a link
Reference in a new issue