Thread Tools Display Modes
05-01-11, 06:21 PM   #21
Airoz
A Deviate Faerie Dragon
Join Date: Oct 2010
Posts: 10
Originally Posted by red8981 View Post
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
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)
Thanks Red
Also, what program/addon should I use?
I should've asked before... -_-

Last edited by Airoz : 05-01-11 at 06:35 PM.
  Reply With Quote
05-01-11, 07:27 PM   #22
tenub
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 111
Originally Posted by Airoz View Post
Thanks Red
Also, what program/addon should I use?
I should've asked before... -_-
Program/addon to use for what? Editing .lua files? Notepad or any text editor.
  Reply With Quote
05-01-11, 07:28 PM   #23
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
There's a few decent editors out atm. I recommend Notepad++
  Reply With Quote
05-01-11, 07:33 PM   #24
Airoz
A Deviate Faerie Dragon
Join Date: Oct 2010
Posts: 10
Originally Posted by tenub View Post
Program/addon to use for what? Editing .lua files? Notepad or any text editor.
I meant a program/addon to edit those files lol

Originally Posted by Nibelheim View Post
There's a few decent editors out atm. I recommend Notepad++
Thanks Nib!
  Reply With Quote
05-01-11, 07:33 PM   #25
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Originally Posted by Seerah View Post
For further assistance creating oUF layouts (or anything unrelated to UI screenshots), feel free to create your own threads.
*ahem* quoting my post from last night
__________________
"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, 07:42 PM   #26
Airoz
A Deviate Faerie Dragon
Join Date: Oct 2010
Posts: 10
Is there any site to look at what things(functions/actions) do what? -_-
  Reply With Quote
05-01-11, 08:04 PM   #27
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I gave up. Here's your new thread.
__________________
"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, 08:33 PM   #28
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Seerah View Post
I gave up. Here's your new thread.


Is there any site to look at what things(functions/actions) do what? -_-
Functions
Events

Also check out the Main Menu on the right of those pages, with links to more areas.
  Reply With Quote
05-02-11, 03:44 PM   #29
irott
A Murloc Raider
 
irott's Avatar
Join Date: Feb 2011
Posts: 5
http://wowprogramming.com/docs

Lots of good info about widgets.
  Reply With Quote
05-02-11, 05:01 PM   #30
red8981
A Wyrmkin Dreamwalker
Join Date: Oct 2010
Posts: 51
I have a simple question.
How do i change font?
I just started to use oUF recently, and never have any experience on lua. (1 year of java, thats all i learnt about programming)
I started with Zork's oUF_simple tutorial layout, but I have some trouble on changing the font.

The following is what i am confused about:
Where is the font directionary? "cfg.font = "FONTS\\FRIZQT__.ttf"
I assumed it is under the fonts folder under wow folder
(IE: c://worldofwarcraft/fonts/frizqt__.ttf
but when i change it to come other font, some of them work, but most of them do not work
Code:
  -- // oUF tutorial layout
  -- // zork - 2010
  
  -----------------------------
  -- INIT
  -----------------------------
  
  --get the addon namespace
  local addon, ns = ...
  
  --generate a holder for the config data
  local cfg = CreateFrame("Frame")
  
  -----------------------------
  -- CONFIG
  -----------------------------
  
  --config variables
  cfg.showplayer = true
  cfg.showtarget = true
  cfg.showtot = true
  cfg.showpet = true
  cfg.showfocus = true
  cfg.showparty = true
  cfg.showraid = true
  cfg.allow_frame_movement = true
  cfg.frames_locked = false 
  
  cfg.statusbar_texture = "Interface\\AddOns\\oUF_Simple\\media\\statusbar512x64"
  cfg.backdrop_texture = "Interface\\AddOns\\oUF_Simple\\media\\backdrop"
  cfg.backdrop_edge_texture = "Interface\\AddOns\\oUF_Simple\\media\\backdrop_edge"
  cfg.font = "FONTS\\FRIZQT__.ttf"   
  
  -----------------------------
  -- HANDOVER
  -----------------------------
  
  --hand the config to the namespace for usage in other lua files (remember: those lua files must be called after the cfg.lua)
  ns.cfg = cfg
  Reply With Quote
05-02-11, 06:36 PM   #31
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by Seerah View Post
I gave up. Here's your new thread.
I'm sorry! Also, wouldn't this go under the oUF forum? D:
Originally Posted by red8981 View Post
I have a simple question.
(IE: c://worldofwarcraft/fonts/frizqt__.ttf
but when i change it to come other font, some of them work, but most of them do not work
Code:
  -- // oUF tutorial layout
  -- // zork - 2010
  
  cfg.font = "FONTS\\FRIZQT__.ttf"
It's
cfg.font = "FONTS\\FRIZQT__.ttf"

The way you have it is lowercase, the Caps actually do mean something when it comes to coding,
frizqt__.ttf is not the same as FRIZQT__.ttf, also, I changed my directory, having it set to my own media folder.
Code:
cfg.font = "Interface\\AddOns\\Lily Media\\Fonts\\visitor2.ttf"
I'm sllooowly rewriting the whole thing, adding color libraries, changing directories and options z.z it's not easy.
__________________

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

Last edited by Lily.Petal : 05-02-11 at 06:42 PM.
  Reply With Quote
05-02-11, 06:53 PM   #32
red8981
A Wyrmkin Dreamwalker
Join Date: Oct 2010
Posts: 51
NVM
I think I did a simple mistake last night at 3am... or today's morning.

I copied the font in there, and forgot to restart wow >.<

thanks for the help thou~
  Reply With Quote
05-02-11, 10:32 PM   #33
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by red8981 View Post
NVM
I think I did a simple mistake last night at 3am... or today's morning.

I copied the font in there, and forgot to restart wow >.<

thanks for the help thou~
Remember that if you change the fonts in Interface\\Fonts folder, that certain in game fonts will be changed as well
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
05-03-11, 01:16 AM   #34
red8981
A Wyrmkin Dreamwalker
Join Date: Oct 2010
Posts: 51
A few questions:
How to make 130945 into 130k? Like Stuf do.
Is there any special way to do it than 130945/1000 and add a "K" behind method?

How to make buff right click remove?

I am new, sorry. Can't find any information about those.

@lily.petal
Do the books help?
thinking buying them =P
  Reply With Quote
05-03-11, 01:45 AM   #35
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by red8981 View Post
A few questions:
How to make 130945 into 130k? Like Stuf do.
Is there any special way to do it than 130945/1000 and add a "K" behind method?

How to make buff right click remove?

I am new, sorry. Can't find any information about those.

@lily.petal
Do the books help?
thinking buying them =P
Haven't got them yet ^^v arrive on the 6th
Also, try

Code:
local cur=HP(unit)
local max=MaxHP(unit)
return "%s/%0.3g%%", Short(cur, true), (cur/max)*100
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
05-03-11, 02:13 AM   #36
red8981
A Wyrmkin Dreamwalker
Join Date: Oct 2010
Posts: 51
I think I am using a way different way to write text

Code:
lib.gen_hpstrings = function(f)
    --health/name text strings
    local name = lib.gen_fontstring(f.Health, cfg.font, 7, "MONOCHROMEOUTLINE")
    name:SetPoint("TOPLEFT", f.Health, "TOPLEFT", 2, 0)
    name:SetJustifyH("LEFT")
	    
    local hpval = lib.gen_fontstring(f.Health, cfg.font, 7, "MONOCHROMEOUTLINE")
    hpval:SetPoint("RIGHT", f.Health, "RIGHT", -2, 10)
    --this will make the name go "..." when its to long
    name:SetPoint("RIGHT", hpval, "LEFT", -5, 0)
    
	f:Tag(name, "[name]")
    f:Tag(hpval, "[curhp]/[maxhp] : [perhp]%")
  end
  Reply With Quote
05-03-11, 03:19 AM   #37
haylie
A Scalebane Royal Guard
 
haylie's Avatar
Join Date: May 2009
Posts: 417
From my experience, learning something works best when you have a strong incentive to do so. For me, it was the fact that my computer was extremely old and could barely run WoW. A friends suggested I dump heavy CPU addons and I ended up trying Alza's UI back when it first came out. His layouts were simple, very well explained and easy to modify, so I understood the basics quite quickly. The first thing I ever modified was sFilter, to make it track my important hunter buffs and debuffs.

I can honestly tell you that there is no need to read books and take classes if all you need to do is modify a few layouts. Practice is the best way to learn. I took oUF layouts and started changing stuff, and when things didn't turn out the way I wanted I just used a different layout. Eventually I added, changed and removed so much stuff that the end result could barely be considered the original author's layout. Same for minimap, chat, aura trackers... my whole UI was a Frankenstein-esque mass of pieces of code from all over the place.

What did help me immensely was Notepad++ and a reload macro handy. Another important thing was using addons that were simple to modify and well explained. Besides Alza, I also learned a LOT about frames and fonts from using LitePanels, another great and well explained addon. Lastly, if you do want to write your own, a minimap addon is very easy to write, IMO.
  Reply With Quote
05-03-11, 08:16 AM   #38
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by haylie View Post
From my experience, learning something works best when you have a strong incentive to do so. For me, it was the fact that my computer was extremely old and could barely run WoW. A friends suggested I dump heavy CPU addons and I ended up trying Alza's UI back when it first came out. His layouts were simple, very well explained and easy to modify, so I understood the basics quite quickly. The first thing I ever modified was sFilter, to make it track my important hunter buffs and debuffs.

I can honestly tell you that there is no need to read books and take classes if all you need to do is modify a few layouts. Practice is the best way to learn. I took oUF layouts and started changing stuff, and when things didn't turn out the way I wanted I just used a different layout. Eventually I added, changed and removed so much stuff that the end result could barely be considered the original author's layout. Same for minimap, chat, aura trackers... my whole UI was a Frankenstein-esque mass of pieces of code from all over the place.

What did help me immensely was Notepad++ and a reload macro handy. Another important thing was using addons that were simple to modify and well explained. Besides Alza, I also learned a LOT about frames and fonts from using LitePanels, another great and well explained addon. Lastly, if you do want to write your own, a minimap addon is very easy to write, IMO.
I mainly want the books as a reference material, something to look through. Also, taking classes might help me out later getting a job (tech savvy people are always wanted).

I was actually starting to think about writing one as well, as I was skimming through people's core files, it seemed pretty easy to me and wanted to try it. I might actually go download litepanels, try to stay away from KGPanels for a bit.
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
05-07-11, 10:31 AM   #39
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Just remembered why I sometimes hate amazon z.z /sigh; one of the books I ordered was some book about border terriers? I kinda laughed too because it said INSPECTED on the receipt. I'm like wut? The book was only 0.46c though, but still irks me >.>
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
05-10-11, 05:38 AM   #40
zynix
A Cliff Giant
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 70
Lily, about LitePanels vs KG Panels:

I started using LitePanels back in the days when KG Panels was a newborn, and EePanels2 was the old veteran. I tried EePanels, but never really got to do anything with it, because of the GUI. Therefore I moved on to LitePanels which was very easy, and it gives a good understanding of what you can do, at least when you start to fiddle with scripts.

I've (almost) always used LitePanels, and probably always will, at least untill I get my own panels to work!

A little help with beginning working with LitePanels

Happy coding
  Reply With Quote

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


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