Updated the engine. I added a _theme_ infix to Control's theme helper methods.

This commit is contained in:
Relintai 2022-08-17 20:58:19 +02:00
parent da3397414e
commit 585cc46aaf
5 changed files with 10 additions and 10 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "c4864a0e5f73a375259503ea1485794a6aad6df7"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3536f01bacf5f54cefb32b768cd020a1f94d0ade"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "voxelman": {"master": "65485930a20f65844d496b4ba47dec5b6ed70b91"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "mesh_data_resource": {"master": "a062d871d49d954c5466b9de54b4075cb61cbef4"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "983090d21a08ebed30a5ce06681269819ab12e48"}, "mesh_utils": {"master": "b52a261c31f04fad624e5cfbcdcc4a45d61136da"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "thread_pool": {"master": "0917511d04bb1aa308385b63ec88d3c182990628"}, "terraman": {"master": "c72d8fc03295588fc18c5168ce351bd0c321ec5f"}, "pandemonium_engine": {"master": "9757c39f05778360061c4be6e7c3cace19a4eb94"}}
{"engine": {"3.2": "94a0fc47f7b4e90f8973f9adbfd3312579ed2825", "master": "8c73e813134001e575b6f59e3b0100471c007410", "3.x": "c4864a0e5f73a375259503ea1485794a6aad6df7"}, "world_generator": {"master": "260c430f11b0b591eaf4714516419aa327d2842c"}, "entity_spell_system": {"master": "3536f01bacf5f54cefb32b768cd020a1f94d0ade"}, "ui_extensions": {"master": "80a3b96fc56991a0f88a1d441ed1e3cebaf3307a"}, "voxelman": {"master": "65485930a20f65844d496b4ba47dec5b6ed70b91"}, "texture_packer": {"master": "ae4d222fbaade063ed6f0bc9f3aaa53df68a7fed"}, "fastnoise": {"master": "46bb1f610bfb7171613b5c708d312bcf94e89356"}, "mesh_data_resource": {"master": "a062d871d49d954c5466b9de54b4075cb61cbef4"}, "procedural_animations": {"master": "f8aae42bf06b3936cc6bd24cb18e1c3ec9f78f4f"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "props": {"master": "983090d21a08ebed30a5ce06681269819ab12e48"}, "mesh_utils": {"master": "b52a261c31f04fad624e5cfbcdcc4a45d61136da"}, "broken_seals_module": {"master": "52c5a81350db1c29d375c63d95010260911ec034"}, "thread_pool": {"master": "0917511d04bb1aa308385b63ec88d3c182990628"}, "terraman": {"master": "c72d8fc03295588fc18c5168ce351bd0c321ec5f"}, "pandemonium_engine": {"master": "4c4e19223eb259bf543f727f51fe7a0a9dd1e2b9"}}

View File

@ -106,7 +106,7 @@ func refresh() -> void:
item.set_text(0, n)
item.set_meta("res", d)
item.add_button(0, get_icon("Edit", "EditorIcons"), -1, false, "Edit")
item.add_button(0, get_theme_icon("Edit", "EditorIcons"), -1, false, "Edit")
item.set_editable(0, true)
func set_edited_resource(res : WorldGenBaseResource)-> void:

View File

@ -38,7 +38,7 @@ func _draw():
draw_rect(Rect2(Vector2(), get_size()), _edited_resource_rect_color)
draw_rect(Rect2(Vector2(), get_size()), _edited_resource_rect_border_color, false, _editor_rect_border_size)
var font : Font = get_font("font")
var font : Font = get_theme_font("font")
var res_name : String = "NULL"

View File

@ -49,9 +49,9 @@ func _init() -> void:
zoom_reset = Button.new()
zoom_reset.set_flat(true)
add_child(zoom_reset)
zoom_reset.add_constant_override("outline_size", 1)
zoom_reset.add_color_override("font_outline_color", Color(0, 0, 0))
zoom_reset.add_color_override("font_color", Color(1, 1, 1))
zoom_reset.add_theme_constant_override("outline_size", 1)
zoom_reset.add_theme_color_override("font_outline_color", Color(0, 0, 0))
zoom_reset.add_theme_color_override("font_color", Color(1, 1, 1))
zoom_reset.connect("pressed", self, "_button_zoom_reset")
zoom_reset.set_shortcut(ED_SHORTCUT("canvas_item_editor/zoom_reset", tr("Zoom Reset"), KEY_MASK_CMD | KEY_0))
zoom_reset.set_focus_mode(FOCUS_NONE)
@ -67,7 +67,7 @@ func _init() -> void:
_update_zoom_label()
add_constant_override("separation", round(-8))
add_theme_constant_override("separation", round(-8))
func get_zoom() -> float:
return zoom
@ -175,8 +175,8 @@ func _button_zoom_plus() -> void:
func _notification(p_what : int) -> void:
if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED):
zoom_minus.icon = get_icon("ZoomLess", "EditorIcons")
zoom_plus.icon = get_icon("ZoomMore", "EditorIcons")
zoom_minus.icon = get_theme_icon("ZoomLess", "EditorIcons")
zoom_plus.icon = get_theme_icon("ZoomMore", "EditorIcons")
#from godot editor/editor_Settings.cpp
func ED_SHORTCUT(p_path : String, p_name : String, p_keycode : int, editor_settings : EditorSettings = null) -> ShortCut:

View File

@ -74,7 +74,7 @@ func setup(pos : Vector3, color : Color, value : int, crit : bool) -> void:
camera = get_tree().get_root().get_camera() as Camera
text = str(value)
add_color_override("font_color", color)
add_theme_color_override("font_color", color)
if crit:
animation_player.play("crit")