*Problemă: Intrebare: Cum pot sa midific barile alea negre unde trebuie sa fie textul: http://prntscr.com/j7if0l
Tipologie server:
*Resursă folosită:
*ServerFiles utilizat:
*Syserr:
Poză:
*Detalii suplimentare:
Vreau sa pun in locul acelor bari o imagine spre exemplu, un slotbar.
o parte din uiprofile.py
http://prntscr.com/j7ifq6
Intrebare Profil System
K3RN3L scrie:ui.SlotBar
Cauta in ui.py class SlotBar si lasa-l aici.
[ Postat de pe Android ]
Cod: Selectaţi tot
class SlotBar(Window):
def __init__(self):
Window.__init__(self)
def RegisterWindow(self, layer):
self.hWnd = wndMgr.RegisterBar3D(self, layer)Facem in alt fel , punem o imagine ca parent la acel input.
Edit , o sa ai nevoie de imagini diferite ca slot pentru input asa ca adaugam un parametru pe nume img
def EditLine(self, parent, editlineText, x, y, width, heigh, max,isMe,isMulteLine):
SlotBar = ui.ExpandedImageBox()
SlotBar.LoadImage("locatie slot.tga")
if parent != None:
SlotBar.SetParent(parent)
SlotBar.SetPosition(x, y)
SlotBar.Show()
if isMe==True:
Value = ui.EditLine()
else:
Value = ui.TextLine()
Value.SetParent(SlotBar)
Value.SetSize(width, heigh)
Value.SetPosition(1, 1)
Value.SetLimitWidth(width)
Value.SetMax(max)
Value.GetText()
Value.SetText(editlineText)
if isMulteLine == True:
Value.SetMultiLine()
Edit , o sa ai nevoie de imagini diferite ca slot pentru input asa ca adaugam un parametru pe nume img
def EditLine(self, parent, editlineText, x, y, width, heigh, max,isMe,isMulteLine , img):
SlotBar = ui.ExpandedImageBox()
SlotBar.LoadImage(img)
if parent != None:
SlotBar.SetParent(parent)
SlotBar.SetPosition(x, y)
SlotBar.Show()
if isMe==True:
Value = ui.EditLine()
else:
Value = ui.TextLine()
Value.SetParent(SlotBar)
Value.SetSize(width, heigh)
Value.SetPosition(1, 1)
Value.SetLimitWidth(width)
Value.SetMax(max)
Value.GetText()
Value.SetText(editlineText)
if isMulteLine == True:
Value.SetMultiLine()
Pentru a folosi functia in functie de marime faci asa:
self.editName = self.comp.EditLine(self.Board,str(Name), 147, 28+14+18, 100,20,24,False,False,"locatie imagine.tga")
Degeaba:K3RN3L scrie:Facem in alt fel , punem o imagine ca parent la acel input.
def EditLine(self, parent, editlineText, x, y, width, heigh, max,isMe,isMulteLine): SlotBar = ui.ExpandedImageBox() SlotBar.LoadImage("locatie slot.tga") if parent != None: SlotBar.SetParent(parent) SlotBar.SetPosition(x, y) SlotBar.Show() if isMe==True: Value = ui.EditLine() else: Value = ui.TextLine() Value.SetParent(SlotBar) Value.SetSize(width, heigh) Value.SetPosition(1, 1) Value.SetLimitWidth(width) Value.SetMax(max) Value.GetText() Value.SetText(editlineText) if isMulteLine == True: Value.SetMultiLine()
Edit , o sa ai nevoie de imagini diferite ca slot pentru input asa ca adaugam un parametru pe nume imgdef EditLine(self, parent, editlineText, x, y, width, heigh, max,isMe,isMulteLine , img): SlotBar = ui.ExpandedImageBox() SlotBar.LoadImage(img) if parent != None: SlotBar.SetParent(parent) SlotBar.SetPosition(x, y) SlotBar.Show() if isMe==True: Value = ui.EditLine() else: Value = ui.TextLine() Value.SetParent(SlotBar) Value.SetSize(width, heigh) Value.SetPosition(1, 1) Value.SetLimitWidth(width) Value.SetMax(max) Value.GetText() Value.SetText(editlineText) if isMulteLine == True: Value.SetMultiLine()Pentru a folosi functia in functie de marime faci asa:self.editName = self.comp.EditLine(self.Board,str(Name), 147, 28+14+18, 100,20,24,False,False,"locatie imagine.tga")
Cod: Selectaţi tot
0420 00:28:31008 :: Traceback (most recent call last):
0420 00:28:31008 :: File "game.py", line 819, in OpenProfileDialog
0420 00:28:31008 :: File "uiprofile.py", line 90, in OpenWindow
0420 00:28:31008 :: AttributeError
0420 00:28:31008 :: :
0420 00:28:31008 :: Component instance has no attribute 'EditLine'
0420 00:28:31008 :: Cod: Selectaţi tot
self.editName = self.comp.EditLine(self.Board,str(Name), 147, 28+14+18, 100,20,24,False,False,"locale/ro/ui/profil/slot.tga")Cod: Selectaţi tot
def OpenProfileDialog(self,Name,Gander,Deeanh,Age,City,Country,Fcbook,Website,Skype,Note):
self.uiprofile.OpenWindow(Name,Gander,Deeanh,Age,City,Country,Fcbook,Website,Skype,Note)Ma scoate din client la loading:K3RN3L scrie:Adauga asa:
ABBC3_SPOILER_SHOW
Cod: Selectaţi tot
0420 01:01:13780 ::
networkModule.py(line:229) SetLoadingPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introLoading.py(line:27) <module>
system.py(line:130) __pack_import
system.py(line:110) _process_result
uiMessenger.py(line:10) <module>
system.py(line:130) __pack_import
system.py(line:110) _process_result
uiGameOption.py(line:13) <module>
system.py(line:130) __pack_import
system.py(line:110) _process_result
interfaceModule.py(line:14) <module>
system.py(line:130) __pack_import
system.py(line:110) _process_result
uiInventory.py(line:22) <module>
system.py(line:130) __pack_import
system.py(line:110) _process_result
paginabonusuri.py(line:9) <module>
system.py(line:130) __pack_import
system.py(line:110) _process_result
game.py(line:56) <module>
system.py(line:130) __pack_import
networkModule.SetLoadingPhase - <type 'exceptions.IndentationError'>:unindent does not match any outer indentation level (uiprofile.py, line 174)
0420 01:01:13780 :: ============================================================================================================
0420 01:01:13780 :: Abort!!!!Cod: Selectaţi tot
if parent != None:83 de tab-uri facute prost.Bughy scrie:Ma scoate din client la loading:K3RN3L scrie:Adauga asa:
ABBC3_SPOILER_SHOW
linia 174:Cod: Selectaţi tot
0420 01:01:13780 :: networkModule.py(line:229) SetLoadingPhase system.py(line:130) __pack_import system.py(line:110) _process_result introLoading.py(line:27) <module> system.py(line:130) __pack_import system.py(line:110) _process_result uiMessenger.py(line:10) <module> system.py(line:130) __pack_import system.py(line:110) _process_result uiGameOption.py(line:13) <module> system.py(line:130) __pack_import system.py(line:110) _process_result interfaceModule.py(line:14) <module> system.py(line:130) __pack_import system.py(line:110) _process_result uiInventory.py(line:22) <module> system.py(line:130) __pack_import system.py(line:110) _process_result paginabonusuri.py(line:9) <module> system.py(line:130) __pack_import system.py(line:110) _process_result game.py(line:56) <module> system.py(line:130) __pack_import networkModule.SetLoadingPhase - <type 'exceptions.IndentationError'>:unindent does not match any outer indentation level (uiprofile.py, line 174) 0420 01:01:13780 :: ============================================================================================================ 0420 01:01:13780 :: Abort!!!!
Cod: Selectaţi tot
if parent != None:
Tot fisierul era facut cu tab-uri gresite. Poftim:
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 17 vizitatori




daca te-am ajutat.