Sober 37 Posted May 19, 2014 Share Posted May 19, 2014 def __setluckyslot(self, luckyimg): #vnum = str(luckyimg) #i tried replacing +luckyimg with +vnum too but no luck self.luckyimg.AppendImage("d:/icon/item/"+luckyimg) self.luckytxt.SetText("d:/icon/item/"+luckyimg) I tried the above, in combination with local i = "00010.tga" cmdchat("showluckyslot") cmdchat("setluckyslot "..i) syschat("d:/icon/item/"..i) i get the text normaly as i wished d:/ymir work/icon/item/00010.tga but the image is not shown! I have the image in /icon/item/ log.txt CResource::Load file not exist d:iconitem00010.tga I think it has to do with variable types... Any expert help? o.O Link to comment Share on other sites More sharing options...
Denis 1477 Posted May 19, 2014 Share Posted May 19, 2014 def __setluckyslot(self, luckyimg): self.luckyimg.AppendImage("d:/icon/item/%s.tga" % (luckyimg)) self.luckytxt.SetText("d:/icon/item/%s.tga" % (luckyimg)) Lua: local vnum = "00010" cmdchat("setluckyslot "..vnum) try this Link to comment Share on other sites More sharing options...
Sober 37 Posted May 19, 2014 Author Share Posted May 19, 2014 Thanks but still Load file not exist d:iconitem00010.tga Link to comment Share on other sites More sharing options...
Denis 1477 Posted May 19, 2014 Share Posted May 19, 2014 Then put the image somewhere else and load it from there Link to comment Share on other sites More sharing options...
luzzo 197 Posted May 20, 2014 Share Posted May 20, 2014 def __setluckyslot(self, luckyimg): #vnum = str(luckyimg) #i tried replacing +luckyimg with +vnum too but no luck self.luckyimg.AppendImage("d:/icon/item/"+luckyimg) self.luckytxt.SetText("d:/icon/item/"+luckyimg) I tried the above, in combination with local i = "00010.tga" cmdchat("showluckyslot") cmdchat("setluckyslot "..i) syschat("d:/icon/item/"..i) i get the text normaly as i wished d:/ymir work/icon/item/00010.tga but the image is not shown! I have the image in /icon/item/ log.txt CResource::Load file not exist d:iconitem00010.tga I think it has to do with variable types... Any expert help? o.O Yours icon's path is wrong.. Just use self.luckyimg.AppendImage("icon/item/"+luckyimg) and remeber witch variable are you using The element + can sum string with string and int with int. Reguars Luzzo Link to comment Share on other sites More sharing options...
Sober 37 Posted May 20, 2014 Author Share Posted May 20, 2014 I tried this , now i don't get the error but i cannot see the image ... What is wrong I have tried different coordinates too. Link to comment Share on other sites More sharing options...
luzzo 197 Posted May 20, 2014 Share Posted May 20, 2014 how did you define luckyimg ? Link to comment Share on other sites More sharing options...
Sober 37 Posted May 20, 2014 Author Share Posted May 20, 2014 luckyimg = ui.AniImageBox() luckyimg.AppendImage("icon/item/00010.tga") self.luckyimg = luckyimg self.luckyimg.SetPosition((wndMgr.GetScreenWidth()-1000)+43,50) I think it has to do with this.... Link to comment Share on other sites More sharing options...
luzzo 197 Posted May 20, 2014 Share Posted May 20, 2014 luckyimg = ui.AniImageBox() luckyimg.AppendImage("icon/item/00010.tga") self.luckyimg = luckyimg self.luckyimg.SetPosition((wndMgr.GetScreenWidth()-1000)+43,50) I think it has to do with this.... yes are you sure that are the right x , y? Link to comment Share on other sites More sharing options...
Sober 37 Posted May 20, 2014 Author Share Posted May 20, 2014 Not really tried several coordinates ... Link to comment Share on other sites More sharing options...
Solution luzzo 197 Posted May 20, 2014 Solution Share Posted May 20, 2014 eh for sure you miss to write luckyimg.Show() 1 Link to comment Share on other sites More sharing options...
Sober 37 Posted May 20, 2014 Author Share Posted May 20, 2014 that was the reason -.- , i recently started learning python... Thanks Link to comment Share on other sites More sharing options...
Sober 37 Posted May 22, 2014 Author Share Posted May 22, 2014 I have another one question, and instead of opening a new thread i will ask here... what is the property to place over other images for ui.AniImageBox ??? Link to comment Share on other sites More sharing options...
luzzo 197 Posted May 23, 2014 Share Posted May 23, 2014 Here u have all AniImageBox method class AniImageBox(Window): def __init__(self, layer = "UI"): Window.__init__(self, layer) def __del__(self): Window.__del__(self) def RegisterWindow(self, layer): self.hWnd = wndMgr.RegisterAniImageBox(self, layer) def SetDelay(self, delay): wndMgr.SetDelay(self.hWnd, delay) def AppendImage(self, filename): wndMgr.AppendImage(self.hWnd, filename) def SetPercentage(self, curValue, maxValue): wndMgr.SetRenderingRect(self.hWnd, 0.0, 0.0, -1.0 + float(curValue) / float(maxValue), 0.0) def OnEndFrame(self): pass Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now