This module was not designed for people who don't know nothing about python.
Here is a simple functions which gives you the chance to be able to turn all objects of script loader (uiScript) into a a simple list and control all very simple.
This is more easy if you have a lot a objects and want to do some actions with them like set multiples text, load images etc. do a simple loop by range start:end and you can play with it.
- self.OBJECT_MAX_NUM = 25 | You can change how many max objects you can send into list.
- self.Realloc(state, objectList) | You can run a action (Hide() / Show()) for all objects what you sended on list.
How to use GetChildList([]):
Python
- class TestWindow(ui.ScriptWindow):
- def __init__(self):
- ui.ScriptWindow.__init__(self)
- ui.PythonScriptLoader().LoadScriptFile(self, "uiscript/guildwindow.py")
- self.childrenList = self.GetChildList(["GuildNameValue", "DeclareWarButton", "Board"])
- def Reference(self):
- self.childrenList[0].SetText("GUARDIANS")
- self.childrenList[1].SetPosition(100, 200)
- self.childrenList[2].SetSize(500, 1000)
- How to use self.Realloc(None, []):
How you can play with GetChildList, another example:
Code (Is a little shit, i was write on some minutes for test something, so i was think it's ok if i share with you because i don't use)