So, like the subject says, I'm trying to move the vehicle seat indicator frame.
I took a look through the FrameXML folder and determined (I think) that the frame is called VehicleSeatIndicator. So, I tried doing a simple
This unfortunately had no effect. I'm pretty lua retarded, I can edit oUF layouts and change fonts and textures and positions of things pretty easily, but anything more than that is beyond my knowledge. If anyone's successfully done this, or has the time to look into it for me I'd appreciate it.
So, like the subject says, I'm trying to move the vehicle seat indicator frame.
I took a look through the FrameXML folder and determined (I think) that the frame is called VehicleSeatIndicator. So, I tried doing a simple
This unfortunately had no effect. I'm pretty lua retarded, I can edit oUF layouts and change fonts and textures and positions of things pretty easily, but anything more than that is beyond my knowledge. If anyone's successfully done this, or has the time to look into it for me I'd appreciate it.
I haven't done it in .lua, but i have sucessfully moved it with Visor2 by activating the VehicleSeatIndicator frame (found it by using framefind on the seat indidator and then select parent).
VehicleSeatIndicator can only be properly moved by securely hooking VehicleSeatIndicator:SetPoint() and calling the original SetPoint with your desired location everytime VehicleSeatIndicator:SetPoint() is called.
VehicleSeatIndicator can only be properly moved by securely hooking VehicleSeatIndicator:SetPoint() and calling the original SetPoint with your desired location everytime VehicleSeatIndicator:SetPoint() is called.
I see. Well that helps quite a bit. Now I just need to figure out how to do that. Time to hit up wowwiki! :D
Does anyone know of a good tutorial for secure hooks, or know of a mod that uses them to move something with secure hooks that I could look at for reference? I'm having issues understanding how this works, and I find looking at others' code usually helps me quite a bit. Thanks for any help you can provide! :D
Does anyone know of a good tutorial for secure hooks, or know of a mod that uses them to move something with secure hooks that I could look at for reference? I'm having issues understanding how this works, and I find looking at others' code usually helps me quite a bit. Thanks for any help you can provide! :D
I'm not sure this will work as :SetPoint() is a metamethod, but you would do this.
local origsetpoint = getmetatable(VehicleSeatIndicator).__index.SetPoint
local function move(self)
self:ClearAllPoints()
origsetpoint(self, <set point arguments>)
end
hooksecurefunc(VehicleSeatIndicator, "SetPoint", move)
move(VehicleSeatIndicator)
if that doesn't work then you may have to hook the metamethod :SetPoint() and check to see if self == VehicleSeatIndicator.
I took a look through the FrameXML folder and determined (I think) that the frame is called VehicleSeatIndicator. So, I tried doing a simple
This unfortunately had no effect. I'm pretty lua retarded, I can edit oUF layouts and change fonts and textures and positions of things pretty easily, but anything more than that is beyond my knowledge. If anyone's successfully done this, or has the time to look into it for me I'd appreciate it.
I haven't done it in .lua, but i have sucessfully moved it with Visor2 by activating the VehicleSeatIndicator frame (found it by using framefind on the seat indidator and then select parent).
I see. Well that helps quite a bit. Now I just need to figure out how to do that. Time to hit up wowwiki! :D
I'm not sure this will work as :SetPoint() is a metamethod, but you would do this.
if that doesn't work then you may have to hook the metamethod :SetPoint() and check to see if self == VehicleSeatIndicator.
Hope this helps.