Thread Tools Display Modes
04-29-11, 05:43 PM   #1
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Learning oUF and how to code a UI (moved from UI Feedback thread)

/cry; I hate and love reflux. Deleted my profile yet again. I always save it again before I log, but some times when I switch to a new profile, then switch back, it removes all of my Stuf settings z.z It makes me soooo frustrated...

I guess I'm gonna go back to my Aurora Theme again and see what I can improve /sigh;

Sometimes I wish Stuf just had a profile setting in it xD

Also, speaking of profiles, anyone know a way to remove all the other profiles from addons without going into each one and deleting it manually?

Maybe this is a sign saying START USING OUF. <has my knife already in hand>\

EDIT: Lol and behold, OUF just updated the moment I posted~ Anyone have any idea what layout might be easier to into and use/change and learn? :P
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah

Last edited by Lily.Petal : 04-29-11 at 05:57 PM.
  Reply With Quote
04-29-11, 06:27 PM   #2
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by Lily.Petal View Post
/cry; I hate and love reflux. Deleted my profile yet again. I always save it again before I log, but some times when I switch to a new profile, then switch back, it removes all of my Stuf settings z.z It makes me soooo frustrated...

I guess I'm gonna go back to my Aurora Theme again and see what I can improve /sigh;

Sometimes I wish Stuf just had a profile setting in it xD

Also, speaking of profiles, anyone know a way to remove all the other profiles from addons without going into each one and deleting it manually?

Maybe this is a sign saying START USING OUF. <has my knife already in hand>\

EDIT: Lol and behold, OUF just updated the moment I posted~ Anyone have any idea what layout might be easier to into and use/change and learn? :P

This one of the reasons i started to do everything in pure LUA. These profiles always reset, at some point, then your just wanna die oUF layout is win. i love it.
  Reply With Quote
04-29-11, 08:21 PM   #3
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Most people using oUF had zero lua knowledge when they started using it. Myself included. Just crap a layout and let the hacking begin! The oUF forums are full of answers already (search ftw) and you can get help for new or special problems quite fast.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
04-30-11, 03:00 AM   #4
Monolit
A Black Drake
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 81
Originally Posted by Dawn View Post
Just crap a layout and let the hacking begin!

sounds about right though
  Reply With Quote
04-30-11, 03:39 AM   #5
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by Dawn View Post
Most people using oUF had zero lua knowledge when they started using it. Myself included. Just crap a layout and let the hacking begin! The oUF forums are full of answers already (search ftw) and you can get help for new or special problems quite fast.
Totally agreed! you get so much help, so don't be afraid to ask anything
  Reply With Quote
04-30-11, 04:01 AM   #6
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Bah, asking is for people who.. lack... infostuff! Nevermind me, I have askaphobia
  Reply With Quote
04-30-11, 06:56 AM   #7
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by Kendian View Post
Just wanted to say my thanks, lady,

ChatFrame1:SetShadowColor(0, 0, 0, 0) -- 4th arg is alpha
ChatFrame1:SetShadowOffset(0, 0) -- x, y
-- [[ ChatFrame1:SetSpacing(3) --(optional, changes the vertical spacing on your lines) ]]

Worked like a charm, and it made such a HUGE diff, lol~
Welcome~ and ya it does xD

Originally Posted by red8981 View Post
my version of your Layout =p
oh my <3

Originally Posted by Kendian View Post
Actually I have an 'addon alt' lol. STUF lets you copy to next character, so I just make sure to copy layout to alt, then go back to whichever toon Im working on. That way if layout gets wiped, I just copy from alt~
Burn you. D: good idea

Originally Posted by Game92 View Post
This one of the reasons i started to do everything in pure LUA. These profiles always reset, at some point, then your just wanna die oUF layout is win. i love it.
Gonna try it today, wish me luck!

Originally Posted by Greevir View Post
Aww! That sucks! Really love what you had going. Here's my copy of yours: (yes I still use a 4:3 ratio monitor /cry)
[ IMG ]

Completely understand the Stuf profile thing. Really wish it had profiles. Would love to learn oUF but have absolutely 0 lua knowledge.
Didn't realize the layout was actually popular.

Originally Posted by Dawn View Post
Most people using oUF had zero lua knowledge when they started using it. Myself included. Just crap a layout and let the hacking begin! The oUF forums are full of answers already (search ftw) and you can get help for new or special problems quite fast.
Will add the forums to my favorite list ;D

Wish me luck, sorry for all of those hoping for a upload of the UI. I might try something with oUF once I get it under my thumb.

Anyone have a clue how to edit oUF without all the /reloads though?
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah

Last edited by Lily.Petal : 04-30-11 at 07:01 AM.
  Reply With Quote
04-30-11, 07:21 AM   #8
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Originally Posted by Lily.Petal View Post
Anyone have a clue how to edit oUF without all the /reloads though?
You won't see changes unless you reload, you will have to live with it. The more you get used to it, the less you will have to reload. You will know how it will look like and you can "drycode" more at once.

Some tips to make it easier:
- make yourself a macro for reload and keybind it
- don't load other addons, except for your layout + oUF + the plugins you want to support > makes reloading faster
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote
04-30-11, 09:11 AM   #9
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 284
Originally Posted by Lily.Petal View Post
Anyone have any idea what layout might be easier to into and use/change and learn?
Freebaser's oUF_Freeb is a relatively easy first edit imo, and might lend itself nicely to the frame designs you've already created. Dawn's oUF_Slim is another good one...some cool features to study (like bar alpha w/fill on loss).

Originally Posted by Dawn View Post
You won't see changes unless you reload, you will have to live with it. The more you get used to it, the less you will have to reload. You will know how it will look like and you can "drycode" more at once.
This is very true, especially sizes, positions, and anchors (relative positioning frame-to-frame via anchoring can be pure win ).

You'll start to see the screen in X's & Y's before long.
  Reply With Quote
04-30-11, 11:45 AM   #10
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by Aprikot View Post
Freebaser's oUF_Freeb is a relatively easy first edit imo, and might lend itself nicely to the frame designs you've already created. Dawn's oUF_Slim is another good one...some cool features to study (like bar alpha w/fill on loss).
I may not be a pro at coding/programming at all, but I can at least look at code and understand what it does to an extent, then change it to what I need. But changing a frame completely dependent on a different frame is a different matter and only meant to make the Author's, not the 'hacker's', life easier.

Especially when said frame is something along the lines of:
height*-(hpheight-.95) -- Taken from FreeB

Which from a glance (from my PoV) is meant to change the frame incase the independent frame is changed so that dependent frame changes along with it so he didn't have to go change every little thing.

But to me, I just groan 'cause I have no idea what I will mess up if I change it to just a straight number.

Wish there was a layout that let me change every variable in the LUA relatively easily instead of trying to hack one and figuring what the heck is being multiplied/subtracted/added etc etc xD
Say at the top, all the Frames Variables are there so you can change what you want for the new people trying to get into oUF, then all the main script loading (or w/e you call it, hooking?) those variables.

I was going to try oUF_Simple, because it's the closest to what I meant, but it's not showing anything when I loaded it. Boo.

While I want to use oUF, trying to get into it seems so taxing at the user using it and may take a long time to learn properly, years seeing as how most of you were doing this in TBC (looking at the old Screenshot thread) and such. I am probably just going to take a programming course this semester in college, then try again and hope for the best and use oUF as a learning tool.

EDIT: Also, is there ANY way to get rid of the BlizzardUI folders in the ...AddOns\\ folder? Or in someway shorten them? Really really ugly :P
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah

Last edited by Lily.Petal : 04-30-11 at 12:16 PM.
  Reply With Quote
04-30-11, 12:58 PM   #11
red8981
A Wyrmkin Dreamwalker
Join Date: Oct 2010
Posts: 51
Originally Posted by Lily.Petal View Post
I was going to try oUF_Simple, because it's the closest to what I meant, but it's not showing anything when I loaded it. Boo.
the answer:
Originally Posted by Berb View Post
I believe all you have to change is:

lib.lua
Code:
f:SetAttribute("initial-height", f.height)
f:SetAttribute("initial-width", f.width)
f:SetAttribute("initial-scale", f.scale)
to
Code:
f:SetHeight(f.height)
f:SetWidth(f.width)
f:SetScale(f.scale)
I am just starting on oUF too, If you want learn it together >.< lol
  Reply With Quote
04-30-11, 06:22 PM   #12
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 284
Originally Posted by Lily.Petal View Post
I may not be a pro at coding/programming at all, but I can at least look at code and understand what it does to an extent, then change it to what I need. But changing a frame completely dependent on a different frame is a different matter and only meant to make the Author's, not the 'hacker's', life easier.

Especially when said frame is something along the lines of:
height*-(hpheight-.95) -- Taken from FreeB

Which from a glance (from my PoV) is meant to change the frame incase the independent frame is changed so that dependent frame changes along with it so he didn't have to go change every little thing.

But to me, I just groan 'cause I have no idea what I will mess up if I change it to just a straight number.

Wish there was a layout that let me change every variable in the LUA relatively easily instead of trying to hack one and figuring what the heck is being multiplied/subtracted/added etc etc xD
Say at the top, all the Frames Variables are there so you can change what you want for the new people trying to get into oUF, then all the main script loading (or w/e you call it, hooking?) those variables.
Don't be discouraged! In the oUF_Freeb example it's just away of saying what percentage of the frame will be used for health (with the remainder being used for power: ".50" is half, "100" is all, etc.). As the "hacker", you have the freedom to use whatever values you want:

lua Code:
  1. -- from freeb.lua:
  2. local height, width = 22, 220 -- total height is 22 pixels
  3. local hpheight = .85 -- the "percent" allocated for health
  4. -- later on (after doing a find next on "hpheight"):
  5. hp:SetHeight(height*hpheight) -- 22*.85
  6. -- can become:
  7. hp:SetHeight(18.7) -- whatever value you want

Your text editor's "find" feature becomes invaluable when searching for variables. Anyway, the community here is amazingly helpful, and the oUF & Lua forums are there for your questions (and don't think of it as programming...it's just one little tweak after another). You certainly don't need years of Lua experience to hack an oUF layout to your liking!
  Reply With Quote
04-30-11, 08:10 PM   #13
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Just bought a few things on Amazon

Beginning Lua with World of Warcraft Add-ons
World of Warcraft Programming: A Guide and Reference for Creating WoW Addons

I'm going to try and work with oUF_Simple for now ^^ thanks for all the support ~<3
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
04-30-11, 08:43 PM   #14
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Uh oh. With both creative and programmatical powers, an unstoppable UI force shall be born.
  Reply With Quote
04-30-11, 09:02 PM   #15
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by Nibelheim View Post
Uh oh. With both creative and programmatical powers, an unstoppable UI force shall be born.
Give or take a few months >>;
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
04-30-11, 11:29 PM   #16
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
For further assistance creating oUF layouts (or anything unrelated to UI screenshots), feel free to create your own threads.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-01-11, 12:46 AM   #17
SRCarebear
A Fallenroot Satyr
AddOn Compiler - Click to view compilations
Join Date: Mar 2009
Posts: 26
Originally Posted by Lily.Petal View Post
Just bought a few things on Amazon

Beginning Lua with World of Warcraft Add-ons
World of Warcraft Programming: A Guide and Reference for Creating WoW Addons

I'm going to try and work with oUF_Simple for now ^^ thanks for all the support ~<3
I wish I had the same drive and motivation as you to learn LUA. I didn't even buy textbooks when I was at UNI lol.
  Reply With Quote
05-01-11, 03:27 PM   #18
tenub
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 111
Originally Posted by Lily.Petal View Post
Just bought a few things on Amazon

Beginning Lua with World of Warcraft Add-ons
World of Warcraft Programming: A Guide and Reference for Creating WoW Addons

I'm going to try and work with oUF_Simple for now ^^ thanks for all the support ~<3
Nooo! Waste of money! Lua is already pretty easy to learn, especially if you have any previous experience in another language. All you have to do is look through the different lua/api functions and start by customizing/editing addons. You'll eventually learn the language. Just start with something simple like adding texture backgrounds/borders to each individual bar in TinyDPS or manipulating text in Omen.
  Reply With Quote
05-01-11, 05:27 PM   #19
Airoz
A Deviate Faerie Dragon
Join Date: Oct 2010
Posts: 10
Originally Posted by tenub View Post
Nooo! Waste of money! Lua is already pretty easy to learn, especially if you have any previous experience in another language. All you have to do is look through the different lua/api functions and start by customizing/editing addons. You'll eventually learn the language. Just start with something simple like adding texture backgrounds/borders to each individual bar in TinyDPS or manipulating text in Omen.
Is there a website/book that I should be looking at, inorder to start making a UI?
  Reply With Quote
05-01-11, 06:16 PM   #20
red8981
A Wyrmkin Dreamwalker
Join Date: Oct 2010
Posts: 51
http://www.wowinterface.com/forums/s...ad.php?t=33566

is a good place to start.
For it to work now you need switch


Originally Posted by Berb View Post
I believe all you have to change is:

lib.lua
Code:
f:SetAttribute("initial-height", f.height)
f:SetAttribute("initial-width", f.width)
f:SetAttribute("initial-scale", f.scale)
to
Code:
f:SetHeight(f.height)
f:SetWidth(f.width)
f:SetScale(f.scale)
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Learning oUF and how to code a UI (moved from UI Feedback thread)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off