Delete FB_OutfitDisplayFrame directory

This commit is contained in:
Lexie
2023-04-07 12:03:21 +10:00
committed by GitHub
parent 89df898cf9
commit 6f2a6a026e
8 changed files with 0 additions and 534 deletions
-8
View File
@@ -1,8 +0,0 @@
<Bindings>
<!-- window commands -->
<Binding name="TOGGLEFISHINGBUDDY_OUT" header="FISHINGBUDDY_BINDINGS">
if ( keystate == "down" ) then
ToggleFishingBuddyFrame("FishingOutfitFrame");
end
</Binding>
</Bindings>
@@ -1,11 +0,0 @@
## Interface: 11200
## Title: Fishing Buddy - Outfit Frame
## Version: 0.8.9 Beta 10
## Author: Sutorix=AT=hotmail.com
## RequiredDeps: OutfitDisplayFrame, FishingBuddy
## SavedVariablesPerCharacter: FBODF_PlayerInfo
localization.lua
localization.de.lua
localization.es.lua
localization.fr.lua
FishingOutfitFrame.xml
@@ -1,294 +0,0 @@
-- Wrap OutfitDisplayFrame with our "improvements"
FB_OutfitFrame = {};
FB_ODFConstants = {};
local DEFAULTUPDATE_WAIT = 0.1;
local function StylePoints(outfit)
local isp = FishingBuddy.OutfitManager.ItemStylePoints;
local points = 0;
if ( outfit )then
for slot in pairs(outfit) do
if ( outfit[slot].item ) then
local _,_,check, enchant = string.find(outfit[slot].item,
"^(%d+):(%d+)");
points = points + isp(check, enchant);
end
end
end
return points;
end
local match;
local function ItemBonusPoints(item)
local points = 0;
if ( item and item ~= "" ) then
if ( not match ) then
match = FishingBuddy.GetFishingSkillName().." %+(%d+)";
end
FishingOutfitTooltip:SetHyperlink("item:"..item);
local bodyslot = FishingOutfitTooltipTextLeft2:GetText();
local textline = 2;
while (bodyslot) do
local _,_,bonus = string.find(bodyslot, match);
if bonus then
points = points + bonus;
end
textline = textline + 1;
bodyslot = getglobal("FishingOutfitTooltipTextLeft"..textline):GetText();
end
-- See if the Eternium Fishing Line has been applied
local _,_,check, enchant = string.find(item, "^(%d+):(%d+)");
if ( enchant == "2603" ) then
points = points + 5;
end
end
return points;
end
local function BonusPoints(outfit)
local points = 0;
if ( outfit )then
for slot in pairs(outfit) do
points = points + ItemBonusPoints(outfit[slot].item);
end
end
return points;
end
local function UpdateSwitchButton(outfit)
local msg = OutfitDisplayFrame_SwitchWillFail(FishingOutfitFrame, outfit);
if ( outfit and not msg ) then
FishingOutfitSwitchButton:Enable();
else
FishingOutfitSwitchButton:Disable();
end
end
-- outfit support functions
local function GetWasWearing()
if FBODF_PlayerInfo["WasWearing"] then
return FBODF_PlayerInfo["WasWearing"];
end
end
local function SetWasWearing(outfit)
FBODF_PlayerInfo["WasWearing"] = outfit;
end
local function GetOutfit()
return FBODF_PlayerInfo["Outfit"];
end
local saved_outfit;
local function SetOutfit(outfit)
saved_outfit = outfit;
FBODF_PlayerInfo["Outfit"] = outfit;
end
local function StyleString(long, points)
if ( points == 1 ) then
pstring = FBConstants.POINT;
else
pstring = FBConstants.POINTS;
end
if ( long ) then
return FB_ODFConstants.STYLEPOINTS..points.." "..pstring;
else
return FB_ODFConstants.CONFIG_STYLISH_TEXT..points.." "..pstring;
end
end
local function UpdateStyleInfo(outfit)
local points = BonusPoints(outfit);
if ( points >= 0 ) then
points = "+"..points;
else
points = 0 - points;
points = "-"..points;
end
FishingOutfitSkill:SetText(FB_ODFConstants.CONFIG_SKILL_TEXT..points);
points = StylePoints(outfit);
FishingOutfitStyle:SetText(StyleString(false, points));
end
local function ODF_Initialize()
OutfitDisplayFrame_SetOutfit(FishingOutfitFrame, saved_outfit);
end
-- the user has chosen us, make sure everything is set up the way we need
local function ODF_Choose(useme)
if ( useme ) then
FishingBuddy.EnableSubFrame("FishingOutfitFrame");
else
FishingBuddy.DisableSubFrame("FishingOutfitFrame");
end
end
FB_OutfitFrame.Choose = ODF_Choose;
-- only have one outfit at the moment
-- don't switch if
-- we can't find everything in the outfit
-- we have saved stuff but we're not wearing everything in the outfit
-- We don't have the outfit display frame!
local function ODF_Switch()
if (CursorHasItem()) then
FishingBuddy.UIError(FB_ODFConstants.CURSORBUSYMSG);
return false;
end
if ( OutfitDisplayFrame_IsSwapping() ) then
FishingBuddy.UIError(OUTFITDISPLAYFRAME_TOOFASTMSG);
return false;
end
local isfishing = FishingBuddy.API.IsFishingPole();
local outfit = GetOutfit();
local waswearing = GetWasWearing();
if ( waswearing ) then
local msg;
if ( isfishing ) then
msg = OutfitDisplayFrame_SwitchWillFail(FishingOutfitFrame, waswearing);
else
msg = FB_ODFConstants.CANTSWITCHBACK;
SetWasWearing(nil);
end
if ( msg ) then
FishingBuddy.UIError(msg);
return false;
end
local check = OutfitDisplayFrame_SwitchOutfit(waswearing);
if ( check ) then
SetWasWearing(nil);
end
return true; -- look for pole
elseif ( outfit ) then
local msg;
if ( not isfishing ) then
msg = OutfitDisplayFrame_SwitchWillFail(FishingOutfitFrame, outfit);
else
msg = FB_ODFConstants.POLEALREADYEQUIPPED;
end
if ( msg ) then
FishingBuddy.UIError(msg);
return false;
end
local waswearing = OutfitDisplayFrame_SwitchOutfit(outfit);
if ( waswearing ) then
SetWasWearing(waswearing);
end
return false; -- look for no pole
else
FishingBuddy.UIError(FB_ODFConstants.NOOUTFITDEFINED);
end
end
local updateWait = DEFAULTUPDATE_WAIT;
FB_OutfitFrame.Update = function(elapsed)
updateWait = updateWait - elapsed;
if ( updateWait <= 0 ) then
UpdateSwitchButton(saved_outfit);
UpdateStyleInfo(saved_outfit);
FishingOutfitUpdate:Hide();
end
end
local function CustomTooltip(button)
if ( button and button.item ) then
local _,_,check, enchant = string.find(button.item, "^(%d+):(%d+)");
local points = FishingBuddy.OutfitManager.ItemStylePoints(check, enchant);
if ( points > 0 ) then
GameTooltip:AddLine(StyleString(true, points));
end
end
end
local function OutfitChanged(button)
local outfit = OutfitDisplayFrame_GetOutfit(FishingOutfitFrame);
if ( outfit ) then
SetOutfit(outfit);
end
updateWait = DEFAULTUPDATE_WAIT;
FishingOutfitUpdate:Show();
FishingOutfitFrame.valid = true;
end
FB_OutfitFrame.OnShow = function()
if ( not this.valid ) then
saved_outfit = GetOutfit();
end
OutfitDisplayFrame_SetOutfit(FishingOutfitFrame, saved_outfit);
UpdateSwitchButton(saved_outfit);
if ( not this.valid ) then
OutfitChanged();
end
end
FB_OutfitFrame.OnLoad = function()
-- Handle the override
OutfitDisplayFrame_OnLoad();
FishingOutfitSkill.tooltip = FB_ODFConstants.CONFIG_SKILL_INFO;
FishingOutfitStyle.tooltip = FB_ODFConstants.CONFIG_STYLISH_INFO;
FishingOutfitSwitchButton:SetText(FB_ODFConstants.SWITCHOUTFIT);
FishingOutfitSwitchButton.tooltip = FB_ODFConstants.SWITCHOUTFIT_INFO;
FishingOutfitFrame.OutfitChanged = OutfitChanged;
FishingOutfitFrame.CustomTooltip = CustomTooltip;
FishingBuddy.OutfitManager.RegisterManager("OutfitDisplayFrame",
ODF_Initialize,
ODF_Choose,
ODF_Switch);
this:RegisterEvent("VARIABLES_LOADED");
end
FB_OutfitFrame.OnEvent = function()
if ( event == "VARIABLES_LOADED" ) then
FishingBuddy.ManageFrame(this,
FB_ODFConstants.OUTFITS_TAB,
FB_ODFConstants.OUTFITS_INFO,
"_OUT");
this:UnregisterEvent("VARIABLES_LOADED");
end
end
FB_OutfitFrame.OnHide = function()
-- OutfitChanged();
end
FB_OutfitFrame.Button_OnClick = function()
-- make sure we have the current state
SetOutfit(OutfitDisplayFrame_GetOutfit(FishingOutfitFrame));
ODF_Switch();
end
-- outfit debugging functions
FishingBuddy.Commands["outfit"] = {};
FishingBuddy.Commands["outfit"].func =
function(what)
if ( what and OutfitDisplayFrame_OnLoad ) then
if ( what == FBConstants.RESET ) then
SetWasWearing(nil);
elseif ( what == "dump" ) then
FishingBuddy.Debug("Outfit");
FishingBuddy.Dump(GetOutfit());
FishingBuddy.Debug("Was Wearing");
FishingBuddy.Dump(GetWasWearing());
end
end
return true;
end;
-- set up
FishingBuddy.Setup.Translate("FB_OutfitDisplayFrame", FB_ODFTranslations, FB_ODFConstants);
if ( not FBODF_PlayerInfo ) then
FBODF_PlayerInfo = {};
FBODF_PlayerInfo["Outfit"] = {};
end
if ( FishingBuddy_Player and FishingBuddy_Player["Outfit"] ) then
for k,v in pairs(FishingBuddy_Player["Outfit"]) do
FBODF_PlayerInfo["Outfit"][k] = v;
end
FishingBuddy_Player["Outfit"] = nil;
end
-- free up the space
FB_ODFTranslations = nil;
@@ -1,123 +0,0 @@
<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">
<Script file="FishingOutfitFrame.lua"/>
<GameTooltip name="FishingOutfitTooltip" frameStrata="TOOLTIP" hidden="true" inherits="GameTooltipTemplate">
<Scripts>
<OnLoad>
this:SetOwner(WorldFrame, "ANCHOR_NONE");
</OnLoad>
</Scripts>
</GameTooltip>
<Button name="FishingOutfitFrameLabel" hidden="false" virtual="true">
<Size>
<AbsDimension x="90" y="16"/>
</Size>
<NormalText name="$parentText" inherits="GameFontNormalSmall" justifyH="LEFT">
<Size>
<AbsDimension x="0" y="0"/>
</Size>
<Anchors>
<Anchor point="LEFT">
<Offset>
<AbsDimension x="3" y="0"/>
</Offset>
</Anchor>
</Anchors>
</NormalText>
<HighlightText name="$parentHighlightText" inherits="GameFontHighlightSmall" justifyH="LEFT">
<Size>
<AbsDimension x="0" y="0"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentText" relativePoint="LEFT"/>
</Anchors>
</HighlightText>
<DisabledText name="$parentDisabledText" inherits="GameFontDisableSmall" justifyH="LEFT">
<Size>
<AbsDimension x="0" y="0"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parentText" relativePoint="LEFT"/>
</Anchors>
</DisabledText>
<Scripts>
<OnEnter>
if ( this.tooltip ) then
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
GameTooltip:SetText(this.tooltip, nil, nil, nil, nil, 1);
GameTooltip:Show();
end
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
</Scripts>
</Button>
<Frame name="FishingOutfitFrame" inherits="OutfitDisplayFrame" setAllPoints="true" enableMouse="true" parent="FishingBuddyFrame" hidden="true">
<Frames>
<Button name="FishingOutfitSkill" inherits="FishingOutfitFrameLabel">
<Anchors>
<Anchor point="RIGHT" relativeTo="$parentHandsSlotCheckBox" relativePoint="LEFT">
<Offset>
<AbsDimension x="-15" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Button>
<Button name="FishingOutfitStyle" inherits="FishingOutfitFrameLabel">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="FishingOutfitSkill" relativePoint="BOTTOMLEFT"/>
</Anchors>
</Button>
<Button name="FishingOutfitSwitchButton" inherits="UIPanelButtonTemplate" text="" hidden="false">
<Size>
<AbsDimension x="160" y="21"/>
</Size>
<Anchors>
<Anchor point="TOP" relativeTo="FishingOutfitFrame" relativePoint="TOP">
<Offset>
<AbsDimension x="0" y="-48"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
FB_OutfitFrame.Button_OnClick();
</OnClick>
<OnEnter>
GameTooltip:SetText(FB_ODFConstants.SWITCHOUTFIT_INFO);
GameTooltip:Show();
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
</Scripts>
</Button>
<Frame name="FishingOutfitUpdate" hidden="true">
<Scripts>
<OnUpdate>
FB_OutfitFrame.Update(arg1);
</OnUpdate>
</Scripts>
</Frame>
</Frames>
<Scripts>
<OnLoad>
FB_OutfitFrame.OnLoad();
</OnLoad>
<OnEvent>
FB_OutfitFrame.OnEvent();
</OnEvent>
<OnShow>
FB_OutfitFrame.OnShow();
</OnShow>
<OnHide>
FB_OutfitFrame.OnHide();
</OnHide>
<OnMouseWheel>
return;
</OnMouseWheel>
</Scripts>
</Frame>
</Ui>
-30
View File
@@ -1,30 +0,0 @@
-- Deutsche
-- lower upper
-- a umlaut \195\164 \195\132
-- o umlaut \195\192 \195\150
-- u umlaut \195\188 \195\156
FB_ODFTranslations["deDE"] = {
DESCRIPTION = "Handhabung deiner Fischereiausr\195\188stung.",
-- Tab labels and tooltips
OUTFITS_INFO = "W\195\164hlen aus, was du beim Fischen tragen willst",
OUTFITS_TAB = "Ausr\195\188stung",
SWITCHOUTFIT = "Ausr\195\188stung wechseln",
SWITCHOUTFIT_INFO = "Schalter zwischen der Fischereiausstattung und was Sie vorher trugen.",
-- Option names and tooltips
CONFIG_SKILL_INFO = "Gesamtausstattungs-Bonus.",
CONFIG_SKILL_TEXT = "Angeln ",
CONFIG_STYLISH_INFO = "Styling-Punkte, inspiriert durch die Draznars Fishing-FAQ auf den (englischen) WoW-Foren.",
CONFIG_STYLISH_TEXT = "Styling: ",
-- messages
CURSORBUSY = "Konnte Ausr\195\188stung nicht wechseln, da Computer mit anderen Aktivit\195\164ten besch\195\164ftigt!",
NOOUTFITDEFINED = "Sie haben keine Ausr\195\188stungsteile in Ihrer Fischenausstattung angegeben.",
POLEALREADYEQUIPPED = "Ihr seid bereits f\195\188rs Angeln ausger\195\188stet.",
CANTSWITCHBACK = "Ihr habt bereits Eure Angelausr\195\188stung entfernt.",
BINDING_NAME_TOGGLEFISHINGBUDDY_OUT = "Outfit-Fenster anzeigen",
};
-23
View File
@@ -1,23 +0,0 @@
FB_ODFTranslations["esES"] = {
DESCRIPTION = "Maneja tu ca\195\177a de pescar.",
-- Tab labels and tooltips
OUTFITS_INFO = "Desviste los que llevas cuando pescas",
OUTFITS_TAB = "Equipos",
SWITCHOUTFIT = "Cambia",
SWITCHOUTFIT_INFO = "Cambia entre el equipo de pesca y lo que llevabas puesto.",
-- Option names and tooltips
CONFIG_SKILL_INFO = "Bonus de equipo total.",
CONFIG_SKILL_TEXT = "Pescando ",
CONFIG_STYLISH_TEXT = "Estilo: ",
-- messages
CURSORBUSYMSG = "no pudo cambiar por estar el cursor ocupado!",
NOOUTFITDEFINED = "No tienes objetos en tu equipo de pesca.",
POLEALREADYEQUIPPED = "Ya estas equipado para pescar.",
CANTSWITCHBACK = "Ya te has quitado el equipamiento de pesca.",
};
-15
View File
@@ -1,15 +0,0 @@
FB_ODFTranslations["frFR"] = {
DESCRIPTION = "Organise votre \195\169quipement.";
-- Tab labels and tooltips
OUTFITS_INFO = "Pr\195\169pare votre equipement de p\195\170che";
OUTFITS = "Equipement";
SHOWLOCATIONS_INFO = "Affiche vos prises class\195\169es par r\195\169gions.";
SWITCHOUTFIT = "Equipement";
SWITCHOUTFIT_INFO = "Vous habille avec votre \195\169quipement de p\195\170che, ou vous r\195\169habille comme avant.";
CONFIG_SKILL_TEXT = "P\195\170che ";
BINDING_NAME_TOGGLEFISHINGBUDDY_OUT = "Toggle: #NAME# (Panneau d'\195\169quipement)";
};
-30
View File
@@ -1,30 +0,0 @@
-- default to American English
FB_ODFTranslations = {};
FB_ODFTranslations["enUS"] = {
NAME = "Fishing Buddy - Outfit Frame",
DESCRIPTION = "Manage your fishing outfit.",
-- Tab labels and tooltips
OUTFITS_INFO = "Pick out what to wear when fishing",
OUTFITS_TAB = "Outfits",
SWITCHOUTFIT = "Switch",
SWITCHOUTFIT_INFO = "Switch between the fishing outfit and what you were wearing before.",
-- Option names and tooltips
CONFIG_SKILL_INFO = "Total outfit skill bonus.",
CONFIG_SKILL_TEXT = "Fishing ",
CONFIG_STYLISH_INFO = "Style points loosely inspired by Draznar's Fishing FAQ in the WoW forums.",
CONFIG_STYLISH_TEXT = "Style: ",
-- messages
CURSORBUSYMSG = "Couldn't switch because the cursor is busy!",
NOOUTFITDEFINED = "You don't have any items in your fishing outfit.",
POLEALREADYEQUIPPED = "You're already equipped for fishing.",
CANTSWITCHBACK = "You've already removed your fishing equipment.",
STYLEPOINTS = "Draznar's style score: ",
BINDING_NAME_TOGGLEFISHINGBUDDY_OUT = "Toggle #NAME# Outfit Pane",
};