WoWInterface SVN SimpleGold

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 18 to Rev 19
    Reverse comparison

Rev 18 → Rev 19

Readme.txt
1,4 → 1,4
SimpleGold v5.4.4
SimpleGold v5.5.0
 
 
Description
24,7 → 24,7
 
Features
========
* Compatibility with World of Warcraft 5.4.1
* Compatibility with World of Warcraft 7 (Legion)
* Low memory usage (~0.1MB)
 
 
45,6 → 45,10
 
Versions
========
5.5.0 - Jun 23, 2015
* Updated TOC for Wow client 6.2
* Saves window location so it doesn't reset when client is updated
 
5.4.4 - Jun 23, 2015
* Updated TOC for Wow client 6.2
 
SimpleGold.xml
1,4 → 1,4
<!-- SimpleGold 5.4.4 -->
<!-- SimpleGold 5.5.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/
93,12 → 93,21
SimpleGold_StepBackground();
else
if (SimpleGoldSavedVars["locked"] == false) then
self:StartMoving();
if button == "LeftButton" and not self.isMoving then
self:StartMoving();
self.isMoving = true;
end
end
end
</OnMouseDown>
<OnMouseUp>
self:StopMovingOrSizing();
if button == "LeftButton" and self.isMoving then
self:StopMovingOrSizing();
self.isMoving = false;
SimpleGoldSaveLastPosition();
end
 
 
</OnMouseUp>
<OnShow>
SimpleGoldPrefsFrameOnShow();
SimpleGold.lua
53,7 → 53,13
 
}
 
 
-- save last version to detect if client has changed
local prevVersion=1;
if (nil ~= SimpleGoldSavedVars) then
if (nil ~= SimpleGoldSavedVars["clientBuild"]) then
prevVersion=SimpleGoldSavedVars["clientBuild"];
end
end
-- My local functions:
-- ====================
 
79,16 → 85,19
 
function FixVars()
-------- ---------------
local version, build, date, tocversion = GetBuildInfo();
 
-- initialize our saved variables if needed
if (SimpleGoldSavedVars == nil) then
SimpleGoldSavedVars={
xPos=0,
yPos=0,
xPos=-6666,
yPos=-6666,
lastPreset=1,
color={0,0,0,1},
borderStyle=1,
viz=true,
locked=false
locked=false,
clientBuild=tocversion
};
end
if SimpleGoldSavedVars["viz"] == nil then
97,6 → 106,9
if SimpleGoldSavedVars["locked"] == nil then
SimpleGoldSavedVars["locked"]=false;
end
if SimpleGoldSavedVars["clientBuild"] == nil then
SimpleGoldSavedVars["clientBuild"]=tocversion;
end
end
 
 
176,6 → 188,7
DEFAULT_CHAT_FRAME:AddMessage(p..SGOLDTEXT.HIDE .. " - " .. SGOLDTEXT.HIDE_DESCRIPTION, 0.8, 0.8, 0.8, 1);
DEFAULT_CHAT_FRAME:AddMessage(p..SGOLDTEXT.LOCK .. " - " .. SGOLDTEXT.LOCK_DESCRIPTION, 0.8, 0.8, 0.8, 1);
DEFAULT_CHAT_FRAME:AddMessage(p..SGOLDTEXT.UNLOCK .. " - " .. SGOLDTEXT.UNLOCK_DESCRIPTION, 0.8, 0.8, 0.8, 1);
DEFAULT_CHAT_FRAME:AddMessage(p..SGOLDTEXT.CENTER .. " - " .. SGOLDTEXT.CENTER_DESCRIPTION, 0.8, 0.8, 0.8, 1);
DEFAULT_CHAT_FRAME:AddMessage(p..SGOLDTEXT.DELETE .. " {character name} - " .. SGOLDTEXT.DELETE_DESCRIPTION, 0.8, 0.8, 0.8, 1);
end
 
229,9 → 242,15
if ( cmd == SGOLDTEXT.UNLOCK) then
SimpleGoldSavedVars["locked"]=false;
DEFAULT_CHAT_FRAME:AddMessage(SGOLDTEXT.CONFIRM_UNLOCKED, 0.8, 0.8, 0.8, 1);
 
end
 
if ( cmd == SGOLDTEXT.CENTER) then
SimpleGoldSavedVars["locked"]=false;
SimpleGoldPrefsCenter()
DEFAULT_CHAT_FRAME:AddMessage(SGOLDTEXT.CONFIRM_UNLOCKED, 0.8, 0.8, 0.8, 1);
DEFAULT_CHAT_FRAME:AddMessage(SGOLDTEXT.CONFIRM_CENTER, 0.8, 0.8, 0.8, 1);
end
 
end
 
 
267,7 → 286,6
-- GUI Handlers:
-- =============================
 
 
-- prefs:
-- function SimpleGold_Options_OnClick(arg1)
-- id = this:GetID()
278,10 → 296,32
 
 
 
function SimpleGoldPrefsCenter()
--
SimpleGoldSavedVars["xPos"]=0;
SimpleGoldSavedVars["yPos"]=0;
SimpleGoldDisplayFrame:ClearAllPoints();
SimpleGoldDisplayFrame:SetPoint("CENTER", "UIParent", "CENTER", 0, 0);
 
 
end
 
 
 
-- OnShow
function SimpleGoldPrefsFrameOnShow()
-- see if we need to position this frame:
 
if (nil == SimpleGoldSavedVars["xPos"]) then -- No value? Set one
SimpleGoldPrefsCenter();
else
if (-6666 == SimpleGoldSavedVars["xPos"]) then -- Uninitialized value? Set it
SimpleGoldPrefsCenter();
end
end
 
 
 
DrawBG();
SimpleGoldSavedVars["viz"]=true;
-- SimpleGoldUpdate();
363,4 → 403,22
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
end
 
function SimpleGoldSaveLastPosition()
local point, relativeTo, relativePoint, xOff, yOff;
point, relativeTo, relativePoint, xOff, yOff = SimpleGoldDisplayFrame:GetPoint();
 
 
-- <Anchor point="CENTER">
-- <Offset>
-- <AbsDimension x="0" y="0"/>
-- </Offset>
-- </Anchor>
--
 
 
SimpleGoldSavedVars["xPos"]=xOff;
SimpleGoldSavedVars["yPos"]=yOff;
 
 
end
 
\ No newline at end of file
SimpleGold.toc
1,8 → 1,8
## Interface: 60200
## X-Min-Interface: 60200
## Interface: 70000
## X-Min-Interface: 70000
## Title: SimpleGold
## Notes: Creates draggable money window
## Version: 5.4.4
## Version: 5.5.0
## Author: Schnoggo
## Dependencies:
## SavedVariables: SimpleGoldGlobals
localization.lua
1,4 → 1,4
SASSTEXT_TITLE="Schnoggo's Simple Gold Ver. 5.4.4";
SASSTEXT_TITLE="Schnoggo's Simple Gold Ver. 5.5.0";
SGOLDTEXT = {
WELCOME="SimpleGold Loaded. Type /simplegold for more information. ",
HELP="Drag the window to move it. Shift-click the window to change the background. Commands:",
12,12 → 12,15
UNLOCK_DESCRIPTION="allow dragging of the window",
DELETE="delete",
DELETE_DESCRIPTION="removes the character from the cumulative values on this server. (Use after transferring or deleting a character.)",
CENTER="center",
CENTER_DESCRIPTION="center and unlock the money display. (Use if it goes offscreen for some reason.)",
 
CONFIRM_LOCKED="Simplegold money window now locked in position.",
CONFIRM_UNLOCKED="Simplegold money window now free to move.",
CONFIRM_HIDING="Simplegold money is now hidden.",
CONFIRM_SHOWING="Simplegold money is now visible.",
CONFIRM_DELETE="Character _CHARNAME_ removed from list.",
CONFIRM_CENTER="Simplegold money window centered",
NOTOON="Character _CHARNAME_ not found."