Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Pety+gui


Rekomendowane odpowiedzi

Opublikowano

Proszę was o pomoc o tóż mam problem pety dodałem pięknie smigają :)

Lecz jak dodaję gui czyli edytuję w root game.py

zapisuje i jak się loguję to przy ladowaniu paska odrazu wywala mi metka a w sysser nic się nie zapisuje dlaczego  ??

Opublikowano

otwórz intrologin.py

 

po "importach" dodaj to :

sys.stderr = open('errors.txt','w',0)

aby tak to wyglądało 

http://prntscr.com/3buf26

to pozwoli ci oddzielić błedy z binki i błędy z  pythona 

błedy przez pythona będą sie zapisywać w errors.txt i będą dokładniej wyjaśnione 

 

 

jak to zrobisz to znów odpal metka i jak cię wywali przy ładowaniu to zobacz czy jest cos w  errors.txt

Opublikowano

Edytowałem to :

 

 

Pod Tym :

 

self.targetBoard.Hide()

 

To dodałem

 

 

 

 

#PET_SYSTEM
ExpBar = ui.AniImageBox()
ExpBar.AddFlag("not_pick")
ExpBar.SetDelay(6)
ExpBar.AppendImage("d:/ymir work/ui/pattern/pets/giallo.tga")
ExpBar.AppendImage("d:/ymir work/ui/pattern/pets/gialloC.tga")
self.ExpBar = ExpBar
self.ExpBar.SetPosition(wndMgr.GetScreenWidth() - 131, 225)

AbiBar = ui.AniImageBox()
AbiBar.AddFlag("not_pick")
AbiBar.SetDelay(6)
AbiBar.AppendImage("d:/ymir work/ui/pattern/pets/blu.tga")
AbiBar.AppendImage("d:/ymir work/ui/pattern/pets/bluC.tga")
self.AbiBar = AbiBar
self.AbiBar.SetPosition(wndMgr.GetScreenWidth() - 131, 214)

self.Boardx = ui.ImageBox()
self.Boardx.SetParent(self)
self.Boardx.LoadImage("d:/ymir work/ui/pattern/pets/board.tga")
self.Boardx.SetPosition(wndMgr.GetScreenWidth() - 225, 170)
self.Boardx.SetSize(225, 155)
self.Boardx.Hide()

self.PetImg = ui.ImageBox()
self.PetImg.SetParent(self)
self.PetImg.OnMouseLeftButtonUp = ui.__mem_func__(self.__Pet_Click)
self.PetImg.SetSize(50, 50)
self.PetImg.Hide()

self.info1 = ui.TextLine()
self.info1.SetFontName("Tahoma:11")
self.info1.SetText("Punti Abilità: ")
self.info1.SetPosition(wndMgr.GetScreenWidth() - 125, 213)
self.info1.SetFeather()
self.info1.SetOutline()
self.info1.Hide()

self.abi = ui.TextLine()
self.abi.SetFontName("Tahoma:11")
self.abi.SetHorizontalAlignLeft()
self.abi.SetPosition(wndMgr.GetScreenWidth() - 43, 213)
self.abi.SetFeather()
self.abi.SetOutline()
self.abi.Hide()

self.info2 = ui.TextLine()
self.info2.SetFontName("Tahoma:11")
self.info2.SetText("Exp: ")
self.info2.SetPosition(wndMgr.GetScreenWidth() - 125, 234)
self.info2.SetFeather()
self.info2.SetOutline()
self.info2.Hide()

self.exp = ui.TextLine()
self.exp.SetFontName("Tahoma:11")
self.exp.SetHorizontalAlignRight()
self.exp.SetPosition(wndMgr.GetScreenWidth() - 55, 234)
self.exp.SetFeather()
self.exp.SetOutline()
self.exp.Hide()

self.nextExp = ui.TextLine()
self.nextExp.SetFontName("Tahoma:11")
self.nextExp.SetHorizontalAlignLeft()
self.nextExp.SetFeather()
self.nextExp.SetOutline()
self.nextExp.Hide()

self.nome = ui.TextLine()
self.nome.SetFontName(locale.UI_DEF_FONT_LARGE)
self.nome.SetPosition(wndMgr.GetScreenWidth() - 110, 195)
self.nome.SetFeather()
self.nome.SetOutline()
self.nome.Hide()

self.livello = ui.TextLine()
self.livello.SetFontName("Tahoma:11")
self.livello.SetPosition(wndMgr.GetScreenWidth() - 154, 230)
self.livello.SetFeather()
self.livello.SetOutline()
self.livello.Hide()
#END_OF_PET_SYSTEM

 

 

 

 

 

Potem pod tym :

 

# SHOW_LOCAL_MAP_NAME

 

 

To dodałem :

 

 

#PET_SYSTEM
def __OpenBoardx(self, index, livello, abi, ExpPet, nextExpPet, lock, maxAbi):

from array import array
pets = ('Fenice Rossa','Fenice Blu','Renna','Azarel','Lupo','Leone','Cinghiale','Tigre')
petimage = ('fenice_rossa','fenice_blu','renna','azarel','cane','leone','cinghiale','tigre')
self.PetImg.SetPosition(wndMgr.GetScreenWidth() - 200, 185)
self.PetImg.LoadImage("d:/ymir work/ui/pattern/pets/"+petimage[int(index)-1]+".tga")
self.nome.SetText(pets[int(index)-1])
self.livello.SetText(livello)
self.AbiBar.SetPercentage(abi, maxAbi)
# nextExpFix = max(nextExpPet, ExpPet)
self.abi.SetText(abi)
if int(nextExpPet) > 0:
self.ExpBar.SetPercentage(ExpPet, nextExpPet)
else:
pass

self.IsLock = int(lock)
if self.IsLock:
self.nextExp.SetText("BLOCCATO")
self.nextExp.SetPosition(wndMgr.GetScreenWidth() - 90, 234)
self.exp.Hide()
else:
self.exp.SetText(ExpPet+" / ")
self.nextExp.SetText(nextExpPet)
self.exp.Show()
self.nextExp.SetPosition(wndMgr.GetScreenWidth() - 55, 234)

self.info1.Show()
self.info2.Show()
self.Boardx.Show()
self.nome.Show()
self.livello.Show()
self.abi.Show()
self.nextExp.Show()
self.ExpBar.Show()
self.AbiBar.Show()
self.PetImg.Show()
self.PetIsClose = FALSE

def __UpdateBoardx(self, index, livello, abi, ExpPet, nextExpPet, lock, maxAbi):
self.livello.SetText(livello)
self.AbiBar.SetPercentage(abi, maxAbi)
# nextExpFix = max(nextExpPet, ExpPet)
self.abi.SetText(abi)
if int(nextExpPet) > 0:
self.ExpBar.SetPercentage(ExpPet, nextExpPet)
else:
pass

self.IsLock = int(lock)
if self.IsLock:
self.nextExp.SetText("BLOCCATO")
else:
self.exp.SetText(ExpPet+" / ")
self.nextExp.SetText(nextExpPet)

def __Pet_Click(self):
if self.PetIsClose and self.IsLock:
self.Boardx.Show()
self.nome.Show()
self.livello.Show()
self.info1.Show()
self.info2.Show()
self.abi.Show()
self.exp.Hide()
self.nextExp.Show()
self.ExpBar.Show()
self.AbiBar.Show()
self.PetImg.SetPosition(wndMgr.GetScreenWidth() - 200, 185)
self.PetImg.Show()
self.PetIsClose = FALSE
elif self.PetIsClose:
self.Boardx.Show()
self.nome.Show()
self.livello.Show()
self.info1.Show()
self.info2.Show()
self.abi.Show()
self.exp.Show()
self.nextExp.Show()
self.ExpBar.Show()
self.AbiBar.Show()
self.PetImg.SetPosition(wndMgr.GetScreenWidth() - 200, 185)
self.PetImg.Show()
self.PetIsClose = FALSE
else:
self.Boardx.Hide()
self.nome.Hide()
self.livello.Hide()
self.info1.Hide()
self.info2.Hide()
self.abi.Hide()
self.exp.Hide()
self.nextExp.Hide()
self.ExpBar.Hide()
self.AbiBar.Hide()
self.PetImg.SetPosition(wndMgr.GetScreenWidth() - 90, 190)
self.PetImg.Show()
self.PetIsClose = TRUE

def __CloseBoardx(self):
self.Boardx.Hide()
self.nome.Hide()
self.livello.Hide()
self.info1.Hide()
self.info2.Hide()
self.abi.Hide()
self.exp.Hide()
self.nextExp.Hide()
self.AbiBar.Hide()
self.ExpBar.Hide()
self.PetImg.Hide()

#END_OF_PET_SYSTEM

 

 

 

 

Potem pod tym :

 

# END_OF_WEDDING

 

 

To dodałem :

 

 

#PET_SYSTEM
"apri" : self.__OpenBoardx,
"chiudi" : self.__CloseBoardx,
"aggiorna" : self.__UpdateBoardx,
#END_OF_PET_SYSTEM

 

 

 

 

 

A tu  jest Game :

http://www.speedyshare.com/nu6gB/game.py

A tu Scan :

http://virusscan.jotti.org/pl/scanresult/bc2663702ad72788a6d30b956c1b33459fdb0666

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...