WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   oUF Reference or Tuts (https://www.wowinterface.com/forums/showthread.php?t=43715)

Tituspullo_x 07-14-12 12:31 PM

oUF Reference or Tuts
 
Hey,

Just trying out a couple things with oUF.

Is there a more complete reference or anything on how things work?

Just starting this out is pretty confusing, is the only way to figure out how this works either dig through all the core code and look at other peoples layouts and things?

The wiki linked is pretty incomplete, and haven't seen any good tutorials or anything.

How did you guys learn the ins and outs of oUF, was it just spending lots of time looking through the code and others code?

p3lim 07-14-12 01:01 PM

oUF is under construction when it comes to documentation, but the end result will be documentation in the files themselves, or some generated pages from that.

As for learning how it works is just looking at other people's layouts or just use Lua like normal.

Paopao001 07-14-12 04:54 PM

If you are in live realms, oUF_Classic, oUF_Lily, oUF_Simple2 are some of the tutorial layouts for oUF.

You can find a list of HOW TOs with building the basic things of a layout in oUF_Simple2.

Besides, you can start with any layouts you like, too.
But it would be better for you to start with something easy and familiar to you.

If you are in beta realms, oUF_Simple(mop) is a reference layout for beginners.

After knowing the basic things,learning from every most downloaded layouts would surely help you to improve your own.

Phanx 07-14-12 11:19 PM

If you are new to Lua programming, new to WoW addon programming, or even just new to oUF layout programming, I would not recommend oUF_Simple as a good starting point. No offense to zork, but it's massively complicated. I've been writing addons for 6+ years, and maintain some very popular ones (including Grid), but it would take me hours of reading through oUF_Simple just to get to a point where I felt like I had an okay grasp on what was going on throughout the huge, convoluted, split-up codebase.

If you want to write your own layout from scratch, start with oUF_Classic or oUF_Lily. Both are very simple, have everything in one file, use only the core oUF elements, and do not use any third-party libraries, plugins, or modules. It's easy to see how each part works, and how all the parts work together. I'd recommend avoiding complex things like rune and totem displays until you have a solid grasp on the basic things like health bars and text.

If you're already using a layout and just want to change a few things, start there. Identify something you want to change -- preferrably something small -- and then try to change it. If you're having trouble finding which part of the code you need to change, or which functions to use, check out some of these resources, and then post your specific question here and ask for help.

Paopao001 07-15-12 12:25 AM

:) Well, people have different characteristics in the way of thinking and coding.
Hope you will find what fits you ~

zork 07-15-12 09:55 AM

Sry Phanx but I think different on that point. Splitting up code into small pieces that are connected to each other makes it way easier to maintain the code compared to a big chunk of code where everyhting is in one file. Following function calls isn't hard at all.

Nevertheless...that is my opinion. Everyone can have their own.

kaels 07-15-12 01:17 PM

I actually found Simple far, far easier to follow than Classic when I was first poking around.

Looking at Classic and Lily again now that I can actually read the code properly, and...yes, I still find Simple easier.

I think splitting it up into separate files makes it easier to follow. One file provides configuration data. Another file creates functions to construct frames using that config data. A third file creates styles out of those functions and then works with oUF to construct frames using those styles. The function of each file is pretty clear; the function of various blocks of code in a single-file layout is much less clear to me.

But I'm sure it depends on personality. Some people have different mental organizational structures.


All times are GMT -6. The time now is 08:03 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI