Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ui
- import player
- import wndMgr
- SILNY = ["Potworom:","Diablom:","Nieumarlym:","Mistykom:","Orkom:","Zwięrzetom:","Ludziom:","Wojownikom:","Ninja:","Sura:","Szamanom:"]
- S_P_X = [30, 30, 30, 30, 30, 30, 180, 180, 180, 180, 180]
- S_P_Y = [45, 60, 75, 90, 105, 120, 45, 60, 75, 90, 105]
- ODPORNY = ["Wojowników:","Ninja:","Sura:","Szamanów:","Magie:","Ogień:","Błyskawice:","Wiatr:","Miecze:","Broń dwuręczną:","Sztylety:","Strzały:","Dzwony:","Wachlarze:", "Spowolnienia:", "Omdlenia:"]
- O_P_X = [30, 30, 30, 30, 30, 30, 30, 30, 180, 180, 180, 180, 180, 180, 180, 180]
- O_P_Y = [180, 195, 210, 225, 240, 255, 270, 285,180, 195, 210, 225, 240, 255, 270, 285]
- POZOSTALE = ["Regeneracja PŻ:","Regeneracja PE:","Blok ciosu:","Odbicie ciosu:","Bonus doświadczenia:","Drop yang:","Drop przedmiotów:","Obrona:"]
- P_P_X = [30, 30, 30, 30, 180, 180, 180, 180]
- P_P_Y = [330, 345, 360, 375, 330, 345, 360, 375]
- BONUSY = ["Silny Przeciwko:","Odporność Na:","Pozostałe:"]
- BONUSY_POS_Y = [15, 150, 300]
- W_P_X = [120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290,290]
- W_P_Y = [45, 60, 75, 90, 105, 120, 180, 195, 210, 225, 240, 255, 270, 285, 330, 345, 360, 375, 45, 60, 75, 90, 105, 180, 195, 210, 225, 240, 255, 270, 285, 330, 345, 360, 375]
- BONUS = [53,48,47,46,45,44,59,60,61,62,77,75,76,78,32,33,67,79,43,54,55,56,57,69,70,71,74,72,73,89,88,83,84,85,player.DEF_GRADE]
- PASKI = [40, 175, 325]
- class OknoBonusow(ui.ThinBoard):
- Opisy = []
- Silny = []
- Odporny = []
- Pozostale = []
- Wartosci = []
- Paski = []
- def __init__(self):
- ui.ThinBoard.__init__(self, "TOP_MOST")
- self.SetSize(350, 410)
- self.Show()
- self.BudujOkno()
- def __del__(self):
- ui.ThinBoard.__del__(self)
- self.Hide()
- def BudujOkno(self):
- for i in xrange(0, 3):
- Vertical = ui.Line()
- Vertical.SetParent(self)
- Vertical.SetPosition(8, PASKI[i])
- Vertical.SetSize(335, 0)
- Vertical.SetColor(0xff777777)
- Vertical.Show()
- self.Paski.append(Vertical)
- for i in xrange(0, 3):
- napis = ui.TextLine()
- napis.SetParent(self)
- napis.SetPosition(self.GetWidth()/2, BONUSY_POS_Y[i])
- napis.SetText(BONUSY[i])
- napis.SetHorizontalAlignCenter()
- napis.SetFontColor(1.0, 0.7843, 0.0)
- napis.Show()
- self.Opisy.append(napis)
- for i in xrange(0, 11):
- silny = ui.TextLine()
- silny.SetParent(self)
- silny.SetPosition(S_P_X[i], S_P_Y[i])
- silny.SetText(SILNY[i])
- silny.SetFontColor(0.6911, 0.8754, 0.7068)
- silny.Show()
- self.Silny.append(silny)
- for i in xrange(0, 16):
- odporny = ui.TextLine()
- odporny.SetParent(self)
- odporny.SetPosition(O_P_X[i], O_P_Y[i])
- odporny.SetText(ODPORNY[i])
- odporny.SetFontColor(0.6911, 0.8754, 0.7068)
- odporny.Show()
- self.Odporny.append(odporny)
- for i in xrange(0, 8):
- pozostale = ui.TextLine()
- pozostale.SetParent(self)
- pozostale.SetPosition(P_P_X[i], P_P_Y[i])
- pozostale.SetText(POZOSTALE[i])
- pozostale.SetFontColor(0.6911, 0.8754, 0.7068)
- pozostale.Show()
- self.Pozostale.append(pozostale)
- for i in xrange(0, 35):
- wartosc = ui.TextLine()
- wartosc.SetParent(self)
- wartosc.SetPosition(W_P_X[i], W_P_Y[i])
- wartosc.Show()
- wartosc.SetText(str(player.GetStatus(BONUS[i]))+"%")
- if BONUS[i]==88 and player.GetStatus(BONUS[i])>0:
- wartosc.SetText("Tak")
- elif BONUS[i]==88:
- wartosc.SetText("Nie")
- if BONUS[i]==89 and player.GetStatus(BONUS[i])>0:
- wartosc.SetText("Tak")
- elif BONUS[i]==89:
- wartosc.SetText("Nie")
- if BONUS[i]==player.DEF_GRADE:
- wartosc.SetText(str(player.GetStatus(BONUS[i])))
- self.Wartosci.append(wartosc)
- def OnUpdate(self):
- (mouseX, mouseY) = wndMgr.GetMousePosition()
- self.SetPosition(mouseX-430,mouseY-130)
- for i in xrange(0, 35):
- self.Wartosci[i].SetText(str(player.GetStatus(BONUS[i]))+"%")
- if BONUS[i]==88 and player.GetStatus(BONUS[i])>0:
- self.Wartosci[i].SetText("Tak")
- elif BONUS[i]==88:
- self.Wartosci[i].SetText("Nie")
- if BONUS[i]==89 and player.GetStatus(BONUS[i])>0:
- self.Wartosci[i].SetText("Tak")
- elif BONUS[i]==89:
- self.Wartosci[i].SetText("Nie")
- if BONUS[i]==player.DEF_GRADE:
- self.Wartosci[i].SetText(str(player.GetStatus(BONUS[i])))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement