Skip to content

Commit

Permalink
UI fixes in generic node
Browse files Browse the repository at this point in the history
  • Loading branch information
RodZill4 committed Aug 5, 2023
1 parent 2a9ea84 commit f35686c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions material_maker/nodes/generic/generic.gd
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func on_node_button(b : NodeButton, event : InputEvent) -> bool:
match event.button_index:
MOUSE_BUTTON_LEFT:
update_generic(generator.generic_size+1)
return true
MOUSE_BUTTON_RIGHT:
var popup_menu : PopupMenu = PopupMenu.new()
var minimum = get_generic_minimum()
Expand All @@ -57,7 +58,7 @@ func on_node_button(b : NodeButton, event : InputEvent) -> bool:
popup_menu.connect("popup_hide",Callable(popup_menu,"queue_free"))
popup_menu.connect("id_pressed",Callable(self,"update_generic"))
popup_menu.popup(Rect2(get_global_mouse_position(), Vector2(0, 0)))
accept_event()
return true
else:
return super.on_node_button(b, event)
return false
Expand Down Expand Up @@ -125,7 +126,7 @@ static func update_control_from_parameter(parameter_controls : Dictionary, p : S
if parameter_controls.has(p):
var o = parameter_controls[p]
if o is Control and o.scene_file_path == "res://material_maker/widgets/float_edit/float_edit.tscn":
o.value = v
o.set_value(v)
elif o is HSlider:
o.value = v
elif o is LineEdit:
Expand Down

0 comments on commit f35686c

Please sign in to comment.