Skip to content

Commit

Permalink
Add hidden developer options
Browse files Browse the repository at this point in the history
  • Loading branch information
haggen committed Oct 12, 2019
1 parent 280d913 commit 5b3c376
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
16 changes: 13 additions & 3 deletions classic/Threatrack/DropDownMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,20 @@ function ThreatrackDropDownMenuMixin:Initialize()
isTitle = 1,
});

UIDropDownMenu_AddSeparator(1);
if (ThreatrackSavedVars.devMode) then
UIDropDownMenu_AddButton({
text = "Show Hostile Only",
isNotRadio = 1,
checked = function()
return (ThreatrackSavedVars.showHostileOnly);
end,
func = function()
ThreatrackSavedVars.showHostileOnly = not ThreatrackSavedVars.showHostileOnly;
end,
});
end

UIDropDownMenu_AddSeparator(1);
UIDropDownMenu_AddButton({
text = "Size",
notCheckable = 1,
Expand Down Expand Up @@ -53,7 +65,6 @@ function ThreatrackDropDownMenuMixin:Initialize()
});

UIDropDownMenu_AddSeparator(1);

UIDropDownMenu_AddButton({
text = "Position",
notCheckable = 1,
Expand All @@ -68,7 +79,6 @@ function ThreatrackDropDownMenuMixin:Initialize()
});

UIDropDownMenu_AddSeparator(1);

UIDropDownMenu_AddButton({
text = "Cancel",
notCheckable = 1,
Expand Down
1 change: 1 addition & 0 deletions classic/Threatrack/SavedVars.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ local NAMESPACE = ...;
-- Default values.
--
local defaultSavedVars = {
devMode = false,
showHostileOnly = true,
frameScale = 1,
};
Expand Down

0 comments on commit 5b3c376

Please sign in to comment.