Text Box Sizing Issue

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » Windower » Support » Text box sizing issue
Text box sizing issue
Offline
Posts: 89
By Datass 2016-04-05 16:49:17
Link | Quote | Reply
 
I have a lua that displays text boxes on my screen letting me know things like nuke mode, element etc. For some reason sometimes when it loads the boxes just do their own thing and ignore the sizing parameter in the lua. Any ideas why? Here's the relevant section of code.

boxes
windower.prim.create('NUKE_ELEMENT')
windower.prim.set_size('NUKE_ELEMENT',200,30)
windower.prim.set_texture('NUKE_ELEMENT',''..windower.windower_path..'addons/GearSwap/data/'..player.name..'/images/icenukes.png')
windower.prim.set_position('NUKE_ELEMENT',1000,50)
windower.prim.set_color('NUKE_ELEMENT', 150, 255, 255, 255)
windower.prim.set_visibility('NUKE_ELEMENT',true)
--send_command('text tpvariable text "ICE NUKES";text tpvariable color 0 255 255;')

windower.prim.create('MP_EFFICIENCY')
windower.prim.set_size('MP_EFFICIENCY',200,30)
windower.prim.set_texture('MP_EFFICIENCY',''..windower.windower_path..'addons/GearSwap/data/'..player.name..'/images/mpeoff.png')
windower.prim.set_position('MP_EFFICIENCY',1000,90)
windower.prim.set_color('MP_EFFICIENCY', 150, 255, 255, 255)
windower.prim.set_visibility('MP_EFFICIENCY',true)
--send_command('text idlevariable text "MPE-OFF"')

--send_command('text wsvariable text "MM-OFF"')
windower.prim.create('MAGIC_MODE')
windower.prim.set_size('MAGIC_MODE',200,30)
windower.prim.set_texture('MAGIC_MODE',''..windower.windower_path..'addons/GearSwap/data/'..player.name..'/images/magicpotency.png')
windower.prim.set_position('MAGIC_MODE',1000,130)
windower.prim.set_color('MAGIC_MODE', 150, 255, 255, 255)
windower.prim.set_visibility('MAGIC_MODE',true)
--send_command('text pdtvariable text "MAGIC-POTENCY"')
Offline
Posts: 89
By Datass 2016-04-05 23:22:42
Link | Quote | Reply
 
I fiddled with it for about 3 hours tonight and was able to fix the issue. I had to alter the original picture files so they would be the size I wanted, thereby making the re-sizing command in the lua irrelevant.
 Leviathan.Vow
Offline
Server: Leviathan
Game: FFXI
user: woVow
Posts: 125
By Leviathan.Vow 2016-04-06 12:11:16
Link | Quote | Reply
 
Code
windower.prim.set_fit_to_texture(prim_name, fit)

    prim_name[string] - name of the primitive to operate on
    fit[boolean] - FitToTexture

[+]
Log in to post.