- frame:SetWidth(width+2);
- frame:SetHeight(height+2);
- setupFrame(frame, secure, unit);
+ setupFrame(frame, secure, unit, width, height);
+ RegisterUnitWatch(frame);
+ RegisterUnitWatch(secure);
+ --RegisterStateDriver(secure, "vehicleui", "[vehicleui] vehicle; no");
+ --secure:SetAttribute("_onstate-vehicleui", vehicletoggle);
+end
+
+local function initializePet(parent)
+ local secure = CreateFrame("Button", "OmaPetSecure", parent, inheritedFrames);
+ local frame = CreateFrame("Frame", "OmaPet", parent);
+ local unit = "pet";
+ secure:SetPoint("TOPRIGHT", parent, "TOPLEFT", -10, 0);
+ frame:SetPoint("TOPRIGHT", parent, "TOPLEFT", -10, 0);
+ setupFrame(frame, secure, unit, width/2, height/2);