Рефактор. Уменьшить количество файлов
This commit is contained in:
@@ -1,24 +0,0 @@
|
|||||||
extends Label
|
|
||||||
|
|
||||||
static var styles: = [null, null]
|
|
||||||
static var init_done: = false
|
|
||||||
|
|
||||||
|
|
||||||
func _init() -> void:
|
|
||||||
if init_done:
|
|
||||||
init_done = true
|
|
||||||
var style_light: = get_theme_stylebox('normal')
|
|
||||||
style_light.bg_color = Color.GRAY
|
|
||||||
styles[1] = style_light
|
|
||||||
var style_dark: = style_light.duplicate(true)
|
|
||||||
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
|
||||||
styles[0] = style_dark
|
|
||||||
ProjectSettings.connect('settings_changed', apply_colors)
|
|
||||||
apply_colors()
|
|
||||||
|
|
||||||
|
|
||||||
func apply_colors():
|
|
||||||
if ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false):
|
|
||||||
add_theme_stylebox_override('normal', styles[1])
|
|
||||||
else:
|
|
||||||
add_theme_stylebox_override('normal', styles[0])
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://bjw0gwcqxx30d
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
[gd_scene load_steps=3 format=3 uid="uid://dwphmxstaxn4v"]
|
[gd_scene load_steps=3 format=3 uid="uid://dwphmxstaxn4v"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bjw0gwcqxx30d" path="res://table/lable.gd" id="1_xk0u2"]
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yign5"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yign5"]
|
||||||
bg_color = Color(0.117647, 0.117647, 0.117647, 0.85098)
|
bg_color = Color(0.117647, 0.117647, 0.117647, 0.85098)
|
||||||
border_width_bottom = 2
|
border_width_bottom = 2
|
||||||
@@ -11,9 +9,36 @@ corner_radius_top_right = 3
|
|||||||
corner_radius_bottom_right = 3
|
corner_radius_bottom_right = 3
|
||||||
corner_radius_bottom_left = 5
|
corner_radius_bottom_left = 5
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_dhnrx"]
|
||||||
|
script/source = "extends Label
|
||||||
|
|
||||||
|
static var styles: = [null, null]
|
||||||
|
static var init_done: = false
|
||||||
|
|
||||||
|
|
||||||
|
func _init() -> void:
|
||||||
|
if init_done:
|
||||||
|
init_done = true
|
||||||
|
var style_light: = get_theme_stylebox('normal')
|
||||||
|
style_light.bg_color = Color.GRAY
|
||||||
|
styles[1] = style_light
|
||||||
|
var style_dark: = style_light.duplicate(true)
|
||||||
|
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
||||||
|
styles[0] = style_dark
|
||||||
|
ProjectSettings.connect('settings_changed', apply_colors)
|
||||||
|
apply_colors()
|
||||||
|
|
||||||
|
|
||||||
|
func apply_colors():
|
||||||
|
if ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false):
|
||||||
|
add_theme_stylebox_override('normal', styles[1])
|
||||||
|
else:
|
||||||
|
add_theme_stylebox_override('normal', styles[0])
|
||||||
|
"
|
||||||
|
|
||||||
[node name="Lable" type="Label"]
|
[node name="Lable" type="Label"]
|
||||||
offset_right = 104.0
|
offset_right = 104.0
|
||||||
offset_bottom = 27.0
|
offset_bottom = 27.0
|
||||||
theme_override_colors/font_color = Color(1, 0.596078, 0.4, 1)
|
theme_override_colors/font_color = Color(1, 0.596078, 0.4, 1)
|
||||||
theme_override_styles/normal = SubResource("StyleBoxFlat_yign5")
|
theme_override_styles/normal = SubResource("StyleBoxFlat_yign5")
|
||||||
script = ExtResource("1_xk0u2")
|
script = SubResource("GDScript_dhnrx")
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
extends LineEdit
|
|
||||||
|
|
||||||
|
|
||||||
static var styles: = [null, null]
|
|
||||||
static var init_done: = false
|
|
||||||
|
|
||||||
func _init() -> void:
|
|
||||||
if not init_done:
|
|
||||||
init_done = true
|
|
||||||
var style_light: = get_theme_stylebox('read_only')
|
|
||||||
style_light.bg_color = Color.GRAY
|
|
||||||
styles[1] = style_light
|
|
||||||
var style_dark: = style_light.duplicate(true)
|
|
||||||
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
|
||||||
styles[0] = style_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_readonly', Color.BLACK)
|
|
||||||
add_theme_color_override('font_color_placeholder', Color(0, 0, 0, 0.5))
|
|
||||||
add_theme_stylebox_override('read_only', styles[1])
|
|
||||||
else:
|
|
||||||
add_theme_color_override('font_color_readonly', Color('#D8731A')) # тёмно-оранжевый
|
|
||||||
add_theme_color_override('font_color_placeholder', Color(1, 1, 1, 0.5))
|
|
||||||
add_theme_stylebox_override('read_only', styles[0])
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://c71233c2tqc2u
|
|
||||||
@@ -1,6 +1,34 @@
|
|||||||
[gd_scene load_steps=2 format=3 uid="uid://c1i4rwaajq7d5"]
|
[gd_scene load_steps=2 format=3 uid="uid://c1i4rwaajq7d5"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c71233c2tqc2u" path="res://table/node.gd" id="1_oh3pj"]
|
[sub_resource type="GDScript" id="GDScript_eegm3"]
|
||||||
|
script/source = "extends LineEdit
|
||||||
|
|
||||||
|
static var styles: = [null, null]
|
||||||
|
static var init_done: = false
|
||||||
|
|
||||||
|
func _init() -> void:
|
||||||
|
if not init_done:
|
||||||
|
init_done = true
|
||||||
|
var style_light: = get_theme_stylebox('read_only')
|
||||||
|
style_light.bg_color = Color.GRAY
|
||||||
|
styles[1] = style_light
|
||||||
|
var style_dark: = style_light.duplicate(true)
|
||||||
|
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
||||||
|
styles[0] = style_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_readonly', Color.BLACK)
|
||||||
|
add_theme_color_override('font_color_placeholder', Color(0, 0, 0, 0.5))
|
||||||
|
add_theme_stylebox_override('read_only', styles[1])
|
||||||
|
else:
|
||||||
|
add_theme_color_override('font_color_readonly', Color('#D8731A')) # тёмно-оранжевый
|
||||||
|
add_theme_color_override('font_color_placeholder', Color(1, 1, 1, 0.5))
|
||||||
|
add_theme_stylebox_override('read_only', styles[0])
|
||||||
|
"
|
||||||
|
|
||||||
[node name="Label" type="LineEdit"]
|
[node name="Label" type="LineEdit"]
|
||||||
offset_right = 121.0
|
offset_right = 121.0
|
||||||
@@ -10,4 +38,4 @@ editable = false
|
|||||||
context_menu_enabled = false
|
context_menu_enabled = false
|
||||||
caret_blink = true
|
caret_blink = true
|
||||||
caret_blink_interval = 0.1
|
caret_blink_interval = 0.1
|
||||||
script = ExtResource("1_oh3pj")
|
script = SubResource("GDScript_eegm3")
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
extends LineEdit
|
|
||||||
|
|
||||||
static var styles: = [null, null]
|
|
||||||
static var init_done: = false
|
|
||||||
|
|
||||||
var checkbutton_material: Material
|
|
||||||
|
|
||||||
|
|
||||||
func _init() -> void:
|
|
||||||
if not init_done:
|
|
||||||
init_done = true
|
|
||||||
var style_light: = get_theme_stylebox('read_only')
|
|
||||||
style_light.bg_color = Color.GRAY
|
|
||||||
styles[1] = style_light
|
|
||||||
var style_dark: = style_light.duplicate(true)
|
|
||||||
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
|
||||||
styles[0] = style_dark
|
|
||||||
ProjectSettings.connect('settings_changed', on_setting_changed)
|
|
||||||
call_deferred('on_setting_changed')
|
|
||||||
|
|
||||||
|
|
||||||
func on_setting_changed():
|
|
||||||
checkbutton_material = $CheckButton.material
|
|
||||||
apply_colors()
|
|
||||||
|
|
||||||
|
|
||||||
func apply_colors():
|
|
||||||
if ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false):
|
|
||||||
add_theme_stylebox_override('read_only', styles[1])
|
|
||||||
$CheckButton.material = null
|
|
||||||
else:
|
|
||||||
add_theme_stylebox_override('read_only', styles[0])
|
|
||||||
$CheckButton.material = checkbutton_material
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://btvrqnnjjum20
|
|
||||||
@@ -1,10 +1,45 @@
|
|||||||
[gd_scene load_steps=8 format=3 uid="uid://dgidt8lifm7xe"]
|
[gd_scene load_steps=8 format=3 uid="uid://dgidt8lifm7xe"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://btvrqnnjjum20" path="res://table/set-toggle.gd" id="1_kvru5"]
|
|
||||||
[ext_resource type="Shader" uid="uid://bw5mmbgeycwua" path="res://shaders/color-invers.gdshader" id="2_wrw87"]
|
[ext_resource type="Shader" uid="uid://bw5mmbgeycwua" path="res://shaders/color-invers.gdshader" id="2_wrw87"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_f4oye"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_f4oye"]
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_kvru5"]
|
||||||
|
script/source = "extends LineEdit
|
||||||
|
|
||||||
|
static var styles: = [null, null]
|
||||||
|
static var init_done: = false
|
||||||
|
|
||||||
|
var checkbutton_material: Material
|
||||||
|
|
||||||
|
|
||||||
|
func _init() -> void:
|
||||||
|
if not init_done:
|
||||||
|
init_done = true
|
||||||
|
var style_light: = get_theme_stylebox('read_only')
|
||||||
|
style_light.bg_color = Color.GRAY
|
||||||
|
styles[1] = style_light
|
||||||
|
var style_dark: = style_light.duplicate(true)
|
||||||
|
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
||||||
|
styles[0] = style_dark
|
||||||
|
ProjectSettings.connect('settings_changed', on_setting_changed)
|
||||||
|
call_deferred('on_setting_changed')
|
||||||
|
|
||||||
|
|
||||||
|
func on_setting_changed():
|
||||||
|
checkbutton_material = $CheckButton.material
|
||||||
|
apply_colors()
|
||||||
|
|
||||||
|
|
||||||
|
func apply_colors():
|
||||||
|
if ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false):
|
||||||
|
add_theme_stylebox_override('read_only', styles[1])
|
||||||
|
$CheckButton.material = null
|
||||||
|
else:
|
||||||
|
add_theme_stylebox_override('read_only', styles[0])
|
||||||
|
$CheckButton.material = checkbutton_material
|
||||||
|
"
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_wrw87"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_wrw87"]
|
||||||
shader = ExtResource("2_wrw87")
|
shader = ExtResource("2_wrw87")
|
||||||
|
|
||||||
@@ -20,7 +55,7 @@ offset_right = 85.0
|
|||||||
offset_bottom = 27.0
|
offset_bottom = 27.0
|
||||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_f4oye")
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_f4oye")
|
||||||
editable = false
|
editable = false
|
||||||
script = ExtResource("1_kvru5")
|
script = SubResource("GDScript_kvru5")
|
||||||
|
|
||||||
[node name="CheckButton" type="CheckButton" parent="."]
|
[node name="CheckButton" type="CheckButton" parent="."]
|
||||||
material = SubResource("ShaderMaterial_wrw87")
|
material = SubResource("ShaderMaterial_wrw87")
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
extends LineEdit
|
|
||||||
|
|
||||||
static var styles: = [null, null]
|
|
||||||
static var init_done: = false
|
|
||||||
|
|
||||||
var checkbutton_material: Material
|
|
||||||
|
|
||||||
|
|
||||||
func _init() -> void:
|
|
||||||
ProjectSettings.connect('settings_changed', on_setting_changed)
|
|
||||||
if not init_done:
|
|
||||||
init_done = true
|
|
||||||
var style_light: = get_theme_stylebox('read_only')
|
|
||||||
style_light.bg_color = Color.GRAY
|
|
||||||
styles[1] = style_light
|
|
||||||
var style_dark: = style_light.duplicate(true)
|
|
||||||
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
|
||||||
styles[0] = style_dark
|
|
||||||
|
|
||||||
|
|
||||||
func on_setting_changed():
|
|
||||||
checkbutton_material = $CheckButton.material
|
|
||||||
apply_colors()
|
|
||||||
|
|
||||||
|
|
||||||
func apply_colors():
|
|
||||||
var is_light: bool = ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false)
|
|
||||||
if is_light:
|
|
||||||
add_theme_stylebox_override('read_only', styles[1])
|
|
||||||
$CheckButton.material = null
|
|
||||||
else:
|
|
||||||
add_theme_stylebox_override('read_only', styles[0])
|
|
||||||
$CheckButton.material = checkbutton_material
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://bh7mb1aeu1uk6
|
|
||||||
@@ -1,10 +1,51 @@
|
|||||||
[gd_scene load_steps=6 format=3 uid="uid://5rw652cmnybi"]
|
[gd_scene load_steps=6 format=3 uid="uid://5rw652cmnybi"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bh7mb1aeu1uk6" path="res://table/settings-toggle.gd" id="1_8lkgc"]
|
|
||||||
[ext_resource type="Shader" uid="uid://bw5mmbgeycwua" path="res://shaders/color-invers.gdshader" id="1_anyuq"]
|
[ext_resource type="Shader" uid="uid://bw5mmbgeycwua" path="res://shaders/color-invers.gdshader" id="1_anyuq"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_il5wc"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_il5wc"]
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_vuu0m"]
|
||||||
|
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])
|
||||||
|
"
|
||||||
|
|
||||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_8lkgc"]
|
[sub_resource type="ShaderMaterial" id="ShaderMaterial_8lkgc"]
|
||||||
shader = ExtResource("1_anyuq")
|
shader = ExtResource("1_anyuq")
|
||||||
|
|
||||||
@@ -22,7 +63,7 @@ shortcut_keys_enabled = false
|
|||||||
middle_mouse_paste_enabled = false
|
middle_mouse_paste_enabled = false
|
||||||
selecting_enabled = false
|
selecting_enabled = false
|
||||||
deselect_on_focus_loss_enabled = false
|
deselect_on_focus_loss_enabled = false
|
||||||
script = ExtResource("1_8lkgc")
|
script = SubResource("GDScript_vuu0m")
|
||||||
|
|
||||||
[node name="CheckButton" type="CheckButton" parent="."]
|
[node name="CheckButton" type="CheckButton" parent="."]
|
||||||
material = SubResource("ShaderMaterial_8lkgc")
|
material = SubResource("ShaderMaterial_8lkgc")
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
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])
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://dqexdg24cp6rq
|
|
||||||
@@ -1,9 +1,49 @@
|
|||||||
[gd_scene load_steps=3 format=3 uid="uid://dspa16ufrpanp"]
|
[gd_scene load_steps=3 format=3 uid="uid://dspa16ufrpanp"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dqexdg24cp6rq" path="res://table/ячейка-2.gd" id="1_0fmuf"]
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_mla3y"]
|
[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"]
|
[node name="LineEdit" type="LineEdit"]
|
||||||
offset_right = 58.0
|
offset_right = 58.0
|
||||||
offset_bottom = 33.0
|
offset_bottom = 33.0
|
||||||
@@ -18,4 +58,4 @@ selecting_enabled = false
|
|||||||
deselect_on_focus_loss_enabled = false
|
deselect_on_focus_loss_enabled = false
|
||||||
caret_blink = true
|
caret_blink = true
|
||||||
caret_blink_interval = 0.1
|
caret_blink_interval = 0.1
|
||||||
script = ExtResource("1_0fmuf")
|
script = SubResource("GDScript_kmv1d")
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
extends ColorPickerButton
|
|
||||||
|
|
||||||
static var styles = [null, null]
|
|
||||||
static var init_done: = false
|
|
||||||
|
|
||||||
|
|
||||||
func _init() -> void:
|
|
||||||
if not init_done:
|
|
||||||
init_done = true
|
|
||||||
var style_light: = get_theme_stylebox('normal')
|
|
||||||
style_light.bg_color = Color.GRAY
|
|
||||||
styles[1] = style_light
|
|
||||||
var style_dark: = style_light.duplicate(true)
|
|
||||||
style_dark.bg_color = Color(0.12, 0.12, 0.12)
|
|
||||||
styles[0] = style_dark
|
|
||||||
ProjectSettings.connect('settings_changed', apply_colors)
|
|
||||||
apply_colors()
|
|
||||||
|
|
||||||
|
|
||||||
func apply_colors():
|
|
||||||
if ProjectSettings.get_setting('application/config/%s' % 'Цвет темы программы', false):
|
|
||||||
add_theme_stylebox_override('normal', styles[1])
|
|
||||||
else:
|
|
||||||
add_theme_stylebox_override('normal', styles[0])
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
uid://b36c83manfems
|
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
[gd_scene load_steps=3 format=3 uid="uid://cug5xjbfdm7x7"]
|
[gd_scene load_steps=3 format=3 uid="uid://cug5xjbfdm7x7"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b36c83manfems" path="res://table/ячейка-цвет.gd" id="1_ce8lu"]
|
|
||||||
|
|
||||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ce8lu"]
|
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ce8lu"]
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_dds53"]
|
||||||
|
script/source = "extends ColorPickerButton
|
||||||
|
"
|
||||||
|
|
||||||
[node name="ячейка-цвет" type="ColorPickerButton"]
|
[node name="ячейка-цвет" type="ColorPickerButton"]
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -11,4 +13,4 @@ anchor_bottom = 1.0
|
|||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/focus = SubResource("StyleBoxEmpty_ce8lu")
|
theme_override_styles/focus = SubResource("StyleBoxEmpty_ce8lu")
|
||||||
script = ExtResource("1_ce8lu")
|
script = SubResource("GDScript_dds53")
|
||||||
|
|||||||
Reference in New Issue
Block a user