simple questions new to this api.
I am simply trying to get the screen size in X to pass on to my exp bar background for dynamic ui scaling, but cannot seem to find it(the way to return screen size) anywhere...
can anyone help? I did look on the wiki but saw no clear answer...and the wiki is not the easiest to navigate if you are new to this kind of coding. |
Quote:
Lua Code:
|
ty for your response.
using this.. Code:
local screensizex = GuiRoot:GetWidth() "attempt to index a nil value stack traceback"(then pointing to the function) GetWidth() is expecting a value maybe dimension.x or something? or is there a better place to ask such beginner questions? |
Quote:
Lua Code:
I don't know what: UI_BackgroundWindowBackdrop is, I'm assuming a backdrop control, so I'm guessing your trying to resize that control to be the width of the screen? So your probably wanting to do: Lua Code:
The General Authoring Discussion forum: General Authoring Discussion Or Lua/XML Help forum: Lua/XML Help |
I am aware of the case sensitivity, that was a typo on my part. I still have the error...I will poke around some more , and if I am just spinning my wheels I will head over to the lua/xml help forum. thanks a lot...I've never used lua or xml...so this is all a bit odd coming from a C coding background. but in a sense it is a lot easier also....anyway ty.
|
Quote:
If you don't figure it out though you can post your code & the exact error message the game gives you I'll look at it. |
If you need to span the whole screen width, you don't need to know it. Use anchors instead.
Lua Code:
edit: regarding the error, I'd say UI_BackgroundWindowBackdrop is nil (operator : is the attempt to index it). If you have that control in XML, make sure you include the .xml file in your manifest. |
Quote:
|
I can manipulate the bar that I have already setup in the gui xml, and there is a backdrop there as well... this is why I am confused....I am positive it is some small error in my code....but I went to sleep after tinkering for a just a bit last night...so I will take another crack when I fresh eyes in a bit.
EDIT: Seems to be working fine now??? typical....once in a while we just need to quit ESO alltogether and reopen files :) I feel silly...but hey, this stuff happens. |
All times are GMT -6. The time now is 02:57 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI