Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme Upgrade (WIP) #542

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions material_maker/panels/hierarchy/hierarchy_panel.gd
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ func set_icon(item : TreeItem, generator : MMGenGraph, output : int) -> void:
func fill_item(item : TreeItem, generator : MMGenGraph, selected : MMGenGraph, name = null) -> void:
item.set_text(0, name if name != null else generator.get_type_name())
if generator == selected:
item.set_custom_color(0, Color(0.5, 0.5, 1))
item.set_suffix(0, " <")
else:
item.clear_custom_color(0)
item.set_suffix(0, "")
item.set_metadata(0, generator)
item_from_gen[generator] = item
generator.connect("parameter_changed", self, "on_gen_parameter_changed", [ generator ])
Expand All @@ -105,10 +105,10 @@ func _on_Hierarchy_item_double_clicked() -> void:
func on_view_updated(generator) -> void:
assert(generator is MMGenGraph)
if item_from_gen.has(current_generator):
item_from_gen[current_generator].clear_custom_color(0)
item_from_gen[current_generator].set_suffix(0, "")
current_generator = generator
if item_from_gen.has(current_generator):
item_from_gen[current_generator].set_custom_color(0, Color(0.5, 0.5, 1))
item_from_gen[current_generator].set_suffix(0, " <")

func on_gen_parameter_changed(param_name : String, _value, generator) -> void:
if param_name == "__output_changed__":
Expand Down
14 changes: 6 additions & 8 deletions material_maker/panels/library/library.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ flags = 4
atlas = ExtResource( 3 )
region = Rect2( 0, 0, 16, 16 )

[node name="Library" type="VBoxContainer" groups=[
"updated_from_locale",
]]
[node name="Library" type="VBoxContainer" groups=["updated_from_locale"]]
anchor_right = 1.0
anchor_bottom = 1.0
rect_min_size = Vector2( 200, 200 )
Expand Down Expand Up @@ -42,24 +40,24 @@ columns = 5
[node name="Filter" type="HBoxContainer" parent="."]
margin_top = 30.0
margin_right = 1280.0
margin_bottom = 54.0
margin_bottom = 56.0
size_flags_horizontal = 3

[node name="FilterLabel" type="Label" parent="Filter"]
margin_top = 5.0
margin_top = 6.0
margin_right = 37.0
margin_bottom = 19.0
margin_bottom = 20.0
text = "Filter:"

[node name="Filter" type="LineEdit" parent="Filter"]
margin_left = 41.0
margin_right = 1280.0
margin_bottom = 24.0
margin_bottom = 26.0
size_flags_horizontal = 3
clear_button_enabled = true

[node name="Tree" type="Tree" parent="."]
margin_top = 58.0
margin_top = 60.0
margin_right = 1280.0
margin_bottom = 720.0
rect_min_size = Vector2( 100, 100 )
Expand Down
Loading