[gd_scene load_steps=3 format=3 uid="uid://dspa16ufrpanp"]

[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_mla3y"]

[sub_resource type="GDScript" id="GDScript_kmv1d"]
script/source = "extends LineEdit

static var styles = [[null, null], [null, null]]
static var init_done: = false


func _init() -> void:
    if not init_done:
        init_done = true
        var style_0_light = get_theme_stylebox('normal')
        var style_1_light = get_theme_stylebox('read_only')

        style_0_light.bg_color = Color(0.12, 0.12, 0.12)
        style_1_light.bg_color = Color(0.12, 0.12, 0.12)
        styles[1][0] = style_0_light
        styles[1][1] = style_1_light

        var style_0_dark = style_0_light.duplicate(true)
        var style_1_dark = style_1_light.duplicate(true)

        style_0_light.bg_color = Color.GRAY
        style_1_light.bg_color = Color.GRAY
        styles[0][0] = style_0_dark
        styles[0][1] = style_1_dark
    ProjectSettings.connect('settings_changed', apply_colors)
    apply_colors()


func apply_colors():
    if ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false):
        add_theme_color_override('font_color', Color.BLACK)
        add_theme_color_override('font_uneditable_color', Color.BLACK)
        add_theme_stylebox_override('normal',    styles[1][0])
        add_theme_stylebox_override('read_only', styles[1][1])
    else:
        add_theme_color_override('font_color', Color(1.0, 0.596, 0.4))
        add_theme_color_override('font_uneditable_color', Color(1.0, 0.596, 0.4))
        add_theme_stylebox_override('normal',    styles[0][0])
        add_theme_stylebox_override('read_only', styles[0][1])
"

[node name="LineEdit" type="LineEdit"]
offset_right = 58.0
offset_bottom = 33.0
theme_override_colors/font_uneditable_color = Color(1, 0.596078, 0.4, 1)
theme_override_colors/font_color = Color(1, 0.596078, 0.4, 1)
theme_override_styles/focus = SubResource("StyleBoxEmpty_mla3y")
alignment = 1
context_menu_enabled = false
shortcut_keys_enabled = false
middle_mouse_paste_enabled = false
selecting_enabled = false
deselect_on_focus_loss_enabled = false
caret_blink = true
caret_blink_interval = 0.1
script = SubResource("GDScript_kmv1d")
