Browse Source

Added double-click to load a saved list.

pull/6/head
atom0s 8 years ago
parent
commit
ebd7d33607
  1. 9
      itemwatch.lua

9
itemwatch.lua

@ -631,8 +631,17 @@ function render_savedlists_editor()
if (imgui.Selectable(name, imgui.GetVarValue(variables['var_SelectedSavedList'][1]) == x)) then if (imgui.Selectable(name, imgui.GetVarValue(variables['var_SelectedSavedList'][1]) == x)) then
imgui.SetVarValue(variables['var_SelectedSavedList'][1], x); imgui.SetVarValue(variables['var_SelectedSavedList'][1], x);
end end
-- Handle saved list item double click..
if (imgui.IsItemHovered() and imgui.IsMouseDoubleClicked(0)) then
if (imgui.GetVarValue(variables['var_SelectedSavedList'][1]) >= 0) then
local index = imgui.GetVarValue(variables['var_SelectedSavedList'][1]);
lists.load_list(index);
end
end
end end
end end
if (#lists.saved_lists <= 0) then if (#lists.saved_lists <= 0) then
imgui.PushTextWrapPos(0); imgui.PushTextWrapPos(0);
imgui.TextColored(1.0, 0.4, 0.4, 1.0, 'There are currently no saved lists to display here!'); imgui.TextColored(1.0, 0.4, 0.4, 1.0, 'There are currently no saved lists to display here!');

Loading…
Cancel
Save