Quantcast Vertical text growth (specifically in Pitbull4) - WoWInterface
Thread Tools Display Modes
12-04-09, 06:58 AM   #1
Star1814
A Defias Bandit
Join Date: Oct 2008
Posts: 3
Vertical text growth (specifically in Pitbull4)

I've tried googling, I've searched the dogtext and I've tried possibly every single option there is in Pitbull4, but to no avail. Frankly, I'm starting to think it's not possible, which would suck. I'm no lua expert, not by a mile.

What I want to achieve is this: vertical text growth (rather than the typical horizontal):
8
0

N
I
G
H
T

E
L
F

D
R
U
I
D

Anyone have any ideas?
  Reply With Quote
12-04-09, 08:25 AM   #2
Yhor
A Pyroguard Emberseer
 
Yhor's Avatar
Join Date: May 2007
Posts: 1,077
Last I checked, asked, and begged for this myself, I was told it isn't available (possible).

If it truly isn't possible, has anyone ever added it to the Wish list to Blizzard?
  Reply With Quote
12-04-09, 08:43 AM   #3
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Simple:

Code:
local function vertical(s)
	local p = string.sub(s, 1, 1)
	for i = 2, string.len(s) do
		p = p.."\n"..string.sub(s, i, i)
	end
	return p
end
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote
12-04-09, 08:50 AM   #4
Katae
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Jun 2007
Posts: 208
Code:
local string = "test"
return strtrim(gsub(string,"(%.)","%1\n"))
Splits characters one per line, assuming you can use \n in Pitbull.
  Reply With Quote
12-04-09, 08:53 AM   #5
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Originally Posted by Katae View Post
Code:
local string = "test"
return strtrim(gsub(string,"(%.)","%1\n"))
Splits characters one per line, assuming you can use \n in Pitbull.
Does the same thing as me, but I'm just not that good with all the gsub things.

EDIT: Yours doesn't seem to work.
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.

Last edited by nightcracker : 12-04-09 at 08:56 AM.
  Reply With Quote
12-04-09, 08:56 AM   #6
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Except that the above solution is a horrible hack which will break on multi-byte letters. That being said, the underlying library which blizzard uses for fonts in WoW does support vertical text. We don't have access to this however, as the WoW engine most likely doesn't implement it.

We could of course just do:
lua Code:
  1. function vertical(str)
  2.    -- Dealing with multi-byte?
  3.    local _, len = str:gsub("[^\128-\193]", "")
  4.  
  5.    -- nah...
  6.    if(len == #str) then
  7.       return str:gsub(".", "%1\n")
  8.    else
  9.       return str:gsub("([%z\1-\127\194-\244][\128-\191]*)", "%1\n")
  10.    end
  11. end

edit: damn drycoding, fixed the syntax error.
__________________
「貴方は1人じゃないよ」

Last edited by haste : 12-04-09 at 09:00 AM.
  Reply With Quote
12-04-09, 09:01 AM   #7
nightcracker
A Molten Giant
 
nightcracker's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 716
Originally Posted by haste View Post
Except that the above solution is a horrible hack which will break on multi-byte letters. That being said, the underlying library which blizzard uses for fonts in WoW does support vertical text. We don't have access to this however, as the WoW engine most likely doesn't implement it.

We could of course just do:
lua Code:
  1. function vertical(str)
  2.    -- Dealing with multi-byte?
  3.    local _, len = str:gsub("[^\128-\193]", "")
  4.  
  5.    -- nah...
  6.    if(len == #str) then
  7.       return str:gsub(".", "%1\n")
  8.    else
  9.       return str:gsub("([%z\1-\127\194-\244][\128-\191]*)", "%1\n"
  10.    end
  11. end
And once again this proves haste > all. (nah I just suck when it comes to string modification :P) My solution was a hack indeed
__________________
Three things are certain,
Death, taxes and site not found,
You, victim of one.
  Reply With Quote
12-04-09, 09:20 AM   #8
Yhor
A Pyroguard Emberseer
 
Yhor's Avatar
Join Date: May 2007
Posts: 1,077
Your 'solution' works occasionally on some instances, but it isn't a true working code. On unitframe elements I found using a hack to be less than desirable because of how frequently it breaks.

I've looked through the wishlist previously, but couldn't find anything. Does anyone know if this has been answered by Blizz, or even asked for?
  Reply With Quote
12-04-09, 09:48 AM   #9
Star1814
A Defias Bandit
Join Date: Oct 2008
Posts: 3
Originally Posted by haste View Post
Except that the above solution is a horrible hack which will break on multi-byte letters. That being said, the underlying library which blizzard uses for fonts in WoW does support vertical text. We don't have access to this however, as the WoW engine most likely doesn't implement it.

We could of course just do:
lua Code:
  1. function vertical(str)
  2.    -- Dealing with multi-byte?
  3.    local _, len = str:gsub("[^\128-\193]", "")
  4.  
  5.    -- nah...
  6.    if(len == #str) then
  7.       return str:gsub(".", "%1\n")
  8.    else
  9.       return str:gsub("([%z\1-\127\194-\244][\128-\191]*)", "%1\n")
  10.    end
  11. end

edit: damn drycoding, fixed the syntax error.
Dying to try this and hope it works. However, how would I actually go about implementing this, properly? I mean, I only wish to let certain elements have this vertical text.

Switching from Pitbull4 to oUF is something I'm willing to do to make this work -- though at first glance the intense Lua editing for a layout scared me away.

I've a more or less clearcut image in my head how I want my unitframes to look like (Photoshop wins sometimes :>), and at this point Pitbull4 won't let me accomplish that (vertical text being only one of them).
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Vertical text growth (specifically in Pitbull4)

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