Skip to content

Commit

Permalink
refs #37: Open #67 about the heavy polishing, in the meantime this re…
Browse files Browse the repository at this point in the history
…duce the passing-over of UI elements.
  • Loading branch information
stickgrinder committed Jul 2, 2023
1 parent 7b71cee commit ae79ae2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 37 deletions.
36 changes: 3 additions & 33 deletions addons/popochiu/editor/helpers/popochiu_types_helper.gd
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,6 @@ static func is_walkable_area(node: Node) -> bool:

## TODO: provide more helpers like this maybe?


# Functions used to create Popochiu objects of various types.
# They are designed to be used from the Editor plugin, not the Engine code.
static func create_character():
pass


static func create_dialog():
pass


static func create_hotspot():
pass


static func create_inventory_item():
pass


static func create_prop():
pass


static func create_region():
pass


static func create_room():
pass


static func create_walkable_area():
pass
## TODO: If and when #67 is ready, add static facade metods to create items
## so we can just pass this object as entry point for all operations
## on Popochiu objects
4 changes: 4 additions & 0 deletions addons/popochiu/editor/main_dock/popochiu_dock.gd
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ func get_opened_room() -> PopochiuRoom:
return _tab_room.opened_room


func get_opened_room_tab() -> VBoxContainer:
return _tab_room


func open_setup() -> void:
setup_dialog.appear()

Expand Down
5 changes: 1 addition & 4 deletions addons/popochiu/editor/popups/create_prop/create_prop.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
extends 'res://addons/popochiu/editor/popups/creation_popup.gd'

const Helper := preload("res://addons/popochiu/editor/helpers/popochiu_prop_helper.gd")
const TabRoom := preload("res://addons/popochiu/editor/main_dock/tab_room.gd")

var room_tab: VBoxContainer = null

var _room: Node2D = null
var _new_prop_name := ''
Expand All @@ -32,7 +29,7 @@ func _create() -> void:
return

_helper = Helper.new()
_helper.init(_main_dock.ei, room_tab)
_helper.init(_main_dock.ei, _main_dock.get_opened_room_tab())

var prop_instance = _helper.create(_new_prop_name, _room, _interaction_checkbox.button_pressed)

Expand Down

0 comments on commit ae79ae2

Please sign in to comment.