*Problemă: Problema titlebar
Tipologie server:-
*Resursă folosită: Client HippoMt2
*ServerFiles utilizat: -
*Syserr: -
Poză:
*Detalii suplimentare: Salut,am reusit sa schimb interfata game la cea clasica dar nu reusesc sa pun inapoi titlebaru classic in client am cautat in packuri si sunt cele clasice acolo dar tot nu se schimba in client
Poate stiti voi unde este locatia exacta la acel tga/png/dds
Multumesc Anticipat
Problema titlebar [Rezolvat]
Faza e ca sunt cele clasice loate de pe clientu oficial dar la fel arata6Daemon9 scrie:În folderul etc schimbă-l cu unul dintr-un server ce are interfața clasică .
[ Postat de pe Samsung Galaxy Note 3 ]

Inlocuiestie tot class TitleBar din ui.py cu asta:
class TitleBar(Window):
BLOCK_WIDTH = 32
BLOCK_HEIGHT = 23
def __init__(self):
Window.__init__(self)
self.AddFlag("attach")
def __del__(self):
Window.__del__(self)
def MakeTitleBar(self, width, color):
## 현재 Color는 사용하고 있지 않음
width = max(64, width)
imgLeft = ImageBox()
imgCenter = ExpandedImageBox()
imgRight = ImageBox()
imgLeft.AddFlag("not_pick")
imgCenter.AddFlag("not_pick")
imgRight.AddFlag("not_pick")
imgLeft.SetParent(self)
imgCenter.SetParent(self)
imgRight.SetParent(self)
if locale.IsARABIC():
imgLeft.LoadImage("locale/ae/ui/pattern/titlebar_left.tga")
imgCenter.LoadImage("locale/ae/ui/pattern/titlebar_center.tga")
imgRight.LoadImage("locale/ae/ui/pattern/titlebar_right.tga")
else:
imgLeft.LoadImage("d:/ymir work/ui/pattern/titlebar_left.tga")
imgCenter.LoadImage("d:/ymir work/ui/pattern/titlebar_center.tga")
imgRight.LoadImage("d:/ymir work/ui/pattern/titlebar_right.tga")
imgLeft.Show()
imgCenter.Show()
imgRight.Show()
btnClose = Button()
btnClose.SetParent(self)
btnClose.SetUpVisual("d:/ymir work/ui/public/close_button_01.sub")
btnClose.SetOverVisual("d:/ymir work/ui/public/close_button_02.sub")
btnClose.SetDownVisual("d:/ymir work/ui/public/close_button_03.sub")
btnClose.SetToolTipText(locale.UI_CLOSE, 0, -23)
btnClose.Show()
self.imgLeft = imgLeft
self.imgCenter = imgCenter
self.imgRight = imgRight
self.btnClose = btnClose
self.SetWidth(width)
def SetWidth(self, width):
self.imgCenter.SetRenderingRect(0.0, 0.0, float((width - self.BLOCK_WIDTH*2) - self.BLOCK_WIDTH) / self.BLOCK_WIDTH, 0.0)
self.imgCenter.SetPosition(self.BLOCK_WIDTH, 0)
self.imgRight.SetPosition(width - self.BLOCK_WIDTH, 0)
if locale.IsARABIC():
self.btnClose.SetPosition(3, 3)
else:
self.btnClose.SetPosition(width - self.btnClose.GetWidth() - 3, 3)
self.SetSize(width, self.BLOCK_HEIGHT)
def SetCloseEvent(self, event):
self.btnClose.SetEvent(event)- Pentru acest mesaj, AndyOpris for the post:
- gabriel100110
Se blocheaza in loading screen iar in syserr apare asta
Cu putin cap am comparat codu meu cu codul oferit de tine si am obsevat ca folosesc localeInfo in loc de locale
Mersi totusi de ajutor
Se poate da t/c
Edit:AndyOpris scrie:Inlocuiestie tot class TitleBar din ui.py cu asta:class TitleBar(Window): BLOCK_WIDTH = 32 BLOCK_HEIGHT = 23 def __init__(self): Window.__init__(self) self.AddFlag("attach") def __del__(self): Window.__del__(self) def MakeTitleBar(self, width, color): ## 현재 Color는 사용하고 있지 않음 width = max(64, width) imgLeft = ImageBox() imgCenter = ExpandedImageBox() imgRight = ImageBox() imgLeft.AddFlag("not_pick") imgCenter.AddFlag("not_pick") imgRight.AddFlag("not_pick") imgLeft.SetParent(self) imgCenter.SetParent(self) imgRight.SetParent(self) if locale.IsARABIC(): imgLeft.LoadImage("locale/ae/ui/pattern/titlebar_left.tga") imgCenter.LoadImage("locale/ae/ui/pattern/titlebar_center.tga") imgRight.LoadImage("locale/ae/ui/pattern/titlebar_right.tga") else: imgLeft.LoadImage("d:/ymir work/ui/pattern/titlebar_left.tga") imgCenter.LoadImage("d:/ymir work/ui/pattern/titlebar_center.tga") imgRight.LoadImage("d:/ymir work/ui/pattern/titlebar_right.tga") imgLeft.Show() imgCenter.Show() imgRight.Show() btnClose = Button() btnClose.SetParent(self) btnClose.SetUpVisual("d:/ymir work/ui/public/close_button_01.sub") btnClose.SetOverVisual("d:/ymir work/ui/public/close_button_02.sub") btnClose.SetDownVisual("d:/ymir work/ui/public/close_button_03.sub") btnClose.SetToolTipText(locale.UI_CLOSE, 0, -23) btnClose.Show() self.imgLeft = imgLeft self.imgCenter = imgCenter self.imgRight = imgRight self.btnClose = btnClose self.SetWidth(width) def SetWidth(self, width): self.imgCenter.SetRenderingRect(0.0, 0.0, float((width - self.BLOCK_WIDTH*2) - self.BLOCK_WIDTH) / self.BLOCK_WIDTH, 0.0) self.imgCenter.SetPosition(self.BLOCK_WIDTH, 0) self.imgRight.SetPosition(width - self.BLOCK_WIDTH, 0) if locale.IsARABIC(): self.btnClose.SetPosition(3, 3) else: self.btnClose.SetPosition(width - self.btnClose.GetWidth() - 3, 3) self.SetSize(width, self.BLOCK_HEIGHT) def SetCloseEvent(self, event): self.btnClose.SetEvent(event)
Cu putin cap am comparat codu meu cu codul oferit de tine si am obsevat ca folosesc localeInfo in loc de locale
Mersi totusi de ajutor
Se poate da t/c
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 6 vizitatori






