mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-26 02:34:43 -04:00
Added pattern offset - Closes #130
This commit is contained in:
parent
768a1e7b8f
commit
7bac0ff8f4
7 changed files with 168 additions and 38 deletions
|
@ -245,15 +245,22 @@ func import_patterns(priority_ordered_search_path: Array) -> void:
|
|||
pattern_button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
|
||||
Global.patterns_popup.get_node("ScrollContainer/PatternContainer").add_child(pattern_button)
|
||||
|
||||
Global.pattern_left_image = Global.patterns[0]
|
||||
var pattern_left_tex := ImageTexture.new()
|
||||
pattern_left_tex.create_from_image(Global.pattern_left_image, 0)
|
||||
Global.left_fill_pattern_container.get_child(0).get_child(0).texture = pattern_left_tex
|
||||
if Global.patterns.size() > 0:
|
||||
var image_size = Global.patterns[0].get_size()
|
||||
|
||||
Global.pattern_right_image = Global.patterns[0]
|
||||
var pattern_right_tex := ImageTexture.new()
|
||||
pattern_right_tex.create_from_image(Global.pattern_right_image, 0)
|
||||
Global.right_fill_pattern_container.get_child(0).get_child(0).texture = pattern_right_tex
|
||||
Global.pattern_left_image = Global.patterns[0]
|
||||
var pattern_left_tex := ImageTexture.new()
|
||||
pattern_left_tex.create_from_image(Global.pattern_left_image, 0)
|
||||
Global.left_fill_pattern_container.get_child(0).get_child(0).texture = pattern_left_tex
|
||||
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
|
||||
|
||||
Global.pattern_right_image = Global.patterns[0]
|
||||
var pattern_right_tex := ImageTexture.new()
|
||||
pattern_right_tex.create_from_image(Global.pattern_right_image, 0)
|
||||
Global.right_fill_pattern_container.get_child(0).get_child(0).texture = pattern_right_tex
|
||||
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
|
||||
|
||||
|
||||
func import_gpl(path : String) -> Palette:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue