-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Scribble-Sheep
authored and
Scribble-Sheep
committed
Apr 5, 2024
1 parent
3c1bce8
commit 92c774a
Showing
4 changed files
with
60 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
extends TabContainer | ||
|
||
|
||
@onready var raw_text := $"Setup/Raw Text/TextEdit" | ||
@onready var delimiter_edit := $Setup/DelimitEdit | ||
@onready var raw_text := %Textblob | ||
@onready var delimeter_toggle := %DelimeterToggle | ||
@onready var delimiter_edit := %DelimitEdit | ||
|
||
|
||
func _on_initbutton_pressed() -> void: | ||
if raw_text.text == "": | ||
return | ||
current_tab +=1 | ||
match delimiter_edit.text: | ||
"": | ||
EventBus.initialize.emit(raw_text.text, "\n") | ||
_: | ||
EventBus.initialize.emit(raw_text.text, delimiter_edit.text) | ||
|
||
var delimit:String | ||
|
||
if !delimeter_toggle.button_pressed: | ||
delimit = "\n" | ||
else: | ||
delimit = delimiter_edit.text | ||
|
||
EventBus.initialize.emit(raw_text.text, delimit) | ||
|
||
|
||
func _on_delimeter_toggle_toggled(toggled_on: bool) -> void: | ||
delimiter_edit.editable = toggled_on |