Thanks for the reply.
I actually have 3 different sliders, so that is why I have 3 different functions for them.
As for making the functions local, when would it be a good idea NOT to make them local? I haven't really learned about this much so that is why I haven't done any local functions.
The "rmscaletitle" is a little fontstring under my slider that shows the current value of the slider. This way the user can see what it actually is at that moment in time.
I've used the exact method I am right now with a fontstring and just used
:SetFont instead of
:SetScale, so I am really confused why it won't work for the runes.
As for looking at other addons, I am pretty sure there is no other addon that uses a scale slider to change the Blizzard Rune Frames
Thanks for your help so far.
EDIT: Anyway, since I am still stumped at this scale slider thing, I'll go ahead and post my other problem:
I made a checkbox to unlock and lock the runes. When I check or uncheck it nothing happens. (Exactly the same problem with my scale slider.) Here is the code:
Creation of the Checkbox
Code:
rmlock = CreateFrame("CheckButton", "RuneMover_FrameLock", rmframe, "OptionsCheckButtonTemplate");
_G[rmlock:GetName().."Text"]:SetText("Unlock Runes")
rmlock:SetScript('OnShow', function(self) self:SetChecked(RuneMoverDB.unlocked) end)
rmlock:SetScript('OnClick', RuneMover_Lock)
rmlock:SetPoint('BOTTOM', rmtitle, 'BOTTOM', 0, -40)
Lock/Unlock Function
Code:
function RuneMover_Lock(self)
if self then
RuneMoverDB.unlocked = self:GetChecked()
end
if RuneMoverDB.unlocked then
for i, v in ipairs(runes) do
v:EnableMouse(true)
v:SetMovable(true)
v:RegisterForDrag("LeftButton")
v:SetScript("OnDragStart", function() v:StartMoving() end)
v:SetScript("OnDragStop", function() v:StopMovingOrSizing()
RuneMover_Save() end)
end
else
for i, v in ipairs(runes) do
v:EnableMouse(false)
v:SetMovable(false)
end
end
end