Debug prof_tool
This commit is contained in:
@@ -32,10 +32,12 @@ func _get_drag_data(_at_position: Vector2) -> Variant:
|
|||||||
|
|
||||||
|
|
||||||
func _can_drop_data(_at_position: Vector2, data: Variant) -> bool:
|
func _can_drop_data(_at_position: Vector2, data: Variant) -> bool:
|
||||||
|
@warning_ignore("unsafe_method_access")
|
||||||
return data.has("gp_id") and data.gp_id != gp_id
|
return data.has("gp_id") and data.gp_id != gp_id
|
||||||
|
|
||||||
|
|
||||||
func _drop_data(at_position: Vector2, data: Variant) -> void:
|
func _drop_data(at_position: Vector2, data: Variant) -> void:
|
||||||
|
@warning_ignore("unsafe_method_access")
|
||||||
if not data.has("gp_id"):
|
if not data.has("gp_id"):
|
||||||
return
|
return
|
||||||
var before: bool = at_position.x < size.x / 2
|
var before: bool = at_position.x < size.x / 2
|
||||||
|
|||||||
@@ -187,10 +187,10 @@ text = "Open language resource Folder"
|
|||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 85.0
|
offset_left = 50.0
|
||||||
offset_top = 117.0
|
offset_top = 117.0
|
||||||
offset_right = 626.0
|
offset_right = 667.0
|
||||||
offset_bottom = 515.0
|
offset_bottom = 547.0
|
||||||
theme_override_constants/separation = 50
|
theme_override_constants/separation = 50
|
||||||
|
|
||||||
[node name="ImportLanguageButton" type="Button" parent="VBoxContainer"]
|
[node name="ImportLanguageButton" type="Button" parent="VBoxContainer"]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
extends "res://sources/language_tool/word_list.gd"
|
extends WordList
|
||||||
|
|
||||||
var not_found_list: String = ""
|
var not_found_list: String = ""
|
||||||
@onready var export_not_found_button: Button = %ExportNotFoundButton
|
@onready var export_not_found_button: Button = %ExportNotFoundButton
|
||||||
@@ -28,7 +28,7 @@ func get_lesson_for_element(id: int) -> int:
|
|||||||
|
|
||||||
|
|
||||||
func _on_list_title_new_search(new_text: String) -> void:
|
func _on_list_title_new_search(new_text: String) -> void:
|
||||||
for element: SentenceListElement in elements_container.get_children():
|
for element in elements_container.get_children():
|
||||||
var found: bool = false
|
var found: bool = false
|
||||||
for word: String in element.word.split(" "):
|
for word: String in element.word.split(" "):
|
||||||
if word.begins_with(new_text):
|
if word.begins_with(new_text):
|
||||||
@@ -43,9 +43,9 @@ func _ready() -> void:
|
|||||||
|
|
||||||
|
|
||||||
func connect_not_found() -> void:
|
func connect_not_found() -> void:
|
||||||
for element: SentenceListElement in elements_container.get_children():
|
for element in elements_container.get_children():
|
||||||
if not element.not_found.is_connected(_on_not_found):
|
if element is SentenceListElement and not (element as SentenceListElement).not_found.is_connected(_on_not_found):
|
||||||
element.not_found.connect(_on_not_found)
|
(element as SentenceListElement).not_found.connect(_on_not_found)
|
||||||
if _element is SentenceListElement and not (_element as SentenceListElement).not_found.is_connected(_on_not_found_csv):
|
if _element is SentenceListElement and not (_element as SentenceListElement).not_found.is_connected(_on_not_found_csv):
|
||||||
(_element as SentenceListElement).not_found.connect(_on_not_found_csv)
|
(_element as SentenceListElement).not_found.connect(_on_not_found_csv)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class_name WordList
|
|||||||
|
|
||||||
@onready var elements_container: VBoxContainer = %ElementsContainer
|
@onready var elements_container: VBoxContainer = %ElementsContainer
|
||||||
@onready var new_gp_layer: CanvasLayer = $NewGPLayer
|
@onready var new_gp_layer: CanvasLayer = $NewGPLayer
|
||||||
@onready var new_gp: GPListElement = %NewGP
|
@onready var new_gp := %NewGP
|
||||||
@onready var title: ListTitle = %ListTitle
|
@onready var title: ListTitle = %ListTitle
|
||||||
@onready var lesson_title: Label = %Lesson
|
@onready var lesson_title: Label = %Lesson
|
||||||
@onready var word_title: Label = %Word
|
@onready var word_title: Label = %Word
|
||||||
|
|||||||
Reference in New Issue
Block a user