WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   Learning oUF and how to code a UI (moved from UI Feedback thread) (https://www.wowinterface.com/forums/showthread.php?t=39947)

Lily.Petal 04-29-11 05:43 PM

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

Aftermathhqt 04-29-11 06:27 PM

Quote:

Originally Posted by Lily.Petal (Post 236044)
/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 :p oUF layout is win. i love it.

Dawn 04-29-11 08:21 PM

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. ;)

Monolit 04-30-11 03:00 AM

Quote:

Originally Posted by Dawn (Post 236068)
Just crap a layout and let the hacking begin!

:o:o:o
sounds about right though :D

Aftermathhqt 04-30-11 03:39 AM

Quote:

Originally Posted by Dawn (Post 236068)
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 :)

Nibelheim 04-30-11 04:01 AM

Bah, asking is for people who.. lack... infostuff! :p Nevermind me, I have askaphobia :)

Lily.Petal 04-30-11 06:56 AM

Quote:

Originally Posted by Kendian (Post 236105)
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

Quote:

Originally Posted by red8981 (Post 236093)
my version of your Layout =p

oh my :o <3

Quote:

Originally Posted by Kendian (Post 236091)
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~ :D

Burn you. D: good idea

Quote:

Originally Posted by Game92 (Post 236048)
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 :p oUF layout is win. i love it.

Gonna try it today, wish me luck!

Quote:

Originally Posted by Greevir (Post 236064)
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.

Quote:

Originally Posted by Dawn (Post 236068)
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?

Dawn 04-30-11 07:21 AM

Quote:

Originally Posted by Lily.Petal (Post 236110)
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

Aprikot 04-30-11 09:11 AM

Quote:

Originally Posted by Lily.Petal (Post 236044)
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).

Quote:

Originally Posted by Dawn (Post 236113)
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. :p

Lily.Petal 04-30-11 11:45 AM

Quote:

Originally Posted by Aprikot (Post 236121)
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

red8981 04-30-11 12:58 PM

Quote:

Originally Posted by Lily.Petal (Post 236138)
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:
Quote:

Originally Posted by Berb (Post 217671)
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

Aprikot 04-30-11 06:22 PM

Quote:

Originally Posted by Lily.Petal (Post 236138)
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 :banana: (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! :)

Lily.Petal 04-30-11 08:10 PM

Just bought a few things on Amazon :p

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

Nibelheim 04-30-11 08:43 PM

Uh oh. With both creative and programmatical powers, an unstoppable UI force shall be born. :eek:

Lily.Petal 04-30-11 09:02 PM

Quote:

Originally Posted by Nibelheim (Post 236181)
Uh oh. With both creative and programmatical powers, an unstoppable UI force shall be born. :eek:

Give or take a few months >>;

Seerah 04-30-11 11:29 PM

For further assistance creating oUF layouts (or anything unrelated to UI screenshots), feel free to create your own threads. :)

SRCarebear 05-01-11 12:46 AM

Quote:

Originally Posted by Lily.Petal (Post 236180)
Just bought a few things on Amazon :p

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.

tenub 05-01-11 03:27 PM

Quote:

Originally Posted by Lily.Petal (Post 236180)
Just bought a few things on Amazon :p

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.

Airoz 05-01-11 05:27 PM

Quote:

Originally Posted by tenub (Post 236260)
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?

red8981 05-01-11 06:16 PM

http://www.wowinterface.com/forums/s...ad.php?t=33566

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


Quote:

Originally Posted by Berb (Post 217671)
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)




All times are GMT -6. The time now is 03:05 AM.

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