First commit 🎉

This commit is contained in:
Tony Bark 2025-07-17 01:49:18 -04:00
commit 43ea213f9b
728 changed files with 37080 additions and 0 deletions

View file

@ -0,0 +1,237 @@
@tool
extends "res://addons/popochiu/editor/main_dock/popochiu_row/popochiu_row.gd"
signal group_selected(type: int)
signal deleted(file_path: String)
enum AudioOptions {
DELETE = MenuOptions.DELETE,
ADD_TO_MUSIC,
ADD_TO_SFX,
ADD_TO_VOICE,
ADD_TO_UI
}
const DELETE_AUDIO_CUE_MSG = "This will remove the [b]%s[/b] resource. Calls to this audio in \
scripts will not work anymore. This action cannot be reversed. Continue?"
const DELETE_AUDIO_CUE_ASK = "Delete [b]%s[/b] file too? (cannot be reversed)"
const DELETE_AUDIO_FILE_MSG = "[b]%s[/b] will be deleted in the file system. This action cannot be \
reversed. Continue?"
# Only used by rows that represent an audio file
var file_name: String
var audio_cue: AudioCue
var cue_group: String
var stream_player: AudioStreamPlayer
var audio_tab: VBoxContainer = null
var is_playing := false :
set = set_is_playing
var current_playback_position := 0.0
@onready var play_btn: Button = %Play
@onready var stop_btn: Button = %Stop
#region Godot ######################################################################################
func _ready() -> void:
super()
# Assign icons
play_btn.icon = get_theme_icon("MainPlay", "EditorIcons")
stop_btn.icon = get_theme_icon("Stop", "EditorIcons")
# Connect to children's signals
play_btn.pressed.connect(play)
stop_btn.pressed.connect(stop)
# Remove group options if this is a PopochiuAudioCue
if is_instance_valid(audio_cue):
menu_popup.remove_item(menu_popup.get_item_index(AudioOptions.ADD_TO_MUSIC))
menu_popup.remove_item(menu_popup.get_item_index(AudioOptions.ADD_TO_SFX))
menu_popup.remove_item(menu_popup.get_item_index(AudioOptions.ADD_TO_VOICE))
menu_popup.remove_item(menu_popup.get_item_index(AudioOptions.ADD_TO_UI))
else:
label.text = file_name
#endregion
#region Virtual ####################################################################################
func _remove_object() -> void:
_delete_dialog = PopochiuEditorHelper.DELETE_CONFIRMATION_SCENE.instantiate()
if is_instance_valid(audio_cue):
_delete_dialog.title = "Remove %s cue" % audio_cue.resource_name
_delete_dialog.message = DELETE_AUDIO_CUE_MSG % audio_cue.resource_name
_delete_dialog.ask = DELETE_AUDIO_CUE_ASK % audio_cue.audio.resource_path
_delete_dialog.on_confirmed = _remove_from_popochiu
else:
_delete_dialog.title = "Delete %s" % file_name
_delete_dialog.message = DELETE_AUDIO_FILE_MSG % path
_delete_dialog.on_confirmed = _delete_from_file_system
PopochiuEditorHelper.show_delete_confirmation(_delete_dialog)
#endregion
#region Public #####################################################################################
func select() -> void:
EditorInterface.edit_resource(audio_cue)
super()
func play() -> void:
if is_playing:
# Pause the audio stream
is_playing = false
return
if is_instance_valid(audio_tab.last_played):
# Stop the currently playing row (which is different from this one)
audio_tab.last_played.stop()
if not is_instance_valid(audio_cue):
# If the row does not have a [PopochiuAudioCue] assigned, then it is the row of an audio
# file. Therefore, the [AudioStream] to play will be its own [path]
var stream: AudioStream = load(path)
stream.loop = false
stream_player.stream = stream
else:
# Otherwise, the [AudioStream] to play will be that of the audio file associated with this
# [PopochiuAudioCue.audio]
stream_player.stream = audio_cue.audio
# The values of [AudioStream.pitch_scale] and [AudioStream.volume_db] should be taken from
# the information stored in the [PopochiuAudioCue].
stream_player.pitch_scale = audio_cue.get_pitch_scale()
stream_player.volume_db = audio_cue.volume
is_playing = true
func stop() -> void:
is_playing = false
current_playback_position = 0.0
label.add_theme_color_override("font_color", dflt_font_color)
stream_player.stream = null
audio_tab.last_played = null
#endregion
#region SetGet #####################################################################################
func set_is_playing(value: bool) -> void:
is_playing = value
if is_playing:
if not stream_player.finished.is_connected(stop):
stream_player.finished.connect(stop)
stream_player.play(current_playback_position)
audio_tab.last_played = self
else:
current_playback_position = stream_player.get_playback_position()
if stream_player.playing:
stream_player.stop()
stream_player.finished.disconnect(stop)
play_btn.icon = play_btn.get_theme_icon("Pause" if is_playing else "MainPlay", "EditorIcons")
#endregion
#region Private ####################################################################################
func _get_menu_cfg() -> Array:
return [
{
id = AudioOptions.ADD_TO_MUSIC,
icon = preload("res://addons/popochiu/icons/music.png"),
label = "Add to Music"
},
{
id = AudioOptions.ADD_TO_SFX,
icon = preload("res://addons/popochiu/icons/sfx.png"),
label = "Add to Sound Effects"
},
{
id = AudioOptions.ADD_TO_VOICE,
icon = preload("res://addons/popochiu/icons/voice.png"),
label = "Add to Voices"
},
{
id = AudioOptions.ADD_TO_UI,
icon = preload("res://addons/popochiu/icons/ui.png"),
label = "Add to Graphic Interface"
}
] + super()
func _menu_item_pressed(id: int) -> void:
match id:
AudioOptions.ADD_TO_MUSIC:
group_selected.emit(PopochiuResources.AudioTypes.MUSIC)
AudioOptions.ADD_TO_SFX:
group_selected.emit(PopochiuResources.AudioTypes.SOUND_EFFECT)
AudioOptions.ADD_TO_VOICE:
group_selected.emit(PopochiuResources.AudioTypes.VOICE)
AudioOptions.ADD_TO_UI:
group_selected.emit(PopochiuResources.AudioTypes.UI)
_:
super(id)
func _remove_from_popochiu() -> void:
# Remove the AudioCue from popochiu_data.cfg ---------------------------------------------------
var group_data: Array = PopochiuResources.get_data_value(
"audio", cue_group, []
)
if group_data:
group_data.erase(audio_cue.resource_path)
if group_data.is_empty():
PopochiuResources.erase_data_value("audio", cue_group)
else:
group_data.sort_custom(
func (a: String, b: String) -> bool:
return PopochiuUtils.sort_by_file_name(a, b)
)
PopochiuResources.set_data_value("audio", cue_group, group_data)
# Remove the AudioCue from the A singleton -----------------------------------------------------
PopochiuResources.remove_audio_autoload(cue_group, name, audio_cue.resource_path)
# Delete the file in its corresponding group in Audio tab
deleted.emit(audio_cue.audio.resource_path)
if _delete_dialog.check_box.button_pressed:
_delete_from_file_system()
else:
queue_free()
func _delete_from_file_system() -> void:
# Delete the .tres file from the file system
var err: int = DirAccess.remove_absolute(path)
if err != OK:
PopochiuUtils.print_error("Couldn't delete audio cue %s (err_code: %d)" % [path, err])
return
# Delete the audio file linked to the cue
var audio_file_path := audio_cue.audio.resource_path
err = DirAccess.remove_absolute(audio_file_path)
if err != OK:
PopochiuUtils.print_error(
"Couldn't delete audio file %s (err_code: %d)" % [audio_file_path, err]
)
return
# Do this so Godot removes the .import file of the audio file
EditorInterface.get_resource_filesystem().update_file(audio_file_path)
EditorInterface.get_resource_filesystem().scan()
EditorInterface.get_resource_filesystem().scan_sources()
queue_free()
#endregion

View file

@ -0,0 +1 @@
uid://lhhhuwe3ye1f

View file

@ -0,0 +1,62 @@
[gd_scene load_steps=9 format=3 uid="uid://ds6ojs55q50ud"]
[ext_resource type="PackedScene" uid="uid://dwtwuqw2hpdpe" path="res://addons/popochiu/editor/main_dock/popochiu_row/popochiu_row.tscn" id="1_i2mx0"]
[ext_resource type="Script" path="res://addons/popochiu/editor/main_dock/popochiu_row/audio_row/popochiu_audio_row.gd" id="2_24kri"]
[ext_resource type="Texture2D" uid="uid://d1dnmfkhscb7r" path="res://addons/popochiu/icons/music.png" id="3_hi2e1"]
[ext_resource type="Texture2D" uid="uid://cfh1uxtaff0ks" path="res://addons/popochiu/icons/sfx.png" id="4_1iw68"]
[ext_resource type="Texture2D" uid="uid://6ewpl4v0td2h" path="res://addons/popochiu/icons/voice.png" id="5_ray7p"]
[ext_resource type="Texture2D" uid="uid://528j2rksws2c" path="res://addons/popochiu/icons/ui.png" id="6_1bl3m"]
[sub_resource type="Image" id="Image_dygia"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 93, 93, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_v80gh"]
image = SubResource("Image_dygia")
[node name="PopochiuAudioRow" instance=ExtResource("1_i2mx0")]
script = ExtResource("2_24kri")
[node name="Label" parent="HBoxContainer" index="0"]
text = ""
[node name="Play" type="Button" parent="Panel/ButtonsContainer" index="0"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 1
icon = SubResource("ImageTexture_v80gh")
flat = true
[node name="Stop" type="Button" parent="Panel/ButtonsContainer" index="1"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 1
icon = SubResource("ImageTexture_v80gh")
flat = true
[node name="BtnMenu" parent="Panel/ButtonsContainer" index="2"]
icon = SubResource("ImageTexture_v80gh")
item_count = 6
popup/item_0/text = "Add to Music"
popup/item_0/icon = ExtResource("3_hi2e1")
popup/item_0/id = 1
popup/item_1/text = "Add to Sound effects"
popup/item_1/icon = ExtResource("4_1iw68")
popup/item_1/id = 2
popup/item_2/text = "Add to Voices"
popup/item_2/icon = ExtResource("5_ray7p")
popup/item_2/id = 3
popup/item_3/text = "Add to Graphic interface"
popup/item_3/icon = ExtResource("6_1bl3m")
popup/item_3/id = 4
popup/item_4/text = ""
popup/item_4/id = -1
popup/item_4/separator = true
popup/item_5/text = "Remove"
popup/item_5/icon = SubResource("ImageTexture_v80gh")
popup/item_5/id = 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bw3ie8wfwa2i2"
path="res://.godot/imported/add_to_core.png-52def14ca6e499df1e292c93f01c4349.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/popochiu/editor/main_dock/popochiu_row/images/add_to_core.png"
dest_files=["res://.godot/imported/add_to_core.png-52def14ca6e499df1e292c93f01c4349.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bahipxbrrss0o"
path="res://.godot/imported/delete.png-27dd9adc116bbf3fc8b20a99d1331933.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/popochiu/editor/main_dock/popochiu_row/images/delete.png"
dest_files=["res://.godot/imported/delete.png-27dd9adc116bbf3fc8b20a99d1331933.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://wm7qycjntmfr"
path="res://.godot/imported/open.png-eb4e739212f91fcaedbead9efc5f731f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://addons/popochiu/editor/main_dock/popochiu_row/images/open.png"
dest_files=["res://.godot/imported/open.png-eb4e739212f91fcaedbead9efc5f731f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -0,0 +1,79 @@
@tool
extends "res://addons/popochiu/editor/main_dock/popochiu_row/object_row/popochiu_object_row.gd"
enum CharacterOptions {
DELETE = MenuOptions.DELETE,
ADD_TO_CORE = Options.ADD_TO_CORE,
SET_AS_PC,
}
const TAG_ICON = preload("res://addons/popochiu/icons/player_character.png")
const STATE_TEMPLATE = "res://addons/popochiu/engine/templates/character_state_template.gd"
var is_pc := false : set = set_is_pc
#region Godot ######################################################################################
func _ready() -> void:
super()
# Assign icons
tag.texture = TAG_ICON
#endregion
#region Virtual ####################################################################################
func _get_state_template() -> Script:
return load(STATE_TEMPLATE)
func _clear_tag() -> void:
if is_pc:
is_pc = false
#endregion
#region SetGet #####################################################################################
func set_is_pc(value: bool) -> void:
is_pc = value
if is_pc:
PopochiuEditorHelper.signal_bus.pc_changed.emit(name)
tag.visible = value
menu_popup.set_item_disabled(menu_popup.get_item_index(CharacterOptions.SET_AS_PC), value)
#endregion
#region Private ####################################################################################
func _get_menu_cfg() -> Array:
return [
{
id = CharacterOptions.SET_AS_PC,
icon = TAG_ICON,
label = "Set as Player-controlled Character (PC)",
},
] + super()
func _menu_item_pressed(id: int) -> void:
match id:
CharacterOptions.SET_AS_PC:
self.is_pc = true
_:
super(id)
func _remove_from_core() -> void:
# Delete the object from Popochiu
PopochiuResources.remove_autoload_obj(PopochiuResources.C_SNGL, name)
PopochiuResources.erase_data_value("characters", str(name))
# Continue with the deletion flow
super()
#endregion

View file

@ -0,0 +1,15 @@
@tool
extends "res://addons/popochiu/editor/main_dock/popochiu_row/object_row/popochiu_object_row.gd"
#region Private ####################################################################################
func _remove_from_core() -> void:
# Delete the object from Popochiu
PopochiuResources.remove_autoload_obj(PopochiuResources.D_SNGL, name)
PopochiuResources.erase_data_value("dialogs", str(name))
# Continue with the deletion flow
super()
#endregion

View file

@ -0,0 +1,78 @@
@tool
extends "res://addons/popochiu/editor/main_dock/popochiu_row/object_row/popochiu_object_row.gd"
enum InventoryItemOptions {
DELETE = MenuOptions.DELETE,
ADD_TO_CORE = Options.ADD_TO_CORE,
START_WITH_IT,
}
const TAG_ICON = preload("res://addons/popochiu/icons/inventory_item_start.png")
const STATE_TEMPLATE = "res://addons/popochiu/engine/templates/inventory_item_state_template.gd"
var is_on_start := false : set = set_is_on_start
#region Godot ######################################################################################
func _ready() -> void:
super()
# Assign icons
tag.texture = TAG_ICON
#endregion
#region Virtual ####################################################################################
func _get_state_template() -> Script:
return load(STATE_TEMPLATE)
#endregion
#region SetGet #####################################################################################
func set_is_on_start(value: bool) -> void:
is_on_start = value
tag.visible = value
#endregion
#region Private ####################################################################################
func _get_menu_cfg() -> Array:
return [
{
id = InventoryItemOptions.START_WITH_IT,
icon = TAG_ICON,
label = "Start with it",
},
] + super()
func _menu_item_pressed(id: int) -> void:
match id:
InventoryItemOptions.START_WITH_IT:
var items: Array = PopochiuConfig.get_inventory_items_on_start()
var script_name := str(name)
if script_name in items:
items.erase(script_name)
else:
items.append(script_name)
PopochiuConfig.set_inventory_items_on_start(items)
self.is_on_start = script_name in items
_:
super(id)
func _remove_from_core() -> void:
# Delete the object from Popochiu
PopochiuResources.remove_autoload_obj(PopochiuResources.I_SNGL, name)
PopochiuResources.erase_data_value("inventory_items", str(name))
# Continue with the deletion flow
super()
#endregion

View file

@ -0,0 +1,334 @@
@tool
extends "res://addons/popochiu/editor/main_dock/popochiu_row/popochiu_row.gd"
## Row for the main object types: Room, Character, Inventory item, Dialog
enum Options {
DELETE = MenuOptions.DELETE,
ADD_TO_CORE,
}
const DELETE_MESSAGE = "This will remove the [b]%s[/b] object in [b]%s[/b] scene. Uses of this \
object in scripts will not work anymore. This action cannot be undone. Continue?"
const DELETE_ASK_MESSAGE = "Do you want to delete the [b]%s[/b] folder too?%s (cannot be reversed)"
const ADD_TO_CORE_ICON = preload(
"res://addons/popochiu/editor/main_dock/popochiu_row/images/add_to_core.png"
)
const AUDIO_FILE_TYPES = ["AudioStreamOggVorbis", "AudioStreamMP3", "AudioStreamWAV"]
@onready var btn_open: Button = %BtnOpen
@onready var btn_script: Button = %BtnScript
@onready var btn_state: Button = %BtnState
@onready var btn_state_script: Button = %BtnStateScript
#region Godot ######################################################################################
func _ready() -> void:
# Assign icons
btn_open.icon = get_theme_icon("InstanceOptions", "EditorIcons")
btn_script.icon = get_theme_icon("Script", "EditorIcons")
btn_state.icon = get_theme_icon("Object", "EditorIcons")
btn_state_script.icon = get_theme_icon("GDScript", "EditorIcons")
# Connect to signals and create the options for the menu
super()
# Connect to children's signals
btn_open.pressed.connect(_open)
btn_script.pressed.connect(_open_script)
btn_state.pressed.connect(_edit_state)
btn_state_script.pressed.connect(_open_state_script)
# Disable some options by default
var add_to_core_idx := menu_popup.get_item_index(Options.ADD_TO_CORE)
if add_to_core_idx >= 0:
menu_popup.set_item_disabled(add_to_core_idx, true)
#endregion
#region Virtual ####################################################################################
## Shows a confirmation popup to ask the developer if the Popochiu object should be removed only
## from the core, or from the file system too.
func _remove_object() -> void:
var location := _get_location()
# Look into the Object"s folder for audio files and AudioCues to show the developer that those
# files will be removed too.
var audio_files := _search_audio_files(
EditorInterface.get_resource_filesystem().get_filesystem_path(path.get_base_dir())
)
_delete_dialog = PopochiuEditorHelper.DELETE_CONFIRMATION_SCENE.instantiate()
_delete_dialog.title = "Remove %s from %s" % [name, location]
_delete_dialog.message = DELETE_MESSAGE % [name, location]
_delete_dialog.ask = DELETE_ASK_MESSAGE % [
path.get_base_dir(),
"" if audio_files.is_empty()
else " ([b]%d[/b] audio cues will be deleted)" % audio_files.size()
]
_delete_dialog.on_confirmed = _remove_from_core
PopochiuEditorHelper.show_delete_confirmation(_delete_dialog)
func _get_state_template() -> Script:
return null
func _get_location() -> String:
return "Popochiu"
#endregion
#region Public #####################################################################################
## Called to make the row appear semitransparent to indicate that the object is in the project
## (has a folder with files inside) but is not part of the [code]popochiu_data.cfg[/code] file nor
## its corresponding autoload (e.g., R, C, I, D). This can happen when one removes an object from
## the project without removing its files, or when adding objects from another project.
func show_as_not_in_core() -> void:
label.modulate.a = 0.5
menu_popup.set_item_disabled(menu_popup.get_item_index(Options.ADD_TO_CORE), false)
#endregion
#region Private ####################################################################################
func _get_menu_cfg() -> Array:
return [
{
id = Options.ADD_TO_CORE,
icon = ADD_TO_CORE_ICON,
label = "Add to Popochiu",
types = PopochiuResources.MAIN_TYPES
},
] + super()
func _menu_item_pressed(id: int) -> void:
match id:
Options.ADD_TO_CORE:
_add_object_to_core()
_:
super(id)
## Add this Object (Room, Character, InventoryItem, Dialog) to popochiu_data.cfg so it can be used
## by Popochiu.
func _add_object_to_core() -> void:
var target_array := ""
var resource: Resource
if ".tscn" in path:
resource = load(path.replace(".tscn", ".tres"))
else:
resource = load(path)
match type:
PopochiuResources.Types.ROOM:
target_array = "rooms"
PopochiuResources.Types.CHARACTER:
target_array = "characters"
PopochiuResources.Types.INVENTORY_ITEM:
target_array = "inventory_items"
PopochiuResources.Types.DIALOG:
target_array = "dialogs"
if PopochiuEditorHelper.add_resource_to_popochiu(target_array, resource) != OK:
PopochiuUtils.print_error("Couldn't add Object [b]%s[/b] to Popochiu." % str(name))
return
# Add the object to its corresponding singleton
PopochiuResources.update_autoloads(true)
label.modulate.a = 1.0
menu_popup.set_item_disabled(menu_popup.get_item_index(Options.ADD_TO_CORE), true)
## Selects the main file of the object in the FileSystem and opens it so that it can be edited.
func _open() -> void:
EditorInterface.select_file(path)
if ".tres" in path:
EditorInterface.edit_resource(load(path))
else:
EditorInterface.set_main_screen_editor("2D")
EditorInterface.open_scene_from_path(path)
select()
func _open_script() -> void:
var script_path := path
if ".tscn" in path:
# A room, character, inventory item, or prop
script_path = path.replace(".tscn", ".gd")
elif ".tres" in path:
# A dialog
script_path = path.replace(".tres", ".gd")
elif not ".gd" in path:
return
EditorInterface.select_file(script_path)
EditorInterface.set_main_screen_editor("Script")
EditorInterface.edit_script(load(script_path))
select()
func _edit_state() -> void:
EditorInterface.select_file(path.replace(".tscn", ".tres"))
EditorInterface.edit_resource(load(path.replace(".tscn", ".tres")))
select()
func _open_state_script() -> void:
var state := load(path.replace(".tscn", ".tres"))
EditorInterface.select_file(state.get_script().resource_path)
EditorInterface.set_main_screen_editor("Script")
EditorInterface.edit_resource(state.get_script())
select()
func _search_audio_files(dir: EditorFileSystemDirectory) -> Array:
var files := []
for idx in dir.get_subdir_count():
files.append_array(_search_audio_files(dir.get_subdir(idx)))
for idx in dir.get_file_count():
match dir.get_file_type(idx):
AUDIO_FILE_TYPES:
files.append(dir.get_file_path(idx))
return files
func _remove_from_core() -> void:
# Check if the files should be deleted in the file system
if _delete_dialog.check_box.button_pressed:
_delete_from_file_system()
elif type in PopochiuResources.MAIN_TYPES:
show_as_not_in_core()
var edited_scene: Node = EditorInterface.get_edited_scene_root()
if edited_scene and edited_scene.get("script_name") and edited_scene.script_name == name:
# If the open scene matches the object being deleted, skip saving the scene
queue_free()
return
EditorInterface.save_scene()
queue_free()
## Remove this object's directory (subfolders included) from the file system.
func _delete_from_file_system() -> void:
var object_dir: EditorFileSystemDirectory = \
EditorInterface.get_resource_filesystem().get_filesystem_path(path.get_base_dir())
# Remove files, sub folders and its files.
_recursive_delete(object_dir)
## Remove the `dir` directory from the system. For Godot to be able to delete a directory, it has to
## be empty, so this method first deletes the files from from the directory and each of its
## subdirectories.
func _recursive_delete(dir: EditorFileSystemDirectory) -> void:
if dir.get_file_count() > 0:
assert(
_delete_files(dir) == OK,
"[Popochiu] Error removing files in recursive elimination of %s" % dir.get_path()
)
if dir.get_subdir_count() > 0:
for folder_idx in dir.get_subdir_count():
# Check if there are more folders inside the folder or delete the files inside it before
# deleting the folder itself
_recursive_delete(dir.get_subdir(folder_idx))
assert(
DirAccess.remove_absolute(dir.get_path()) == OK,
"[Popochiu] Error removing folder in recursive elimination of %s" % dir.get_path()
)
EditorInterface.get_resource_filesystem().scan()
## Delete files within [param dir] directory. First, get the paths to each file, then delete them
## one by one calling [method EditorFileSystem.update_file], so that in case it's an imported file,
## its [b].import[/b] is also deleted.
func _delete_files(dir: EditorFileSystemDirectory) -> int:
# Stores the paths of the files to be deleted.
var files_paths := []
# Stores the paths of the audio resources to delete
var deleted_audios := []
for file_idx: int in dir.get_file_count():
match dir.get_file_type(file_idx):
AUDIO_FILE_TYPES:
deleted_audios.append(dir.get_file_path(file_idx))
"Resource":
var resource: Resource = load(dir.get_file_path(file_idx))
if not resource is AudioCue:
# If the resource is not an AudioCue, then it should be ignored for deletion
# in the game data
continue
# Delete the [PopochiuAudioCue] in the project data file and the A singleton
assert(
_delete_audio_cue_in_data(resource) == true,
"[Popochiu] Couldn't remove [b]%s[/b] during deletion of [b]%s[/b]." %
[resource.resource_path, dir.get_path()]
)
deleted_audios.append(resource.audio.resource_path)
files_paths.append(dir.get_file_path(file_idx))
for fp: String in files_paths:
var err: int = DirAccess.remove_absolute(fp)
if err != OK:
PopochiuUtils.print_error("Couldn't delete file %s. err_code:%d" % [err, fp])
return err
EditorInterface.get_resource_filesystem().scan()
# Delete the rows of audio files and the deleted AudioCues in the Audio tab
if not deleted_audios.is_empty():
PopochiuEditorHelper.signal_bus.audio_cues_deleted.emit(deleted_audios)
# Remove extra files (like .import)
for file_name: String in DirAccess.get_files_at(dir.get_path()):
DirAccess.remove_absolute(dir.get_path() + "/" + file_name)
EditorInterface.get_resource_filesystem().scan()
return OK
## Looks to which audio group corresponds [param audio_cue] and deletes it both from
## [code]popochiu_data.cfg[/code] and the [b]A[/b] singleton (which is the one used to allow code
## autocompletion related to [PopochiuAudioCue]s).
func _delete_audio_cue_in_data(audio_cue: AudioCue) -> bool:
# TODO: This could be improved a lot if each PopochiuAudioCue has a variable to store the group
# to which it corresponds to.
# Delete the [PopochiuAudioCue] in the popochiu_data.cfg
for cue_group in ["mx_cues", "sfx_cues", "vo_cues", "ui_cues"]:
var cues: Array = PopochiuResources.get_data_value("audio", cue_group, [])
if not cues.has(audio_cue.resource_path): continue
cues.erase(audio_cue.resource_path)
if PopochiuResources.set_data_value("audio", cue_group, cues) != OK:
return false
# Fix #59 : remove the [PopochiuAudioCue] from the [A] singleton
PopochiuResources.remove_audio_autoload(
cue_group, audio_cue.resource_name, audio_cue.resource_path
)
break
return true
#endregion

View file

@ -0,0 +1 @@
uid://dj0dw4jcynb3p

View file

@ -0,0 +1,58 @@
[gd_scene load_steps=5 format=3 uid="uid://dwbo3pl372ugo"]
[ext_resource type="PackedScene" uid="uid://dwtwuqw2hpdpe" path="res://addons/popochiu/editor/main_dock/popochiu_row/popochiu_row.tscn" id="1_xi41g"]
[ext_resource type="Script" path="res://addons/popochiu/editor/main_dock/popochiu_row/object_row/popochiu_object_row.gd" id="2_g05pm"]
[sub_resource type="Image" id="Image_15l6n"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 93, 93, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_12sj2"]
image = SubResource("Image_15l6n")
[node name="PopochiuMainObjectRow" instance=ExtResource("1_xi41g")]
script = ExtResource("2_g05pm")
[node name="Label" parent="HBoxContainer" index="0"]
text = "PopochiuMainObjectRow"
[node name="BtnOpen" type="Button" parent="Panel/ButtonsContainer" index="0"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 3
tooltip_text = "Open in Editor"
icon = SubResource("ImageTexture_12sj2")
flat = true
[node name="BtnScript" type="Button" parent="Panel/ButtonsContainer" index="1"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 3
tooltip_text = "Open in Script"
icon = SubResource("ImageTexture_12sj2")
flat = true
[node name="BtnState" type="Button" parent="Panel/ButtonsContainer" index="2"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 3
tooltip_text = "Open state"
icon = SubResource("ImageTexture_12sj2")
flat = true
[node name="BtnStateScript" type="Button" parent="Panel/ButtonsContainer" index="3"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 3
tooltip_text = "Open state Script"
icon = SubResource("ImageTexture_12sj2")
flat = true

View file

@ -0,0 +1,60 @@
@tool
extends "res://addons/popochiu/editor/main_dock/popochiu_row/object_row/popochiu_object_row.gd"
const PROP_TEMPLATE = "res://addons/popochiu/engine/templates/prop_template.gd"
var node_path := ""
#region Godot ######################################################################################
func _ready() -> void:
super()
if not FileAccess.file_exists(path.replace(".tscn", ".gd")):
btn_script.hide()
btn_state.hide()
btn_state_script.hide()
#endregion
#region Virtual ####################################################################################
func _get_location() -> String:
# Structure of path: "res://game/rooms/room_name/props/prop_name/"
# path split: [res:, popochiu, rooms, room_name, props, prop_name]
return "Room%s" % (path.split("/", false)[3]).to_pascal_case()
#endregion
#region Private ####################################################################################
func _remove_from_core() -> void:
var room_child_to_free: Node = null
if EditorInterface.get_edited_scene_root() is PopochiuRoom:
var opened_room: PopochiuRoom = EditorInterface.get_edited_scene_root()
match type:
PopochiuResources.Types.PROP:
room_child_to_free = opened_room.get_prop(str(name))
PopochiuResources.Types.HOTSPOT:
room_child_to_free = opened_room.get_hotspot(str(name))
PopochiuResources.Types.MARKER:
room_child_to_free = opened_room.get_marker(str(name))
PopochiuResources.Types.REGION:
room_child_to_free = opened_room.get_region(str(name))
PopochiuResources.Types.WALKABLE_AREA:
room_child_to_free = opened_room.get_walkable_area(str(name))
# Continue with the deletion flow
super()
# Fix #196: Remove the Node from the Room tree once the folder of the object has been deleted
# from the FileSystem (this applies to Props, Hotspots, Walkable areas and Regions).
if room_child_to_free:
room_child_to_free.queue_free()
EditorInterface.save_scene()
#endregion

View file

@ -0,0 +1,22 @@
[gd_scene load_steps=5 format=3 uid="uid://baei84pjb3fwj"]
[ext_resource type="PackedScene" uid="uid://dwbo3pl372ugo" path="res://addons/popochiu/editor/main_dock/popochiu_row/object_row/popochiu_object_row.tscn" id="1_yvb3l"]
[ext_resource type="Script" path="res://addons/popochiu/editor/main_dock/popochiu_row/object_row/room_object_row/popochiu_room_object_row.gd" id="2_ulg85"]
[sub_resource type="Image" id="Image_8gjpm"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 93, 93, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_4qvg7"]
image = SubResource("Image_8gjpm")
[node name="PopochiuRoomObjectRow" instance=ExtResource("1_yvb3l")]
script = ExtResource("2_ulg85")
[node name="BtnMenu" parent="Panel/ButtonsContainer" index="4"]
popup/item_1/icon = SubResource("ImageTexture_4qvg7")

View file

@ -0,0 +1,90 @@
@tool
extends "res://addons/popochiu/editor/main_dock/popochiu_row/object_row/popochiu_object_row.gd"
enum RoomOptions {
DELETE = MenuOptions.DELETE,
ADD_TO_CORE = Options.ADD_TO_CORE,
SET_AS_MAIN,
}
const STATE_TEMPLATE = "res://addons/popochiu/engine/templates/room_state_template.gd"
var is_main := false : set = set_is_main
@onready var btn_play: Button = %BtnPlay
#region Godot ######################################################################################
func _ready() -> void:
super()
# Assign icons
tag.texture = get_theme_icon("Heart", "EditorIcons")
btn_play.icon = get_theme_icon("MainPlay", "EditorIcons")
btn_play.pressed.connect(_play)
#endregion
#region Virtual ####################################################################################
func _get_state_template() -> Script:
return load(STATE_TEMPLATE)
func _clear_tag() -> void:
if is_main:
is_main = false
#endregion
#region SetGet #####################################################################################
func set_is_main(value: bool) -> void:
is_main = value
if is_main:
# Call this first since the favs will be cleared
PopochiuEditorHelper.signal_bus.main_scene_changed.emit(path)
tag.visible = value
menu_popup.set_item_disabled(menu_popup.get_item_index(RoomOptions.SET_AS_MAIN), value)
#endregion
#region Private ####################################################################################
func _get_menu_cfg() -> Array:
return [
{
id = RoomOptions.SET_AS_MAIN,
icon = get_theme_icon("Heart", "EditorIcons"),
label = "Set as Main scene",
},
] + super()
func _menu_item_pressed(id: int) -> void:
match id:
RoomOptions.SET_AS_MAIN:
is_main = true
_:
super(id)
## Plays the scene of the clicked row
func _play() -> void:
EditorInterface.select_file(path)
EditorInterface.play_custom_scene(path)
func _remove_from_core() -> void:
# Delete the object from Popochiu
PopochiuResources.remove_autoload_obj(PopochiuResources.R_SNGL, name)
PopochiuResources.erase_data_value("rooms", str(name))
# Continue with the deletion flow
super()
#endregion

View file

@ -0,0 +1 @@
uid://bbbtge112sbkf

View file

@ -0,0 +1,60 @@
[gd_scene load_steps=5 format=3 uid="uid://w3oki6lv6l7f"]
[ext_resource type="PackedScene" uid="uid://dwbo3pl372ugo" path="res://addons/popochiu/editor/main_dock/popochiu_row/object_row/popochiu_object_row.tscn" id="1_1hv2c"]
[ext_resource type="Script" path="res://addons/popochiu/editor/main_dock/popochiu_row/object_row/room_row/popochiu_room_row.gd" id="2_s306b"]
[sub_resource type="Image" id="Image_lkrau"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 93, 93, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_3an75"]
image = SubResource("Image_lkrau")
[node name="PopochiuRoomRow" instance=ExtResource("1_1hv2c")]
script = ExtResource("2_s306b")
[node name="Label" parent="HBoxContainer" index="0"]
text = "PopochiuRoomRow"
[node name="Tag" parent="HBoxContainer" index="1"]
texture = SubResource("ImageTexture_3an75")
[node name="BtnPlay" type="Button" parent="Panel/ButtonsContainer" index="0"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 3
tooltip_text = "Open in Editor"
icon = SubResource("ImageTexture_3an75")
flat = true
[node name="BtnOpen" parent="Panel/ButtonsContainer" index="1"]
icon = SubResource("ImageTexture_3an75")
[node name="BtnScript" parent="Panel/ButtonsContainer" index="2"]
icon = SubResource("ImageTexture_3an75")
[node name="BtnState" parent="Panel/ButtonsContainer" index="3"]
icon = SubResource("ImageTexture_3an75")
[node name="BtnStateScript" parent="Panel/ButtonsContainer" index="4"]
icon = SubResource("ImageTexture_3an75")
[node name="BtnMenu" parent="Panel/ButtonsContainer" index="5"]
icon = SubResource("ImageTexture_3an75")
item_count = 3
popup/item_0/text = "Set as Main scene"
popup/item_0/icon = SubResource("ImageTexture_3an75")
popup/item_0/id = 3
popup/item_1/text = ""
popup/item_1/id = -1
popup/item_1/separator = true
popup/item_2/text = "Remove"
popup/item_2/icon = SubResource("ImageTexture_3an75")
popup/item_2/id = 0
popup/item_2/disabled = true

View file

@ -0,0 +1,125 @@
@tool
extends HBoxContainer
## The row that is created for Rooms, Characters, Inventory items, Dialogs, Props, Hotspots, Regions,
## Walkable areas, and Markers in the dock.
signal clicked(node: HBoxContainer)
enum MenuOptions {
SEPARATOR = -1,
DELETE,
}
const SELECTED_FONT_COLOR = Color("706deb")
const AudioCue = preload("res://addons/popochiu/engine/audio_manager/audio_cue.gd")
var path := ""
var is_menu_hidden := false
var type := -1
var _delete_dialog: PopochiuEditorHelper.DeleteConfirmation = null
@onready var label: Label = %Label
@onready var tag: TextureRect = %Tag
@onready var btn_menu: MenuButton = %BtnMenu
@onready var menu_popup: PopupMenu = btn_menu.get_popup()
@onready var buttons_container: HBoxContainer = %ButtonsContainer
@onready var dflt_font_color: Color = label.get_theme_color("font_color")
#region Godot ######################################################################################
func _ready() -> void:
label.text = str(name)
tooltip_text = path
# Assign icons
btn_menu.icon = get_theme_icon("GuiTabMenuHl", "EditorIcons")
# Create the context menu based checked the type of Object this row represents
_create_menu()
tag.hide()
if is_menu_hidden:
btn_menu.hide()
gui_input.connect(_check_click)
menu_popup.id_pressed.connect(_menu_item_pressed)
#endregion
#region Virtual ####################################################################################
func _remove_object() -> void:
pass
func _clear_tag() -> void:
pass
#endregion
#region Public #####################################################################################
func select() -> void:
label.add_theme_color_override("font_color", SELECTED_FONT_COLOR)
clicked.emit(self)
func deselect() -> void:
label.add_theme_color_override("font_color", dflt_font_color)
func remove_menu_option(opt: int) -> void:
menu_popup.remove_item(menu_popup.get_item_index(opt))
func add_button(btn: Button) -> void:
buttons_container.add_child(btn)
func clear_tag() -> void:
if tag.visible:
tag.visible = false
_clear_tag()
#endregion
#region Private ####################################################################################
func _create_menu() -> void:
menu_popup.clear()
for option in _get_menu_cfg():
if typeof(option) == TYPE_INT and option == MenuOptions.SEPARATOR:
menu_popup.add_separator("", MenuOptions.SEPARATOR)
elif not option.has("types") or (option.has("types") and type in option.types):
menu_popup.add_icon_item(option.icon, option.label, option.id)
if menu_popup.item_count == 2:
menu_popup.remove_item(menu_popup.get_item_index(MenuOptions.SEPARATOR))
func _get_menu_cfg() -> Array:
return [
MenuOptions.SEPARATOR,
{
id = MenuOptions.DELETE,
icon = get_theme_icon("Remove", "EditorIcons"),
label = "Remove"
}
]
func _check_click(event: InputEvent) -> void:
if PopochiuUtils.get_click_or_touch_index(event) == MOUSE_BUTTON_LEFT:
EditorInterface.select_file(path)
select()
func _menu_item_pressed(id: int) -> void:
match id:
MenuOptions.DELETE:
_remove_object()
#endregion

View file

@ -0,0 +1 @@
uid://d23b7rumebs32

View file

@ -0,0 +1,76 @@
[gd_scene load_steps=6 format=3 uid="uid://dwtwuqw2hpdpe"]
[ext_resource type="Script" path="res://addons/popochiu/editor/main_dock/popochiu_row/popochiu_row.gd" id="1_pqknt"]
[sub_resource type="Image" id="Image_87j38"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 93, 93, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_4qvg7"]
image = SubResource("Image_87j38")
[sub_resource type="Image" id="Image_hcerf"]
data = {
"data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 94, 94, 127, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 231, 255, 94, 94, 54, 255, 94, 94, 57, 255, 93, 93, 233, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 93, 93, 41, 255, 255, 255, 0, 255, 255, 255, 0, 255, 97, 97, 42, 255, 93, 93, 233, 255, 93, 93, 232, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 44, 255, 255, 255, 0, 255, 97, 97, 42, 255, 97, 97, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 96, 96, 45, 255, 93, 93, 235, 255, 94, 94, 234, 255, 95, 95, 43, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 93, 93, 235, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 233, 255, 95, 95, 59, 255, 96, 96, 61, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 93, 93, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0),
"format": "RGBA8",
"height": 16,
"mipmaps": false,
"width": 16
}
[sub_resource type="ImageTexture" id="ImageTexture_jcwkb"]
image = SubResource("Image_hcerf")
[node name="PopochiuRow" type="HBoxContainer"]
offset_right = 320.0
offset_bottom = 40.0
script = ExtResource("1_pqknt")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 2
size_flags_horizontal = 3
[node name="Label" type="Label" parent="HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 2.0
text = "PopochiuRow"
[node name="Tag" type="TextureRect" parent="HBoxContainer"]
unique_name_in_owner = true
visible = false
texture_filter = 1
layout_mode = 2
size_flags_horizontal = 10
size_flags_vertical = 4
tooltip_text = "Main scene"
texture = SubResource("ImageTexture_4qvg7")
[node name="Panel" type="Panel" parent="."]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 1.5
mouse_filter = 1
[node name="ButtonsContainer" type="HBoxContainer" parent="Panel"]
unique_name_in_owner = true
layout_mode = 0
anchor_right = 1.0
anchor_bottom = 1.0
alignment = 2
[node name="BtnMenu" type="MenuButton" parent="Panel/ButtonsContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 8
icon = SubResource("ImageTexture_jcwkb")
switch_on_hover = true
item_count = 1
popup/item_0/text = "Remove"
popup/item_0/icon = SubResource("ImageTexture_jcwkb")