Skip to content

Commit

Permalink
Fixed environment editor problems (#720)
Browse files Browse the repository at this point in the history
  • Loading branch information
RodZill4 committed Nov 7, 2024
1 parent 9c23081 commit b5330fa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func on_name_updated(index, text):
environment_list.set_item_text(index, text)

func on_thumbnail_updated(index, texture):
environment_list.set_item_icon(index, null)
environment_list.set_item_icon(index, texture)

func read_environment_list(select : int = 0):
Expand Down Expand Up @@ -147,7 +148,7 @@ func _on_Environments_gui_input(event):
var context_menu : PopupMenu = $Main/HSplitContainer/Environments/ContextMenu
var index = environment_list.get_item_at_position(event.position)
if environment_list.is_selected(index) and ! environment_manager.is_read_only(index):
context_menu.popup(Rect2($Main.get_global_mouse_position(), context_menu.get_contents_minimum_size()))
context_menu.popup(Rect2(mm_globals.screen_space_mouse_position($Main/HSplitContainer/Environments), Vector2(0, 0)))

func _on_ContextMenu_id_pressed(id):
var index = environment_list.get_selected_items()[0]
Expand Down

0 comments on commit b5330fa

Please sign in to comment.