mirror of
https://github.com/Relintai/Godot-TextEditor.git
synced 2025-01-26 16:59:19 +01:00
19 lines
513 B
GDScript3
19 lines
513 B
GDScript3
|
tool
|
||
|
extends RichTextLabel
|
||
|
|
||
|
var editor:TextEditor
|
||
|
|
||
|
func _ready():
|
||
|
add_font_override("normal_font", editor.FONT_R)
|
||
|
add_font_override("bold_font", editor.FONT_B)
|
||
|
add_font_override("italics_font", editor.FONT_I)
|
||
|
add_font_override("bold_italics_font", editor.FONT_BI)
|
||
|
|
||
|
func _process(_delta):
|
||
|
set_global_position(get_global_mouse_position())
|
||
|
|
||
|
func _input(e):
|
||
|
if e is InputEventMouseButton:
|
||
|
if (e.button_index == BUTTON_LEFT and not e.pressed) or (e.button_index == BUTTON_RIGHT and e.pressed):
|
||
|
queue_free()
|