I'm trying to get my feet wet with LUA and scripting in WoW but I'm having a little bit of trouble with my latest project which is to make a mod that lets me move the casting bar with the mouse and lock it and unlock it with two simple commands.
Here is what I have so far in my .lua:
Code:
function MovableCastingBar_Unlock()
CastingBarFrame:Show();
CastingBarFrame:StartMoving();
end
function MovableCastingBar_Lock()
CastingBarFrame:Hide();
CastingBarFrame:StopMovingOrSizing();
end
CastingBarFrame:SetMovable();
CastingBarFrame:EnableMouse();
SLASH_CASTINGBARUNLOCK1 = "/mcbu";
SLASH_CASTINGBARUNLOCK2 = "/mcbunlock";
SlashCmdList["CASTINGBARUNLOCK"] = MovableCastingBar_Unlock;
SLASH_CASTINGBARLOCK1 = "/mcbl";
SLASH_CASTINGBARLOCK2 = "mcblock";
SlashCmdList["CASTINGBARLOCK"] = MovableCastingBar_Lock;
Whenever I unlock the frame it shows up like it is supposed to, but I cannot move it nor can I touch any of my action bar buttons until I lock it again. When I lock the frame it has not moved at all
Any help would be much appreciated, I am just beginning and having troubles