-
Notifications
You must be signed in to change notification settings - Fork 2
Home
This guide is for the beginner oUF layout creator. It aims to demostrate how to use oUF in a structured step-by-step way.
- You are familiar with the Lua 5.1 basics (The Lua 5.1 Reference Manual).
- You know how to create a simple addon (Getting started with writing addons).
- Some knowledge in git is a plus (The Git Book).
If you are unfamiliar with the first two topics on this list, then this guide is not for you! Fill your gaps and come back later.
Knowing git might be helpful as it makes it possible to create separate branches for your changes and you can easily restore your local copy of the repository to a known good state if something goes wrong.
The basic intent is for you to follow the commits from start to end and try to recreate them yourself. Feel free to change the code on the go to get a better understanding of how it works.
You can of course download oUF_Layout and try to customize it for your own needs if you think that this better suits the way you learn.
oUF_Layout is not meant for installation. You should rather recreate the layout yourself by following the commits. You have to install the dependencies separately as those are not embedded into the addon. Take a look at oUF_Layout.toc for a list of required and optional dependencies.
You should also install addons for capturing and displaying errors in-game. !BugGrabber and BugSack are a good choice.
If you however want to just install the layout and use it as is, you can download it
here. Rename the extracted folder to oUF_Layout
and
copy/move it to your <WoW folder>\Interface\AddOns
folder.
If you are using git, you can issue the following commands:
cd <WoW folder>\Interface\AddOns
git clone https://github.com/Rainrider/oUF_Layout.git
AdiDebug has been added as an optionial dependency to aid in debugging. The
Debug
function is added to the addon's namespace and can be called like ns.Debug('prefix', 'message')
, where
'prefix' is an optional string you could use for grouping messages, and 'message' is your debug output. It is a vararg
function, so you can pass as many arguments to it as you wish. Objects and values passed to it will be coersed into
their string representation.
Open AdiDebug by using the /ad
or /adidebug
slash commands and then select oUF_Layout from the dropdown menu to see
your debug messages.
The code structure has evolved during the development of oUF_Layout. The current state is as follows:
-
assets
- contains fonts and textures -
elements
- contains code for consuming oUF elements -
elements\custom
- contains implementation of custom oUF elements -
units
- contains the style functions for the different units divided by style type -
fonts.xml
- a XML font template -
layout.lua
- usesoUF:Factory
to spawn and style the frames for all units by calling their respective style functions -
settings.lua
- the configuration file -
utility.lua
- contains some utility functions and auxiliary stuff
Use this to compare your state to the one shown on the images. Please keep in mind that the screenshots were taken at the time of the corresponding commit. Errors or undescribed behaviour might occur if "outside code" (like oUF elements, third party addons or the WoW API) has changed since the commit has been made. Fixes for found problems are introduced in later commits. For some of the screenshots some internal oUF functions were temporary modified (not visible in the code) in order to get a better visual. Those are castbar (for the latency indicator), buffs, debuffs and stagger. Do not wonder if your results differ slightly.
Commit link | Description | Screenshot |
---|---|---|
0862c4 | player and target frames' backdrop | ![]() |
2b43c7 | health bars | ![]() |
d0ad53 | custom health colors | ![]() |
0d7c7a | powerbar | ![]() |
4d1103 | portrait | ![]() |
646484 | castbar | ![]() |
e54528 | castbar text and time | ![]() |
ee1333 | castbar custom time | ![]() |
d7ebd8 / b25f0c | castbar interrupeted/failed | ![]() |
a15b54 | castbar icon | ![]() |
222dce | deathknight runes | ![]() |
14b95f | classpower | ![]() |
2fb771 | context menus | ![]() |
b0ee1d | unit tooltips | ![]() |
5a379c | pet and focus | ![]() |
628f97 | focustarget and targettarget | ![]() |
62017d | castbar pet and focus | ![]() |
de6f82 | aggro highlight | ![]() |
780d53 .. 135feb | power and health text | ![]() |
a7d077 | alt mana text | ![]() |
6d0f39 | info text | ![]() |
986ac4 | debuffs | ![]() |
9f2b77 | buffs | ![]() |
40cef0 | auras | ![]() |
26997f | power prediction | ![]() |
e3bdce | totems | ![]() |
c11ff1 | alternative power | ![]() |
f46d0d | stagger | ![]() |
f1ee0f | dispel highlight | ![]() |
f0c5c2 | artifact power | ![]() |
62eee9 | reputation | ![]() |
efa247 | experience | ![]() |
efa247 | honor | ![]() |
30929b | pvp indicator | ![]() |
bc1f36 | quest indicator | ![]() |
fe6e89 | combat indicator | ![]() |
ddbc7d | phase indicator | ![]() |
You can get help in the oUF section of the WoWInterface forums, but please keep the following in mind:
- put some effort in answering your question yourself before asking others for help, and demonstrate this effort when asking the question
- be able to show all your code
- be receptive for feedback and suggestions