View Single Post
09-25-18, 03:02 PM   #8
Brellison94
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2013
Posts: 36
Originally Posted by Xrystal View Post
Looks like Boss talk creates it as it generates the menu.

Seeing that you are taking over the addon you can pretty much change that code to what you want.

It would simply mean another layer of menu ( 'group' ). Not knowing how the next menu knows what the previous menu is I can't give you precise code but simply creating another 'group' element for each parent menu for the zones and putting the zone related menus under it as a child menu ( however that is done ).

Now, after looking at the bosstalk code I can see what you were asking.


Here is a portion of the yell menu generate code:
Lua Code:
  1. ["User"] = {
  2.             type = 'group',
  3.             name = L["User Yells"],
  4.             desc = " ",
  5.             args = {
  6.                 ["World"] = {
  7.                     type = 'group',
  8.                     name = L["World"],
  9.                     desc = " ",
  10.                     args = {},
  11.                     order = 1
  12.                 },
  13.                 ["Dungeon"] = {
  14.                     type = 'group',
  15.                     name = L["Instance"],
  16.                     desc = " ",
  17.                     args = {},
  18.                     order = 2
  19.                 },
  20.                        }
  21.               }

This shows you how you can code the other menu the way you want. Here is how it looks like you will be able to do to convert the Vanilla trio of groups into sub groups of another zone level group.

Lua Code:
  1. ["Vanilla"] = {
  2.                type = "group",
  3.                name = "Vanilla",
  4.                desc = "",
  5.                args = {
  6.         ["Vanilla Events"] = {
  7.             type = 'group',
  8.             name = "Vanilla Events",
  9.             desc = " ",
  10.             args = {},
  11.             order = 1
  12.         },
  13.         ["Vanilla Dungeons"] = {
  14.             type = 'group',
  15.             name = "Vanilla Dungeons",
  16.             desc = " ",
  17.             args = {},
  18.             order = 2
  19.         },
  20.         ["Vanilla Raids"] = {
  21.             type = 'group',
  22.             name = "Vanilla Raids",
  23.             desc = " ",
  24.             args = {},
  25.             order = 3
  26.         },
  27.             },
  28.            order = 1,
  29.      }

In other words the args entry is where you place child menu contents. Hopefully this helps you understand a little better.
This helps. Which brings to one more concern: what about this group of code? Does this need more to make it appear in each tab?

local function wowcheck(arg1)
if(arg1 == "ve") then return "Vanilla Events" end
if(arg1 == "vd") then return "Vanilla Dungeons" end
if(arg1 == "vr") then return "Vanilla Raids" end
if(arg1 == "be") then return "Burning Crusade Events" end
if(arg1 == "bd") then return "Burning Crusade Dungeons" end
if(arg1 == "br") then return "Burning Crusade Raids" end
if(arg1 == "we") then return "Wrath of the Lich King Events" end
if(arg1 == "wd") then return "Wrath of the Lich King Dungeons" end
if(arg1 == "wr") then return "Wrath of the Lich King Raids" end
if(arg1 == "ce") then return "Cataclysm Events" end
if(arg1 == "cu") then return "Cataclysm Unused" end
if(arg1 == "cd") then return "Cataclysm Dungeons" end
if(arg1 == "cr") then return "Cataclysm Raids" end
if(arg1 == "pe") then return "Mists of Pandaria Events" end
if(arg1 == "pu") then return "Mists of Pandaria Unused" end
if(arg1 == "ps") then return "Mists of Pandaria Scenarios" end
if(arg1 == "pd") then return "Mists of Pandaria Dungeons" end
if(arg1 == "pr") then return "Mists of Pandaria Raids" end
if(arg1 == "de") then return "Warlords of Draenor Events" end
if(arg1 == "du") then return "Warlords of Draenor Unused" end
if(arg1 == "ds") then return "Warlords of Draenor Scenarios" end
if(arg1 == "dd") then return "Warlords of Draenor Dungeons" end
if(arg1 == "dr") then return "Warlords of Draenor Raids" end
if(arg1 == "ct") then return "Class Trials" end
if(arg1 == "ar") then return "Artifact" end
if(arg1 == "cc") then return "Class Campaign" end
if(arg1 == "le") then return "Legion Events" end
if(arg1 == "low") then return "Legion Outdoor World" end
if(arg1 == "lwq") then return "Legion World Quests" end
if(arg1 == "ls") then return "Legion Scenarios" end
if(arg1 == "ld") then return "Legion Dungeons" end
if(arg1 == "lr") then return "Legion Raids" end
if(arg1 == "ae") then return "Battle for Azeroth Events" end
if(arg1 == "aow") then return "Battle for Azeroth Outdoor World" end
if(arg1 == "awq") then return "Battle for Azeroth World Quests" end
if(arg1 == "as") then return "Battle for Azeroth Scenarios" end
end
  Reply With Quote