Hi!
I have a large number of "Global" tImage variables.
for example
and draw it simply..
now, I need to reload all these global image, with a new "Style" path component, in runtime:
there's a way to do it not manually for each variable?
something like that
obviously it don't works: changing "img" doesn't affect IMG_TitleBG.
And i can't add a
"IMG_titleBG = img[0]"
else I must do it for each global images, coming back at the start point.
I thought to use an auxiliar tMap (or tList) populated in an alternative "loadImage_2()" function that load and return a tImage var, and also add the ptr of this image in a the tMap.
But I'm stucked here: then how can I replace the pointed area with a new loaded image? I think that's not possible :(
I'm also looking at Reflection, but in docs I only saw it used on Type and Type's istances, not simply Global variables.
I have a large number of "Global" tImage variables.
for example
... ... ... Global IMG_TitleBG:TImage = LoadImage("Style" + Style + "\Title.png") Global IMG_FormBG:TImage = LoadImage("Style" + Style + "\shade1.png") Global IMG_FormBG1:TImage = LoadImage("Style" + Style + "\shade2.png") ... ... ...
and draw it simply..
DrawImage IMG_TitleBG,0,0 ..etc
now, I need to reload all these global image, with a new "Style" path component, in runtime:
there's a way to do it not manually for each variable?
something like that
Global IMG_TitleBG:TImage = LoadImage("Style" + Style + "\Title.png") img[0]:tImage = IMG_titleBG ..... ...... 'replace image img[0]= LoadImage("Style" + *NEW*Style + "\Title.png")
obviously it don't works: changing "img" doesn't affect IMG_TitleBG.
And i can't add a
"IMG_titleBG = img[0]"
else I must do it for each global images, coming back at the start point.
I thought to use an auxiliar tMap (or tList) populated in an alternative "loadImage_2()" function that load and return a tImage var, and also add the ptr of this image in a the tMap.
But I'm stucked here: then how can I replace the pointed area with a new loaded image? I think that's not possible :(
I'm also looking at Reflection, but in docs I only saw it used on Type and Type's istances, not simply Global variables.