-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
2,001 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
local _, namespace = ... | ||
|
||
-- Function to create the About section canvas | ||
local function CreateAboutCanvas(canvas) | ||
-- Set the canvas size | ||
canvas:SetAllPoints(true) | ||
|
||
-- Title | ||
local title = canvas:CreateFontString(nil, "ARTWORK", "GameFontNormalLarge") | ||
title:SetPoint("TOP", canvas, "TOP", 0, -70) | ||
title:SetText("|cffFFD700LevelUpFX|r") -- Gold-colored title | ||
|
||
-- Description | ||
local description = canvas:CreateFontString(nil, "ARTWORK", "GameFontHighlight") | ||
description:SetPoint("TOP", title, "BOTTOM", 0, -10) | ||
description:SetWidth(500) | ||
description:SetText("Exclusively for Classic WoW Era Realms! \n\nLevelUpFX enhances your World of Warcraft Classic leveling experience by displaying animated notifications and stat gains for each level-up. Developed by Kkthnx, this addon ensures that every milestone in your Classic adventure feels rewarding and exciting.") | ||
|
||
-- Features Section | ||
local featuresHeading = canvas:CreateFontString(nil, "ARTWORK", "GameFontNormal") | ||
featuresHeading:SetPoint("TOPLEFT", description, "BOTTOMLEFT", 0, -20) | ||
featuresHeading:SetText("|cffFFD700Key Features:|r") | ||
|
||
local features = canvas:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") | ||
features:SetPoint("TOPLEFT", featuresHeading, "BOTTOMLEFT", 0, -10) | ||
features:SetWidth(500) | ||
features:SetText("- Custom level-up notifications with vibrant animations.\n" .. "- Displays stats gained on level-up (Strength, Agility, etc.).\n" .. "- Automatically performs the /cheer emote to celebrate.\n" .. "- Prevents overlapping notifications for seamless display.\n" .. "- Test effects easily with the /leveluptest command.") | ||
|
||
-- Purpose Section | ||
local purposeHeading = canvas:CreateFontString(nil, "ARTWORK", "GameFontNormal") | ||
purposeHeading:SetPoint("TOPLEFT", features, "BOTTOMLEFT", 0, -20) | ||
purposeHeading:SetText("|cffFFD700Why Choose LevelUpFX?|r") | ||
|
||
local purpose = canvas:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") | ||
purpose:SetPoint("TOPLEFT", purposeHeading, "BOTTOMLEFT", 0, -10) | ||
purpose:SetWidth(500) | ||
purpose:SetText("LevelUpFX was crafted to make leveling up in Classic WoW a truly celebratory moment. With sleek visuals and interactive features, it enhances your journey through Azeroth, turning each level-up into a memory worth cherishing.") | ||
|
||
-- Slash Commands Section | ||
local commandsHeading = canvas:CreateFontString(nil, "ARTWORK", "GameFontNormal") | ||
commandsHeading:SetPoint("TOPLEFT", purpose, "BOTTOMLEFT", 0, -20) | ||
commandsHeading:SetText("|cffFFD700Slash Commands:|r") | ||
|
||
local commands = canvas:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") | ||
commands:SetPoint("TOPLEFT", commandsHeading, "BOTTOMLEFT", 0, -10) | ||
commands:SetWidth(500) | ||
commands:SetText("/leveluptest - Test the addon and preview notifications.") | ||
|
||
-- Contributions Section | ||
local contributionsHeading = canvas:CreateFontString(nil, "ARTWORK", "GameFontNormal") | ||
contributionsHeading:SetPoint("TOPLEFT", commands, "BOTTOMLEFT", 0, -20) | ||
contributionsHeading:SetText("|cffFFD700Feedback & Support:|r") | ||
|
||
-- PayPal Button | ||
local paypalButton = CreateFrame("Button", nil, canvas, "UIPanelButtonTemplate") | ||
paypalButton:SetPoint("TOPLEFT", contributionsHeading, "BOTTOMLEFT", 0, -10) | ||
paypalButton:SetSize(150, 25) | ||
paypalButton:SetText("Donate via PayPal") | ||
paypalButton:SetScript("OnClick", function() | ||
print("Visit this link to donate: https://www.paypal.com/paypalme/kkthnxtv") | ||
end) | ||
paypalButton:SetScript("OnEnter", function(self) | ||
GameTooltip:SetOwner(self, "ANCHOR_RIGHT") | ||
GameTooltip:SetText("Click to open the donation link.") | ||
GameTooltip:Show() | ||
end) | ||
paypalButton:SetScript("OnLeave", function() | ||
GameTooltip:Hide() | ||
end) | ||
|
||
-- Feedback Button | ||
local feedbackButton = CreateFrame("Button", nil, canvas, "UIPanelButtonTemplate") | ||
feedbackButton:SetPoint("TOPLEFT", paypalButton, "BOTTOMLEFT", 0, -10) | ||
feedbackButton:SetSize(150, 25) | ||
feedbackButton:SetText("Report Feedback") | ||
feedbackButton:SetScript("OnClick", function() | ||
print("Visit the repository for feedback: https://github.com/Kkthnx-Wow/LevelUpFX") | ||
end) | ||
feedbackButton:SetScript("OnEnter", function(self) | ||
GameTooltip:SetOwner(self, "ANCHOR_RIGHT") | ||
GameTooltip:SetText("Click to open the feedback repository.") | ||
GameTooltip:Show() | ||
end) | ||
feedbackButton:SetScript("OnLeave", function() | ||
GameTooltip:Hide() | ||
end) | ||
|
||
-- Support Section | ||
local supportHeading = canvas:CreateFontString(nil, "ARTWORK", "GameFontNormal") | ||
supportHeading:SetPoint("TOPLEFT", feedbackButton, "BOTTOMLEFT", 0, -20) | ||
supportHeading:SetText("|cffFFD700Support:|r") | ||
|
||
local support = canvas:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall") | ||
support:SetPoint("TOPLEFT", supportHeading, "BOTTOMLEFT", 0, -10) | ||
support:SetWidth(500) | ||
support:SetText("Have feedback, ideas, or bugs to report? Click 'Report Feedback' or contact us directly. Thank you for using LevelUpFX!") | ||
end | ||
|
||
-- Register the About canvas with the interface | ||
namespace:RegisterSubSettingsCanvas("About LevelUpFX", CreateAboutCanvas) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
local _, namespace = ... | ||
|
||
namespace:RegisterSettings("LevelUpFXDB", { | ||
{ | ||
key = "enableAddon", | ||
type = "toggle", | ||
title = "Enable LevelUpFX", | ||
tooltip = "Enable or disable the LevelUpFX addon.", | ||
default = true, | ||
}, | ||
{ | ||
key = "cheerOnLevelUp", | ||
type = "toggle", | ||
title = "Cheer on Level Up", | ||
tooltip = "50% chance to perform the 'CHEER' emote when you level up.", | ||
default = false, | ||
}, | ||
{ | ||
key = "chatEmoteOnLevelUp", | ||
type = "toggle", | ||
title = "Send Level-Up Emote in Chat", | ||
tooltip = "Send a message to the chat indicating you leveled up.", | ||
default = false, | ||
}, | ||
{ | ||
key = "frameScale", | ||
type = "slider", | ||
title = "Frame Scale", | ||
tooltip = "Adjust the scale of the level-up notification frame.", | ||
default = 0.9, | ||
minValue = 0.5, | ||
maxValue = 1.0, | ||
valueStep = 0.1, | ||
valueFormat = "%.1f", -- Format value to 1 decimal place | ||
}, | ||
}) | ||
|
||
namespace:RegisterOptionCallback("enableAddon", function(value) | ||
if not value then | ||
-- Hide the frame if the addon is disabled | ||
if namespace.currentFrame then | ||
namespace.currentFrame:Hide() | ||
end | ||
-- print("|cff5bc0beLevelUpFX|r |cffff0000disabled.|r") | ||
else | ||
-- print("|cff5bc0beLevelUpFX|r |cff00ff00enabled.|r") | ||
end | ||
end) | ||
|
||
namespace:RegisterOptionCallback("frameScale", function(value) | ||
if namespace.currentFrame then | ||
namespace.currentFrame:SetScale(value) | ||
end | ||
end) | ||
|
||
namespace:RegisterOptionCallback("cheerOnLevelUp", function(value) | ||
namespace.cheerEnabled = value | ||
end) | ||
|
||
namespace:RegisterOptionCallback("chatEmoteOnLevelUp", function(value) | ||
namespace.chatEmoteEnabled = value | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Ui> | ||
<Script file='modules/build.lua'/> | ||
<Script file='modules/misc.lua'/> | ||
<Script file='modules/event.lua'/> | ||
<Script file='modules/input.lua'/> | ||
<Script file='modules/output.lua'/> | ||
<Script file='modules/defer.lua'/> | ||
<Script file='modules/locale.lua'/> | ||
<Script file='modules/load.lua'/> | ||
<Script file='modules/widgets.lua'/> | ||
<Script file='modules/settings.lua'/> | ||
<Script file='modules/library.lua'/> | ||
<Script file='modules/object.lua'/> | ||
</Ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
local _, addon = ... | ||
|
||
--[[ namespace:IsRetail() | ||
Checks if the current client is running the "retail" version. | ||
--]] | ||
function addon:IsRetail() | ||
return WOW_PROJECT_ID == WOW_PROJECT_MAINLINE | ||
end | ||
|
||
--[[ namespace:IsClassicEra() | ||
Checks if the current client is running the "classic era" version (e.g. vanilla). | ||
--]] | ||
function addon:IsClassicEra() | ||
return WOW_PROJECT_ID == WOW_PROJECT_CLASSIC | ||
end | ||
|
||
--[[ namespace:IsClassic() | ||
Checks if the current client is running the "classic" version. | ||
--]] | ||
function addon:IsClassic() | ||
-- instead of using the floating constant for classic we'll just NOR the other two, | ||
-- as they are static | ||
return not addon:IsRetail() and not addon:IsClassicEra() | ||
end | ||
|
||
local _, buildVersion, _, interfaceVersion = GetBuildInfo() | ||
--[[ namespace:HasBuild(_buildNumber_[, _interfaceVersion_]) | ||
Checks if the current client is running a build equal to or newer than the specified. | ||
Optionally also check against the interface version. | ||
--]] | ||
function addon:HasBuild(build, interface) | ||
if interface and interfaceVersion < interface then | ||
return | ||
end | ||
|
||
return tonumber(buildVersion) >= build | ||
end |
Oops, something went wrong.