/trunk/Livestock/Preferences
end |
end) |
local pb8 = Recompense.CreateButtonAndText("LivestockPetPreferencesFrameToggleDismissOnStealthPVPOnly", petprefs, 10, -136, "LivestockPetPreferencesFramePVPDismissText") |
local pb8 = Recompense.CreateButtonAndText("LivestockPetPreferencesFrameToggleDismissOnStealthPVPOnly", petprefs, 15, -136, "LivestockPetPreferencesFramePVPDismissText") |
pb8:SetScript("OnClick", function() LivestockSettings.PVPdismiss = 1 - LivestockSettings.PVPdismiss end) |
local pb9 = Recompense.CreateButtonAndText("LivestockPetPreferencesFrameNewPet", petprefs, 5, -154, "LivestockPetPreferencesFrameNewPetText") |
LivestockMainPreferencesFrame.name = LivestockLocalizations.LIVESTOCK_INTERFACE_MAINPANEL |
InterfaceOptions_AddCategory(LivestockMainPreferencesFrame) |
local mb1 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowLandMounts", mainprefs, "UICheckButtonTemplate") |
local mb1 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowCritters", mainprefs, "UICheckButtonTemplate") |
mb1:SetHeight(26) |
mb1:SetWidth(26) |
mb1:SetPoint("TOPLEFT", 85, -90) |
mb1:SetPoint("TOPLEFT", 85, -55) |
mb1:SetScript("OnClick", function() |
LivestockSettings.showland = 1 - LivestockSettings.showland |
if LivestockSettings.showland == 0 then |
LivestockLandMountsButton:Hide() |
LivestockSettings.showcritter = 1 - LivestockSettings.showcritter |
if LivestockSettings.showcritter == 0 then |
LivestockCrittersButton:Hide() |
else |
LivestockLandMountsButton:Show() |
LivestockCrittersButton:Show() |
end |
end) |
local mb2 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowCritters", mainprefs, "UICheckButtonTemplate") |
local mb2 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowLandMounts", mainprefs, "UICheckButtonTemplate") |
mb2:SetHeight(26) |
mb2:SetWidth(26) |
mb2:SetPoint("TOPLEFT", 85, -55) |
mb2:SetPoint("TOPLEFT", 85, -90) |
mb2:SetScript("OnClick", function() |
LivestockSettings.showcritter = 1 - LivestockSettings.showcritter |
if LivestockSettings.showcritter == 0 then |
LivestockCrittersButton:Hide() |
LivestockSettings.showland = 1 - LivestockSettings.showland |
if LivestockSettings.showland == 0 then |
LivestockLandMountsButton:Hide() |
else |
LivestockCrittersButton:Show() |
LivestockLandMountsButton:Show() |
end |
end) |
end |
end) |
local mb4 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowSmartMounts", mainprefs, "UICheckButtonTemplate") |
local mb4 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowDragonMounts", mainprefs, "UICheckButtonTemplate") |
mb4:SetHeight(26) |
mb4:SetWidth(26) |
mb4:SetPoint("TOPLEFT", 240, -90) |
mb4:SetScript("OnClick", function() |
LivestockSettings.showdragon = 1 - LivestockSettings.showdragon |
if LivestockSettings.showdragon == 0 then |
LivestockDragonMountsButton:Hide() |
else |
LivestockDragonMountsButton:Show() |
end |
end) |
local mb5 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowWaterMounts", mainprefs, "UICheckButtonTemplate") |
mb5:SetHeight(26) |
mb5:SetWidth(26) |
mb5:SetPoint("TOPLEFT", 395, -55) |
mb5:SetScript("OnClick", function() |
LivestockSettings.showwater = 1 - LivestockSettings.showwater |
if LivestockSettings.showwater == 0 then |
LivestockWaterMountsButton:Hide() |
else |
LivestockWaterMountsButton:Show() |
end |
end) |
local mb6 = CreateFrame("CheckButton", "LivestockMainPreferencesFrameShowSmartMounts", mainprefs, "UICheckButtonTemplate") |
mb6:SetHeight(26) |
mb6:SetWidth(26) |
mb6:SetPoint("TOPLEFT", 395, -90) |
mb6:SetScript("OnClick", function() |
LivestockSettings.showsmart = 1 - LivestockSettings.showsmart |
if LivestockSettings.showsmart == 0 then |
LivestockSmartButton:Hide() |
mb8:SetHeight(25) |
mb8:SetWidth(115) |
mb8:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_SHOWLANDLABEL) |
mb8:SetPoint("TOP", 0, -180) |
mb8:SetPoint("TOP", -133, -210) |
mb8:SetScript("OnClick", function() |
CreateMacro("LandMounts", "INV_Misc_QuestionMark", "/click LivestockLandMountsButton", 1) |
DEFAULT_CHAT_FRAME:AddMessage(LivestockLocalizations.LIVESTOCK_INTERFACE_LANDMACROCREATED) |
mb9:SetHeight(25) |
mb9:SetWidth(115) |
mb9:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_SHOWFLYINGLABEL) |
mb9:SetPoint("TOP", 133, -180) |
mb9:SetPoint("TOP", 0, -180) |
mb9:SetScript("OnClick", function() |
CreateMacro("FlyingMounts", "INV_Misc_QuestionMark", "/click LivestockFlyingMountsButton", 1) |
DEFAULT_CHAT_FRAME:AddMessage(LivestockLocalizations.LIVESTOCK_INTERFACE_FLYINGMACROCREATED) |
end) |
local mb10 = CreateFrame("Button", "LivestockSmartMacroButton", mainprefs, "GameMenuButtonTemplate") |
local mb10 = CreateFrame("Button", "LivestockDragonMountMacroButton", mainprefs, "GameMenuButtonTemplate") |
mb10:SetHeight(25) |
mb10:SetWidth(115) |
mb10:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_SHOWSMARTLABEL) |
mb10:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_SHOWDRAGONLABEL) |
mb10:SetPoint("TOP", 0, -210) |
mb10:SetScript("OnClick", function() |
CreateMacro("DragonMounts", "INV_Misc_QuestionMark", "/click LivestockDragonMountsButton", 1) |
DEFAULT_CHAT_FRAME:AddMessage(LivestockLocalizations.LIVESTOCK_INTERFACE_DRAGONMACROCREATED) |
end) |
local mb11 = CreateFrame("Button", "LivestockWaterMountMacroButton", mainprefs, "GameMenuButtonTemplate") |
mb11:SetHeight(25) |
mb11:SetWidth(115) |
mb11:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_SHOWWATERLABEL) |
mb11:SetPoint("TOP", 133, -180) |
mb11:SetScript("OnClick", function() |
CreateMacro("WaterMounts", "INV_Misc_QuestionMark", "/click LivestockWaterMountsButton", 1) |
DEFAULT_CHAT_FRAME:AddMessage(LivestockLocalizations.LIVESTOCK_INTERFACE_WATERMACROCREATED) |
end) |
local mb12 = CreateFrame("Button", "LivestockSmartMacroButton", mainprefs, "GameMenuButtonTemplate") |
mb12:SetHeight(25) |
mb12:SetWidth(115) |
mb12:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_SHOWSMARTLABEL) |
mb12:SetPoint("TOP", 133, -210) |
mb12:SetScript("OnClick", function() |
CreateMacro("ComboMounts", "INV_Misc_QuestionMark", "/click LivestockSmartButton", 1) |
DEFAULT_CHAT_FRAME:AddMessage(LivestockLocalizations.LIVESTOCK_INTERFACE_SMARTMACROCREATED) |
end) |
local mb11 = CreateFrame("Button", "LivestockMainPreferencesFrameOpenLivestockMenuButton", mainprefs, "GameMenuButtonTemplate") |
mb11:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_LIVESTOCKMENU) |
mb11:SetWidth(145) |
mb11:SetHeight(25) |
mb11:SetPoint("BOTTOM", 0, 15) |
mb11:SetScript("OnClick", function() Recompense.TransitionFromInterfaceOptionsToFrame(LivestockMenuFrame) end) |
local mb13 = CreateFrame("Button", "LivestockMainPreferencesFrameOpenLivestockMenuButton", mainprefs, "GameMenuButtonTemplate") |
mb13:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_LIVESTOCKMENU) |
mb13:SetWidth(145) |
mb13:SetHeight(25) |
mb13:SetPoint("BOTTOM", 0, 15) |
mb13:SetScript("OnClick", function() Recompense.TransitionFromInterfaceOptionsToFrame(LivestockMenuFrame) end) |
local function PlaceFS(title, template, anchor, xOffset, yOffset) |
local t = mainprefs:CreateFontString(title, "OVERLAY", template) |
PlaceFS("LivestockMainPreferencesFrameMacroTitle", "GameFontNormalLarge", "TOP", 0, -120) |
--PlaceFS("LivestockMainPreferencesFrameOtherTitle", "GameFontNormalLarge", "TOP", 0, -250) |
PlaceFS("LivestockMainPreferencesFrameMacroText", "ChatFontNormal", "TOP", 0, -150) |
PlaceFS("LivestockMainPreferencesFrameShowSmartMountsLabel", "ChatFontNormal", "TOPLEFT", 275, -95) |
PlaceFS("LivestockMainPreferencesFrameShowCrittersLabel", "ChatFontNormal", "TOPLEFT", 115, -60) |
PlaceFS("LivestockMainPreferencesFrameShowLandMountsLabel", "ChatFontNormal", "TOPLEFT", 115, -95) |
PlaceFS("LivestockMainPreferencesFrameShowFlyingMountsLabel", "ChatFontNormal", "TOPLEFT", 275, -60) |
PlaceFS("LivestockMainPreferencesFrameShowCrittersLabel", "ChatFontNormal", "TOPLEFT", 115, -60) |
PlaceFS("LivestockMainPreferencesFrameShowDragonMountsLabel", "ChatFontNormal", "TOPLEFT", 275, -95) |
PlaceFS("LivestockMainPreferencesFrameShowWaterMountsLabel", "ChatFontNormal", "TOPLEFT", 435, -60) |
PlaceFS("LivestockMainPreferencesFrameShowSmartMountsLabel", "ChatFontNormal", "TOPLEFT", 435, -95) |
local vfs = mainprefs:CreateFontString("LivestockVersionNumber", "OVERLAY", "ChatFontSmall") |
vfs:SetText(format("Version: %s", LIVESTOCK_VERSION)) |
LivestockSettings.partyfave = 1 - LivestockSettings.partyfave |
end) |
local sb24 = Recompense.CreateButtonAndText("LivestockSmartPreferencesFrameDragonriding", smartprefs, 5, -370, "LivestockSmartPreferencesFrameDragonridingText") |
sb24:SetScript("OnClick", function() |
LivestockSettings.dragonriding = 1 - LivestockSettings.dragonriding |
end) |
local sbb = CreateFrame("Button", "LivestockSmartPreferencesFrameOpenLivestockMenuButton", smartprefs, "GameMenuButtonTemplate") |
sbb:SetText(LivestockLocalizations.LIVESTOCK_FONTSTRING_LIVESTOCKMENU) |
sbb:SetWidth(145) |