Thread Tools Display Modes
10-30-10, 05:03 AM   #81
yj589794
A Rage Talon Dragon Guard
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 314
Originally Posted by Berb View Post
Awesome. The texture was black, but I changed the colors line to:
Code:
r,g,b = unpack(element.__owner.colors.class[class])
Seems to be fine now.

As for conditions, I believe this will do the trick:
Code:
lib.myPostCastStart = function(element, unit, spellname, spellrank, castid)
	if(UnitIsPlayer(unit)) then
		local _, class = UnitClass(unit)
		r, g, b = unpack(element.__owner.colors.class[class])
	else
		r, g, b = UnitSelectionColor(unit)
	end

        element:SetStatusBarColor(r,g,b)
end
Looks OK. I would suggest making r, g, b to be local, instead of injecting them into the global namespace.
  Reply With Quote
11-11-10, 09:00 PM   #82
shUI
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 8
This is probably a stupid question, and I already went thru these forums, but is there an update for the new oUF release? I want to follow the walk through, but it's not working...I know it's probably something stupid
__________________
shPerformance: Data Broker memory/latency/fps usage display utility
shNameplates: Lightweight, simple, and sexy nameplates
shClock: Lightweight and simple data broker clock
  Reply With Quote
11-11-10, 10:42 PM   #83
neverg
A Frostmaul Preserver
 
neverg's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 268
Originally Posted by shUI View Post
This is probably a stupid question, and I already went thru these forums, but is there an update for the new oUF release? I want to follow the walk through, but it's not working...I know it's probably something stupid
No. zork hasn't done one. But there is no need. The roll of changes isn't that big. Go the the API Version 5 Thread and read on, if you're layout is 1.4 ready it will be easy to make it work under oUF 1.5.
__________________
My oUF Layout: oUF Lumen
  Reply With Quote
11-12-10, 04:51 PM   #84
shUI
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 8
Excellent, thank you very much.
__________________
shPerformance: Data Broker memory/latency/fps usage display utility
shNameplates: Lightweight, simple, and sexy nameplates
shClock: Lightweight and simple data broker clock
  Reply With Quote
11-13-10, 07:54 PM   #85
Berb
A Deviate Faerie Dragon
 
Berb's Avatar
Join Date: Nov 2008
Posts: 15
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
05-16-11, 01:28 AM   #86
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Updated for oUF 1.5.

http://www.wowinterface.com/download...o.php?id=14831

- Party/raid will be added in the next days.
- Creating personal TAGs will be added aswell.

*udate*

Ok so update is there.

- now supports oUF_MovableFrames
- added raid frames
- 3 different raidframes are spawned depending on raid size to show how to do it and to have the opportunity to scale each raid individually with oUF_MovableFrames
- moved the init function to the core and splitted it into initHeader and init. (Unit spawned under header must be handled specially)
- removed the default movabilty, only castbars for player and target have the move function now (to make them dragable)
- new menu function (updated for cataclysm and removed focus selection from menu)
- added 3 attributes to the self object: hidename, hptag and nametag. Once those are given the text strings will be handled different. (Thus you can use specific tags just for one style or hide the name in anothers etc.)

http://code.google.com/p/rothui/source/detail?r=719

Next step:
- create your own tags
- move width/height to the config
- make a small config for each unit
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 05-18-11 at 01:57 AM.
  Reply With Quote
05-18-11, 12:05 PM   #87
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
tag-system added
http://code.google.com/p/rothui/source/detail?r=720



How to add a module
http://code.google.com/p/rothui/source/detail?r=721

__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 05-18-11 at 12:46 PM.
  Reply With Quote
05-18-11, 12:50 PM   #88
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Originally Posted by zork View Post
- now supports oUF_MovableFrames
Did you have to do anything at all? The general idea is that it should just, work :P.
__________________
「貴方は1人じゃないよ」
  Reply With Quote
05-18-11, 01:54 PM   #89
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
I had my own move function at first. Removed the calls for that on everything except player/target castbars.

Added threat coloring



http://code.google.com/p/rothui/source/detail?r=723
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
05-21-11, 10:41 AM   #90
Carbo
A Murloc Raider
Join Date: Oct 2010
Posts: 7
Roles

Is there a way we can add role icons?
  Reply With Quote
06-15-11, 11:41 PM   #91
dreamcatcher
A Black Drake
 
dreamcatcher's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2010
Posts: 82
It says this is a tutorial layout, but I don't see any read me file explaining how to make a layout, add tags, or elements. All it is a layout already done for you.

Are you going to add some explanations so we that are new to oUF can learn how to make a layout?

Or is this for ones that already know oUF code and they can just add or remove parts of your layout?

I'm completely new to oUF and would love to learn how to make a layout. I have been taking looks at others and removing things I don't want and trying to make it more simple. But I can't find any info on how to add elements. I only want one core file and a element folder with the plug-ins. I don't like to have a addon that has 5+ lua files and a bunch of other plug-ins I have to select enable in the addon manager.
  Reply With Quote
06-16-11, 08:21 AM   #92
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Hm, I do get your point, but I think you didn't put enough effort into your approach.

First of all: Here you can see every little step. You may also view the diffs between the files, so you can easily see, how the code is modified to add certain elements.

Second:
No, this is no tutorial. You see a good programmer with good style creating a layout and indeed, you can learn a lot of him doing this stuff. But it's no howto in the sense of "Oh, let's create a health-bar... Now create a portrait... Let's create raid icons now..."

Third:
But I can't find any info on how to add elements. I only want one core file and a element folder with the plug-ins. I don't like to have a addon that has 5+ lua files and a bunch of other plug-ins I have to select enable in the addon manager.
You should not do it that way. Really, to me, the charme of oUF (as whole architecture) is, that I can specifically choose, which plugins I do activate on which toon (as user) and which plugin I want to support in my layout (layout creator).
You should not "put everything together". You're just cutting your own possibilities of module-usage, which allows you better control of "what is loaded in which case".


If there is really a need for a "layout-creation-howto", let's say from Photoshop to the final product, I would be able to put something together this weekend.
But there should be more than one reader, to be honest.
__________________
  Reply With Quote
06-16-11, 12:09 PM   #93
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
The guides intends that you follow the diffs while creating the layout step by step. You can check the diffs to see what changed. Each step is for a specific topic.

Combine that with
http://www.wowwiki.com/World_of_Warcraft_API
http://wowprogramming.com/docs/api
https://github.com/haste/oUF/wiki/

And you are set to go.

Go to the next step once you have understood the current step. Try out code. Comment out stuff and see what happens.

"/reload" is your friend.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
06-16-11, 05:01 PM   #94
dreamcatcher
A Black Drake
 
dreamcatcher's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2010
Posts: 82
Ok I understand a little better thank you both for your reply.

Good work Zork.

One question the plug in for rep and experience bar how do I get it to work? I have it installed but it dos not show up.

This is one example on not knowing how to add elements / plugins to my layout.

I guise I'm not good at understanding this stuff, but I don't want to give up.
  Reply With Quote
06-17-11, 06:57 AM   #95
Mischback
A Cobalt Mageweaver
 
Mischback's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 221
Originally Posted by dreamcatcher View Post
One question the plug in for rep and experience bar how do I get it to work? I have it installed but it dos not show up.

This is one example on not knowing how to add elements / plugins to my layout.

I guise I'm not good at understanding this stuff, but I don't want to give up.
*most* Plugins need you to create a certain frame or texture to make them work. Have a look at the code of the documentation or code of the plugin.
Documentation should simply tell you, what type of element is needed and how it should be named.

The code should include an "Enable"-function. This is called to enable the plugin. Most plugins should check for its element in your layout, so you can see, which type/name is needed.

Sorry, I can't specifically answer your question to xp/rep, since I never used that plugin for one of my layouts.
__________________
  Reply With Quote
06-21-11, 04:57 PM   #96
red8981
A Wyrmkin Dreamwalker
Join Date: Oct 2010
Posts: 51
Hi,

I am pretty new at oUF (havent had much chance to do it)
Recently, I am messing around with oUF_Simple2 by Zorkx and I had to say it is great.
As that being said, I run into a simple problem which I can not find a solution or reason for it.
I want make my name text to be at the center of Target of target bar, so my code for that part is
Code:
if not f.hidename then
      name = lib.gen_fontstring(f.Health, cfg.font, 9, "MONOCHROMEOUTLINE")
	  if f.mystyle == "player" then
      name:SetPoint("TOPLEFT", f.Health, "TOPLEFT", 2, 0)
	  name:SetJustifyH("LEFT")
	  elseif f.mystyle == "target" then
	  name:SetPoint("TOPRIGHT", f.Health, "TOPRIGHT", 0, 0)
	  name:SetJustifyH("RIGHT")
	  else
	  name:SetPoint("TOP",f.Health,"TOP",0,0)
	  name:SetJustifyH("CENTER")
	  end
      
    end
I basically added a few "if" statement for different frame.
but it outputs to be at the left side of the bar
SS in attachment


Just find why in the code.
Code:
if f.hidename then
      hpval:SetJustifyH("CENTER")
      hpval:SetPoint("LEFT", f.Health, "LEFT", 2, 0)
    else
      --this will make the name go "..." when its to long
      name:SetPoint("RIGHT", hpval, "LEFT", -5, 0)
      hpval:SetJustifyH("RIGHT")
But can someone explain to me why?
Thank you very much!
Attached Thumbnails
Click image for larger version

Name:	wow.jpg
Views:	804
Size:	5.9 KB
ID:	6275  

Last edited by red8981 : 06-21-11 at 05:15 PM.
  Reply With Quote
06-25-11, 10:23 PM   #97
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Well you could add a special target condition.

lua Code:
  1. --gen hp strings func
  2.   lib.gen_hpstrings = function(f)
  3.     local name, hpval
  4.     --health/name text strings
  5.     if f.mystyle == "target" then
  6.       --name
  7.       name = lib.gen_fontstring(f.Health, cfg.font, 16, "THINOUTLINE")
  8.       name:SetPoint("LEFT", 2, 5)
  9.       name:SetPoint("RIGHT", -2, 5)
  10.       name:SetJustifyH("CENTER")
  11.       --hpval
  12.       hpval = lib.gen_fontstring(f.Health, cfg.font, 16, "THINOUTLINE")
  13.       hpval:SetPoint("LEFT", -2, -5)
  14.       hpval:SetPoint("RIGHT", -2, -5)
  15.       hpval:SetJustifyH("CENTER")
  16.       --tags
  17.       f:Tag(name, f.nametag or "[name]")            --shorter
  18.       f:Tag(hpval, f.hptag or "[simple:hpdefault]") --shorter
  19.       return --exit function now
  20.     end
  21.     -- rest of function
  22.     -- ...
  23.   end
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
10-31-11, 01:23 PM   #98
LogicRx
A Murloc Raider
Join Date: Oct 2011
Posts: 5
I just recently found oUF, I do have a bit of programming experience so I picked it up pretty quickly. However for the life of me I can not figure out how to add lines from the party members to their targets. Also my party doesn't auto arrange itself: Tank, Healer, Dps, Dps. Could someone lend me a hand with this I would be very grateful
  Reply With Quote
10-31-11, 04:53 PM   #99
Talyrius
An Onyxian Warder
 
Talyrius's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 363
Originally Posted by LogicRx View Post
However for the life of me I can not figure out how to add lines from the party members to their targets. Also my party doesn't auto arrange itself: Tank, Healer, Dps, Dps. Could someone lend me a hand with this I would be very grateful
Can you elaborate on what you're trying to accomplish?

Originally Posted by LogicRx View Post
Also my party doesn't auto arrange itself: Tank, Healer, Dps, Dps. Could someone lend me a hand with this I would be very grateful
This cannot be done.
  Reply With Quote
11-01-11, 09:52 PM   #100
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Originally Posted by LogicRx View Post
Also my party doesn't auto arrange itself: Tank, Healer, Dps, Dps.
Originally Posted by ForeverTheGM View Post
This cannot be done.
The game itself ordinarily reassigns the partyN unit tokens based on assigned roles, so the tank is always party1 (unless it's the player), the healer is always party2 (unless the player is the tank, and then the healer is party1), and the remainder are damage-dealers. However, I've only noticed it doing this in groups formed through the LFG tool, and occasionally it doesn't do it even then.

I don't think this happens for groups where roles are manually assigned. You might be able to do it yourself by setting the groupBy attribute on your party group header to "ROLE", and the groupingOrder attribute to something like "TANK,HEALER,DAMAGER".
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF tutorial layout for oUF 1.4


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