Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
muleyo committed Dec 9, 2022
1 parent 4a38ef3 commit 66cccf7
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 11 deletions.
1 change: 1 addition & 0 deletions .pkgmeta
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ externals:
Libs/AceDBOptions-3.0: https://repos.curseforge.com/wow/ace3/trunk/AceDBOptions-3.0
Libs/AceEvent-3.0: https://repos.curseforge.com/wow/ace3/trunk/AceEvent-3.0
Libs/AceGUI-3.0: https://repos.curseforge.com/wow/ace3/trunk/AceGUI-3.0
Libs/AceGUI-3.0-SharedMediaWidget: https://repos.wowace.com/wow/ace-gui-3-0-shared-media-widgets/trunk
Libs/AceHook-3.0: https://repos.curseforge.com/wow/ace3/trunk/AceHook-3.0
Libs/AceTimer-3.0: https://repos.curseforge.com/wow/ace3/trunk/AceTimer-3.0
Libs/CallbackHandler-1.0: https://repos.wowace.com/wow/callbackhandler/trunk/CallbackHandler-1.0
Expand Down
30 changes: 25 additions & 5 deletions Config/Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function PPF_Config:OnEnable()
PPF:OnEvent()

local anchor = _G["CompactPartyFrameMember" .. GetNumGroupMembers()]
PPF_Pet:SetPoint("LEFT", anchor, "LEFT", 0, PPF_DB.position)
PPF_Pet:SetPoint("LEFT", anchor, "LEFT", PPF_DB.positionx, PPF_DB.positiony)
PPF_Pet.name:SetText("TESTFRAME")

-- Show frames if they got hidden earlier
Expand Down Expand Up @@ -115,7 +115,27 @@ function PPF_Config:OnEnable()
return PPF_DB.width
end
},
position = {
positionx = {
type = 'range',
order = 3,
name = 'X-Position',
desc = 'Adjust the Frame X-Position (ONLY WORKS IN TESTMODE!)',
width = 'full',
min = -100,
max = 100,
step = 0.1,
set = function(_, val)
if PPF.testmode then
local anchor = _G["CompactPartyFrameMember" .. GetNumGroupMembers()]
PPF_Pet:SetPoint("LEFT", anchor, "LEFT", val, PPF_DB.positiony)
PPF_DB.positionx = val
end
end,
get = function()
return PPF_DB.positionx
end
},
positiony = {
type = 'range',
order = 3,
name = 'Y-Position',
Expand All @@ -127,12 +147,12 @@ function PPF_Config:OnEnable()
set = function(_, val)
if PPF.testmode then
local anchor = _G["CompactPartyFrameMember" .. GetNumGroupMembers()]
PPF_Pet:SetPoint("LEFT", anchor, "LEFT", 0, val)
PPF_DB.position = val
PPF_Pet:SetPoint("LEFT", anchor, "LEFT", PPF_DB.positionx, val)
PPF_DB.positiony = val
end
end,
get = function()
return PPF_DB.position
return PPF_DB.positiony
end
},
textureHeader = {
Expand Down
3 changes: 2 additions & 1 deletion Config/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ function PPF:OnInitialize()
local defaults = {
profile = {
width = 72,
position = -55,
positionx = 0,
positiony = -55,
texture = [[Interface\RaidFrame\Raid-Bar-Hp-Fill]],
enabled = true
}
Expand Down
10 changes: 5 additions & 5 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function PPF_Core:OnEnable()
elseif (IsInParty()) and not IsInRaid() then
if UnitExists("pet") then
local anchor = _G["CompactPartyFrameMember" .. GetNumGroupMembers()]
PPF_Pet:SetPoint("LEFT", anchor, "LEFT", 0, PPF_DB.position)
PPF_Pet:SetPoint("LEFT", anchor, "LEFT", PPF_DB.positionx, PPF_DB.positiony)
PPF_Pet.name:SetText(UnitName("pet"))

-- Show frames if they got hidden earlier
Expand All @@ -37,7 +37,7 @@ function PPF_Core:OnEnable()
if UnitExists("pet") then
PPF_P1:SetPoint("LEFT", PPF_Pet, "LEFT", 0, -30.5)
else
PPF_P1:SetPoint("LEFT", _G["CompactPartyFrameMember" .. GetNumGroupMembers()], "LEFT", 0, PPF_DB.position)
PPF_P1:SetPoint("LEFT", _G["CompactPartyFrameMember" .. GetNumGroupMembers()], "LEFT", PPF_DB.positionx, PPF_DB.positiony)
end

-- Set Name
Expand All @@ -58,7 +58,7 @@ function PPF_Core:OnEnable()
elseif UnitExists("pet") then
PPF_P2:SetPoint("LEFT", PPF_Pet, "LEFT", 0, -30.5)
else
PPF_P2:SetPoint("LEFT", _G["CompactPartyFrameMember" .. GetNumGroupMembers()], "LEFT", 0, PPF_DB.position)
PPF_P2:SetPoint("LEFT", _G["CompactPartyFrameMember" .. GetNumGroupMembers()], "LEFT", PPF_DB.positionx, PPF_DB.positiony)
end

-- Set Name
Expand All @@ -81,7 +81,7 @@ function PPF_Core:OnEnable()
elseif UnitExists("pet") then
PPF_P3:SetPoint("LEFT", PPF_Pet, "LEFT", 0, -30.5)
else
PPF_P3:SetPoint("LEFT", _G["CompactPartyFrameMember" .. GetNumGroupMembers()], "LEFT", 0, PPF_DB.position)
PPF_P3:SetPoint("LEFT", _G["CompactPartyFrameMember" .. GetNumGroupMembers()], "LEFT", PPF_DB.positionx, PPF_DB.positiony)
end

-- Set Name
Expand All @@ -106,7 +106,7 @@ function PPF_Core:OnEnable()
elseif UnitExists("pet") then
PPF_P4:SetPoint("LEFT", PPF_Pet, "LEFT", 0, -30.5)
else
PPF_P4:SetPoint("LEFT", _G["CompactPartyFrameMember" .. GetNumGroupMembers()], "LEFT", 0, PPF_DB.position)
PPF_P4:SetPoint("LEFT", _G["CompactPartyFrameMember" .. GetNumGroupMembers()], "LEFT", PPF_DB.positionx, PPF_DB.positiony)
end

-- Set Name
Expand Down
1 change: 1 addition & 0 deletions Libs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ AceDB-3.0/**
AceDBOptions-3.0/**
AceEvent-3.0/**
AceGUI-3.0/**
AceGUI-3.0-SharedMediaWidgets/**
AceHook-3.0/**
AceTimer-3.0/**
LibSharedMedia-3.0/**
1 change: 1 addition & 0 deletions PartyPetsFix.toc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## Title: |cff009cffPartyPets Fix|r
## Notes: Makes Raid-Style Partyframe Pets visible again
## SavedVariables: PPFDB
## X-Curse-Project-ID: 729146

## LIBS
Libs\Load.xml
Expand Down

0 comments on commit 66cccf7

Please sign in to comment.