This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
acr [2016/04/15 15:30] – ace | acr [2022/08/25 08:06] (current) – anyone | ||
---|---|---|---|
Line 85: | Line 85: | ||
GUI:End() | GUI:End() | ||
end | end | ||
+ | end | ||
+ | |||
+ | -- Adds a customizable header to the top of the ffxivminion task window. | ||
+ | function profile.DrawHeader() | ||
+ | |||
+ | end | ||
+ | |||
+ | -- Adds a customizable footer to the top of the ffxivminion task window. | ||
+ | function profile.DrawFooter() | ||
+ | |||
end | end | ||
Line 117: | Line 127: | ||
-- Return the profile to ACR, so it can be read. | -- Return the profile to ACR, so it can be read. | ||
return profile | return profile | ||
+ | |||
+ | </ | ||
+ | |||
+ | ==== Pushing Routines API ==== | ||
+ | |||
+ | <code lua> | ||
+ | |||
+ | -- This code is an example of how to push routines into ACR using the new API call. | ||
+ | -- This isn't required anymore. Simply placing your ACR LUA file into a folder named CombatRoutines is enough for the ACR module to detect and load your ACR. | ||
+ | |||
+ | acelib.routinePath = GetStartupPath()..[[\LuaMods\AceLib\CombatRoutines\]] --this can be any subfolder, I'm using the old structure for ease | ||
+ | |||
+ | function AceLib.LoadCombatProfile(filename, | ||
+ | if (acelib.ModuleFunctions and acelib.ModuleFunctions.ReadModuleFile) then | ||
+ | local fileInfo = { p = " | ||
+ | local fileString = acelib.ModuleFunctions.ReadModuleFile(fileInfo) | ||
+ | if (fileString) then | ||
+ | local fileFunction, | ||
+ | if (fileFunction) then | ||
+ | local ok, profileData = pcall(fileFunction) | ||
+ | if (ok and profileData ~= nil) then | ||
+ | ACR.AddPrivateProfile(profileData, | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | else | ||
+ | if (filename ~= "" | ||
+ | local profileData, | ||
+ | if (ValidTable(profileData)) then | ||
+ | ACR.AddPrivateProfile(profileData, | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | end | ||
+ | |||
+ | function AceLib.LoadCombatProfiles() | ||
+ | AceLib.LoadCombatProfile(" | ||
+ | end | ||
+ | |||
+ | -- Final call should be done in a ModuleInit so that all modules can finish loading other API where required. | ||
+ | function acelib.ModuleInit() | ||
+ | AceLib.LoadCombatProfiles() | ||
+ | end | ||
</ | </ |