Problema titlebar [Rezolvat]

Înainte de a posta o problemă, caută în acest forum și poate găsești rezolvare.
Închis
Avatar utilizator
gabriel100110
Nou Venit

Nou Venit
Mesaje: 22
Membru din: 04 Dec 2014, 19:04
Aprecieri: 4  
Mulţumiri: 1  
Medalii

*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
Ultima oară modificat 25 Noi 2018, 22:57 de către gabriel100110, modificat 1 dată în total.
Avatar utilizator
6Daemon9
Nivel 1

Nivel 1
Mesaje: 109
Membru din: 07 Oct 2018, 12:26
Server: Asenia2
Regat: Shinsoo
Aprecieri: 9  
Mulţumiri: 311  
Medalii

În folderul etc schimbă-l cu unul dintr-un server ce are interfața clasică .
Imagine

La cât sunteți de praf vă aliniez vă trag pe nas .
Afișează semnătura
Avatar utilizator
gabriel100110
Nou Venit

Nou Venit
Mesaje: 22
Membru din: 04 Dec 2014, 19:04
Aprecieri: 4  
Mulţumiri: 1  
Medalii

6Daemon9 scrie:În folderul etc schimbă-l cu unul dintr-un server ce are interfața clasică .
Faza e ca sunt cele clasice loate de pe clientu oficial dar la fel arata

[ Postat de pe Samsung Galaxy Note 3 ] Imagine
Avatar utilizator
AndyOpris
Nivel 4

Nivel 4
Mesaje: 500
Membru din: 09 Iun 2015, 15:12
Server: -
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 226  
Medalii

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
Avatar utilizator
gabriel100110
Nou Venit

Nou Venit
Mesaje: 22
Membru din: 04 Dec 2014, 19:04
Aprecieri: 4  
Mulţumiri: 1  
Medalii

Se blocheaza in loading screen iar in syserr apare asta
1125 22:34:23264 :: Traceback (most recent call last):

1125 22:34:23264 :: File "networkModule.py", line 238, in SetGamePhase

1125 22:34:23265 :: File "system.py", line 126, in __pack_import

1125 22:34:23265 :: File "system.py", line 106, in _process_result

1125 22:34:23266 :: File "game.py", line 51, in <module>

1125 22:34:23266 :: File "system.py", line 126, in __pack_import

1125 22:34:23266 :: File "system.py", line 106, in _process_result

1125 22:34:23267 :: File "savbec.py", line 181, in <module>

1125 22:34:23267 :: File "savbec.py", line 7, in __init__

1125 22:34:23268 :: File "savbec.py", line 13, in BuildWindow

1125 22:34:23268 :: File "ui.py", line 2320, in __init__

1125 22:34:23268 :: File "ui.py", line 2063, in MakeTitleBar

1125 22:34:23269 :: NameError
1125 22:34:23269 :: :
1125 22:34:23269 :: global name 'locale' is not defined
1125 22:34:23269 ::
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)
Edit:
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
Avatar utilizator
- edward.
Nivel 5

Nivel 5
Mesaje: 879
Membru din: 08 Sep 2017, 20:53
Server: lucrez la un 2089m
Regat: Chunjo
Aprecieri: 13  
Mulţumiri: 34  
Medalii

subiect mutat în probleme rezolvate.

[ Postat de pe Linux Laptop ] Imagine
Imagine
detalii despre serviciile tehnice oferite de mine găseşti aici.


mr digei ediţă - radio dev j4m
Afișează semnătura
Închis
Răspunsuri
3
Vizualizări
373
Răspunsuri
0
Vizualizări
198
Răspunsuri
2
Vizualizări
242
Răspunsuri
4
Vizualizări
1676

Înapoi la “Probleme rezolvate”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 6 vizitatori