first Prototype
This commit is contained in:
parent
e11825c698
commit
35ce267482
481 changed files with 17315 additions and 1 deletions
|
|
@ -0,0 +1,33 @@
|
|||
# Placeholders head UI for LocalizationEditor : MIT License
|
||||
# @author Vladimir Petrenko
|
||||
@tool
|
||||
extends VBoxContainer
|
||||
|
||||
var _type: String
|
||||
var _data: LocalizationData
|
||||
|
||||
var _filter = ""
|
||||
|
||||
@onready var _title_ui = $TitleMargin/HBox/Title
|
||||
@onready var _filter_ui = $FilterMargin/HBox/Filter
|
||||
|
||||
func set_data(type: String, data: LocalizationData):
|
||||
_type = type
|
||||
_data = data
|
||||
_filter = _data.data_filter_placeholders_by_type(_type)
|
||||
_init_connections()
|
||||
_draw_view()
|
||||
|
||||
func _init_connections() -> void:
|
||||
if not _filter_ui.is_connected("text_changed", _filter_changed_action):
|
||||
assert(_filter_ui.text_changed.connect(_filter_changed_action) == OK)
|
||||
|
||||
func _draw_view() -> void:
|
||||
_filter_ui.text = _filter
|
||||
|
||||
func _filter_changed_action(filter) -> void:
|
||||
_filter = filter
|
||||
_data.data_filter_placeholders_put(_type, _filter)
|
||||
|
||||
func set_title(text: String) -> void:
|
||||
_title_ui.text = text
|
||||
Loading…
Add table
Add a link
Reference in a new issue