Hey everyone, Im currently trying to learn how window manager works. For my example all I want to do is display the curent FPS on screen. (I know this is something the default game can do) I have a couple questions on how it works.
First of all I see a lot of addons set wm = WINDOW_MANAGER. Is this required? Does it just save you from having to type WINDOW_MANAGER everytime. You could put wm.whatever instead?
Secondly how does it actually work. So I want to create my label that says "FPS: XX" xx being the actual framerate taken from GetFramerate()(?) Would my code be something like this
Code:
function AddonName:CreateControl()
fps_label = WINDOW_MANAGER:CreateControl(name, nil(Can I do this here? Do I need a parent?), CT_LABEL)
fps_label:SetText(fps)
Any help is appreciated. I'm sure I'm way off.