ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   GetDimensions (https://www.esoui.com/forums/showthread.php?t=1331)

skyraker 05/02/14 02:20 PM

GetDimensions
 
Lua Code:
  1. local x,y = toolText:GetDimensions()

When I do this, x and y are both 0, but when I /script it in game, it shows the correct values.

What gives?

mra4nii 05/02/14 02:45 PM

I think this mean that in game toolText control is initialized already. But not in your code.

skyraker 05/02/14 03:02 PM

Quote:

Originally Posted by mra4nii (Post 6742)
I think this mean that in game toolText control is initialized already. But not in your code.

It is initialized. It is being constantly updated.

Seerah 05/02/14 03:22 PM

Are you calling :GetDimensions() before your label has text?

Have you given your label explicit dimensions?

skyraker 05/02/14 03:28 PM

Quote:

Originally Posted by Seerah (Post 6747)
Are you calling :GetDimensions() before your label has text?

Heh, I forgot I cleared out the text before adding it back in. Though that gives me an idea on moving some info around.

Thanks Seerah!


All times are GMT -6. The time now is 02:41 AM.

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