Skip to content

Commit

Permalink
Add EasySkillet library (EasyMenu replacement)
Browse files Browse the repository at this point in the history
  • Loading branch information
b-morgan committed Sep 16, 2024
1 parent fb19e83 commit a065685
Show file tree
Hide file tree
Showing 4 changed files with 2,033 additions and 0 deletions.
37 changes: 37 additions & 0 deletions Libs/EasySkillet/EasySkillet.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
-- Simplified Menu Display System
-- This is a basic system for displaying a menu from a structure table.
--
-- See UIDropDownMenu.lua for the menuList details.
--
-- Args:
-- menuList - menu table
-- menuFrame - the UI frame to populate
-- anchor - where to anchor the frame (e.g. CURSOR)
-- x - x offset
-- y - y offset
-- displayMode - border type
-- autoHideDelay - how long until the menu disappears
--
--

-- Based on Zygor Guide's UIDropDownFork

local function EasySkillet_Initialize( frame, level, menuList )
for index = 1, #menuList do
local value = menuList[index]
value.index = index;
-- UIDropDownMenu_AddButton( value, level );
UIDropDownSkillet_AddButton( value, level );
end
end

function EasySkillet(menuList, menuFrame, anchor, x, y, displayMode, autoHideDelay )
if ( displayMode == "MENU" ) then
menuFrame.displayMode = displayMode;
end
-- UIDropDownMenu_Initialize(menuFrame, EasyMenu_Initialize, displayMode, nil, menuList);
-- ToggleDropDownMenu(1, nil, menuFrame, anchor, x, y, menuList, nil, autoHideDelay);
UIDropDownSkillet_Initialize(menuFrame, EasySkillet_Initialize, displayMode, nil, menuList);
ToggleDropDownSkillet(1, nil, menuFrame, anchor, x, y, menuList, nil, autoHideDelay);
end

Loading

0 comments on commit a065685

Please sign in to comment.