challenge-editor/scene/new_scene/main.gd

21 lines
472 B
GDScript3
Raw Permalink Normal View History

2024-11-27 20:28:51 +08:00
extends Control
@export var texture_button_need_click_mask:Array[TextureButton]=[]
@export var button_offset_triger_arr:Array[ButtonOffsetTrigerResource]
func init_texture_button_click_mask():
for i in texture_button_need_click_mask:
var bitmap=BitMap.new()
bitmap.create_from_image_alpha(i.texture_hover.get_image())
i.texture_click_mask=bitmap
func _ready() -> void:
init_texture_button_click_mask()
for i in button_offset_triger_arr:
i.open(self)