Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
WorldMap: Added new texture files from build 55185
Browse files Browse the repository at this point in the history
  • Loading branch information
hizuro committed Jun 19, 2024
1 parent b7b033b commit d822665
Show file tree
Hide file tree
Showing 5,045 changed files with 13,261 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
89 changes: 89 additions & 0 deletions .release/BetaHotfixes/BetaHotfixes.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@

local addon, ns = ...;
local L,C = ns.L,WrapTextInColorCode;
ns.modules = {};
ns.wowVersion, ns.buildVersion, ns.buildDate, ns.interfaceVersion = GetBuildInfo()

local frame = CreateFrame("frame",addon.."Frame");
local curTT,tMetaData,options;
local on,off = C(VIDEO_OPTIONS_ENABLED:lower(),"ff00ff00"),C(VIDEO_OPTIONS_DISABLED:lower(),"ffff4444");

do
local addon_short = "BH";
local colors = {"82c5ff","00ff00","ff6060","44ffff","ffff00","ff8800","ff44ff","ffffff"};
local function colorize(...)
local t,c,a1 = {tostringall(...)},1,...;
if type(a1)=="boolean" then tremove(t,1); end
if a1~=false then
tinsert(t,1,"|cff82c5ff"..((a1==true and addon_short) or (a1=="||" and "||") or addon).."|r"..(a1~="||" and HEADER_COLON or ""));
c=2;
end
for i=c, #t do
if not t[i]:find("\124c") then
t[i],c = "|cff"..colors[c]..t[i].."|r", c<#colors and c+1 or 1;
end
end
return unpack(t);
end
function ns.print(...)
print(colorize(...));
end
function ns.debug(...)
--print(colorize("<debug>",...));
ConsolePrint(date("|cff999999%X|r"),colorize(...));
end
end

function ns.toggleModule(modName,startup)
if modName==true then
for modName in pairs(ns.modules) do
if ns.modules[modName].state == nil then
ns.modules[modName].state = false;
end
ns.toggleModule(modName,true);
end
elseif modName and ns.modules[modName] and (not ns.modules[modName].hidden) then
if not startup then
BetaHotfixDB.modules[modName] = not BetaHotfixDB.modules[modName];
end
if ns.modules[modName].state ~= BetaHotfixDB.modules[modName] then
ns.modules[modName].state = ns.modules[modName].func(BetaHotfixDB.modules[modName]);
end
end
end

frame:SetScript("OnEvent",function(self,event,...)
local name = ...;
if event=="ADDON_LOADED" and addon==... then
ns.print(L.AddOnLoaded);
if not ns.Options_Init() then
ns.print("||","|cffff4444"..L.BuildChanged.."|r");
end

ns.DataBroker_Init();

for modName,modData in pairs(ns.modules) do
-- register options
if modData.options then
ns.Options_AddModule(modName,modData);
end
end
elseif event=="PLAYER_LOGIN" then
for modName,modData in pairs(ns.modules) do
if modData.on_toggle and modData.options and modData.defaults then
for k,v in pairs(modData.defaults)do
modData.on_toggle(k);
end
end
end
end
-- module events
if self.modEvents and self.modEvents[event] then
for i=1, #self.modEvents[event] do
ns.modules[self.modEvents[event][i]].events[event](...);
end
end
end);

frame:RegisterEvent("ADDON_LOADED");
frame:RegisterEvent("PLAYER_LOGIN");
22 changes: 22 additions & 0 deletions .release/BetaHotfixes/BetaHotfixes.toc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Interface: 110000
## Title: BetaHotfixes
## IconTexture: 648632
## Notes: Temporary fix for some problems with the user interface in the current WoW Beta.
## Notes-deDE: Vorrübergebende Fehlerkorrektur für einige Problem mit dem Bedienoberfläche in der aktuellen WoW Beta.
## Author: Hizuro
## Version: TWW-1.0.1-beta
## X-Info: EpicEdition hat sich endlich mal ausgezahlt. :-)
## X-URL: https://wow.hizuro.de/addons/betahotfixes/
## X-GIT-URL: https://github.com/HizurosWoWAddOns/BetaHotfixes
## SavedVariables: BetaHotfixDB

#@no-lib-strip@
libs\LibStub\LibStub.lua
libs\CallbackHandler-1.0\CallbackHandler-1.0.lua
libs\AceGUI-3.0\AceGUI-3.0.xml
libs\AceConfig-3.0\AceConfig-3.0.xml
libs\LibDataBroker-1.1\LibDataBroker-1.1.lua
libs\LibDBIcon-1.0\LibDBIcon-1.0.lua
#@end-no-lib-strip@

BetaHotfixes.xml
21 changes: 21 additions & 0 deletions .release/BetaHotfixes/BetaHotfixes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

<!-- localizations -->
<Script file="localization.lua"/>

<!-- core -->
<Script file="BetaHotfixes.lua"/>
<Script file="BetaHotfixes_DataBroker.lua"/>
<Script file="BetaHotfixes_Options.lua"/>

<!-- modules -->
<!--Script file="modules\bugreporter.lua"/-->
<!--Script file="modules\chatwindow.lua"/-->
<Script file="modules\worldmap.lua"/>
<Script file="modules\worldmap-data.lua"/>
<Include file="modules\devtools.xml"/>
<Script file="modules\languages.lua"/>
<!--Script file="modules\guild.lua"/-->

</Ui>
221 changes: 221 additions & 0 deletions .release/BetaHotfixes/BetaHotfixes_DataBroker.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@

local addon, ns = ...;
local L,C,module = ns.L,WrapTextInColorCode;

local ACD = LibStub("AceConfigDialog-3.0");
local LDB,menu,_ = {},CreateFrame("frame",addon.."Menu",UIParent,"UIDropDownMenuTemplate");
LDB.Lib = LibStub("LibDataBroker-1.1");
LDB.IconLib = LibStub("LibDBIcon-1.0");

local curTT,tMetaData,options;
local headers = {"Hotfix","Misc","DevTools"};
local on,off = C(VIDEO_OPTIONS_ENABLED,"ff00ff00"),C(VIDEO_OPTIONS_DISABLED,"ffff0000");

local menuList,menuSeparator = {},{
text="", icon="Interface\\Common\\UI-TooltipDivider-Transparent",
hasArrow=false, dist=0, isTitle=true, isUninteractable=true, notCheckable=true, iconOnly=true,
tCoordLeft=0, tCoordRight=1, tCoordTop=0, tCoordBottom=1, tSizeX=0, tSizeY=8, tFitDropDownSizeX=true,
iconInfo={tCoordLeft=0, tCoordRight=1, tCoordTop=0, tCoordBottom=1, tSizeX=0, tSizeY=8, tFitDropDownSizeX=true}
};

local function menuListSortByLabel(a,b)
return a.label < b.label;
end

function LDB.IconCreatedCallback(self,cbEvent,ldbIconFrame,ldbIconName)
if ldbIconName==addon and self.ldbIconChanged==nil then
local highlight, overlay, background, icon = ldbIconFrame:GetRegions();
overlay:SetAtlas("worldquest-tracker-ring",false);
overlay:SetSize(34,34);
overlay:ClearAllPoints();
overlay:SetPoint("CENTER");
background:SetSize(25,25);
icon:SetSize(18,18);
icon:ClearAllPoints();
icon:SetPoint("CENTER");
self.ldbIconChanged=true;
end
end

local function MenuEntryToggle(self)
local mod,key = unpack(self.arg1);
BetaHotfixDB.modules[mod][key] = not BetaHotfixDB.modules[mod][key];
if ns.modules[mod].on_toggle then
ns.modules[mod].on_toggle(key,true);
end
end

local function MenuEntryChecked(self)
local mod,key = unpack(self.arg1);
return BetaHotfixDB.modules[mod][key];
end

local function sortByOrder(a,b)
local a,b = tonumber(a.order) or 100,tonumber(b.order) or 100;
return a<b;
end

local function entries2tooltip(g,k,v,target)
--if modData.options and modData.options.defaults
--tt:AddDoubleLine(C(v.label,"ffffffff"),BetaHotfixDB.modules[k] and on or off);
if g==1 then
target:AddDoubleLine(C(v.name,"ffffffff"),BetaHotfixDB.modules[v.mod][v.key] and on or off);
end
end

local types = {toggle=1, execute=1};
local function entries2menuList(g,i,v,info)
if i==1 then
UIDropDownMenu_AddSeparator(1);
info.text = C(headers[g],"ff44aaff");
info.isTitle=true;
info.notCheckable=1;
UIDropDownMenu_AddButton(info);
info.isTitle=nil;
info.disabled=nil;
end
if v.type=="toggle" then
info.text = v.name;
info.func = MenuEntryToggle;
info.isNotRadio=1;
info.notCheckable=nil;
info.checked=MenuEntryChecked;
info.arg1={v.mod,v.key};
info.keepShownOnClick=true;
elseif v.type=="execute" then
info.text = v.name;
info.notCheckable=1;
info.func=v.func;
info.arg1={v.mod,v.key};
end
if v.desc then
info.tooltipTitle = v.name;
info.tooltipText = v.desc;
info.tooltipWhileDisabled = 1;
info.tooltipOnButton = 1;
end
UIDropDownMenu_AddButton(info);

-- clear
info.keepShownOnClick=nil;
info.isTitle=nil;
info.isNotRadio=1;
info.disabled=nil;
info.notCheckable=nil;
info.tooltipTitle=nil;
info.tooltipText=nil;
info.tooltipWhileDisabled=nil;
info.tooltipOnButton=nil;
info.func=nil;
info.arg1=nil;
info.checked=nil;
end

local function collectEntries(func,target)
local group = {{},{},{}};
for modName,modData in pairs(ns.modules)do
if modData.options then
if modData.options.hotfix then
table.sort(modData.options.hotfix,sortByOrder);
for k,v in pairs(modData.options.hotfix) do
if types[v.type] then
local v = CopyTable(v);
v.mod=modName;
v.key=k
tinsert(group[1],v);
end
end
end
if modName~="languages" and modData.options.misc then
table.sort(modData.options.misc,sortByOrder);
for k,v in pairs(modData.options.misc) do
if types[v.type] then
local v = CopyTable(v);
v.mod=modName;
v.key=k
tinsert(group[2],v);
end
end
end
if modData.options.devtools and BetaHotfixDB.debug_mode then
table.sort(modData.options.devtools,sortByOrder);
for k,v in pairs(modData.options.devtools) do
if types[v.type] then
local v = CopyTable(v);
v.mod=modName;
v.key=k
tinsert(group[3],v);
end
end
end
end
end

for g=1, #group do
if #group[g]>0 then
local header = true;
for i,v in pairs(group[g])do
func(g,i,v,target)
end
end
end
end

local function DropDownMenu_Initialize()
local info = UIDropDownMenu_CreateInfo();
info.notCheckable = 1;

info.text = addon.." - "..L.ShortAccessMenu;
info.notCheckable = 1;
info.isTitle = true;
UIDropDownMenu_AddButton(info);

collectEntries(entries2menuList,info);

UIDropDownMenu_AddSeparator(1);

info.text = L.CloseMenu;
info.func = function()end;
info.notCheckable = 1;
UIDropDownMenu_AddButton(info);
end

function ns.DataBroker_Init()
LDB.Object = LDB.Lib:NewDataObject(addon,{
type = "launcher",
icon = 648632,
label = addon,
text = addon,
OnTooltipShow = function(tt)
curTT = tt;
tt:AddLine(addon);
tt:AddLine(" ");
collectEntries(entries2tooltip,tt);
tt:AddLine(" ");
tt:AddDoubleLine(C(L.LeftClick,"ff00ff00")..":",C(L.ShortAccessMenu,"ff00aaff"));
tt:AddDoubleLine(C(L.RightClick,"ff00ff00")..":",C(OPTIONS,"ff00aaff"));
end,
OnClick = function(self, button)
if button=="LeftButton" then
if curTT then
curTT:Hide();
end
UIDropDownMenu_Initialize(menu, DropDownMenu_Initialize, "MENU");
ToggleDropDownMenu(1, nil, menu, self, 0, 0);
else
if ACD.OpenFrames[addon]~=nil then
ACD:Close(addon);
else
ACD:Open(addon);
end
end
end
});

if BetaHotfixDB.minimap==nil then
BetaHotfixDB.minimap={hide=false,minimapPos=185};
end

LDB.IconLib.RegisterCallback(LDB, "LibDBIcon_IconCreated", "IconCreatedCallback");
LDB.IconLib:Register(addon, LDB.Object, BetaHotfixDB.minimap);
end
Loading

0 comments on commit d822665

Please sign in to comment.