Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- If you want your preset to work alongside the menu, you have to make some changes to it. The problem is that all the on* functions like onDrawCustomHud can only exist once. So if you require the menu and then your preset, you will basically override the onDrawCustomHud function of the menu and it will never show up. There is something which can be done so there can be multiple on* functions. Consider adding this code above your onDrawCustomHud function:
- local onDrawCustomHudOld
- if type(onDrawCustomHud) == "function" then
- onDrawCustomHudOld = onDrawCustomHud
- end
- Then at the very beginning of onDrawCustomHud you add:
- if onDrawCustomHudOld then onDrawCustomHudOld(res_x, res_y) end
- What it does is it first checks if there already exists an onDrawCustomHud function and saves it as onDrawCustomHudOld. Then we overwrite the onDrawCustomHud function with our own. Inside of it we check if onDrawCustomHudOld is set and if it is, we call it. The same can and *should* be done for every on* function. Of course you have to change the name to the corresponding function like onQueueAccolade, onChatMessage, onAddToCombatLog etc.
- These changes make it possible to load your HUD/preset alongside the menu and all its hud modules. Even multiple huds could be loaded at the same time that way.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement