Exemplo n.º 1
0
 def RefreshShowSalesText(self):
     if systemSetting.IsShowSalesText():
         self.showsalesTextButtonList[0].Down()
         self.showsalesTextButtonList[1].SetUp()
     else:
         self.showsalesTextButtonList[0].SetUp()
         self.showsalesTextButtonList[1].Down()
 def OnUpdate(self):
     if not self.vid:
         return
     if systemSetting.IsShowSalesText():
         if GetShopNamesRange() == 1.000:
             self.Show()
             (x, y) = chr.GetProjectPosition(self.vid, 220)
             self.SetPosition(x - self.GetWidth() / 2,
                              y - self.GetHeight() / 2)
         else:
             LIMIT_RANGE = abs(constInfo.SHOPNAMES_RANGE *
                               GetShopNamesRange())
             (to_x, to_y, to_z) = chr.GetPixelPosition(self.vid)
             (my_x, my_y, my_z) = player.GetMainCharacterPosition()
             if abs(my_x - to_x) <= LIMIT_RANGE and abs(
                     my_y - to_y) <= LIMIT_RANGE:
                 (x, y) = chr.GetProjectPosition(self.vid, 220)
                 self.SetPosition(x - self.GetWidth() / 2,
                                  y - self.GetHeight() / 2)
                 self.Show()
             else:
                 self.Hide()
                 self.SetPosition(-10000, 0)
     else:
         for key in g_privateShopAdvertisementBoardDict.keys():
             if player.GetMainCharacterIndex() == key:
                 g_privateShopAdvertisementBoardDict[key].Show()
                 x, y = chr.GetProjectPosition(
                     player.GetMainCharacterIndex(), 220)
                 g_privateShopAdvertisementBoardDict[key].SetPosition(
                     x - self.GetWidth() / 2, y - self.GetHeight() / 2)
             else:
                 g_privateShopAdvertisementBoardDict[key].Hide()
Exemplo n.º 3
0
	def OnUpdate(self):
		if (not self.vid):
			return

		if (systemSetting.IsShowSalesText()):
			self.Show()
			(x, y) = chr.GetProjectPosition(self.vid, 220)
			self.SetPosition(x - self.GetWidth() / 2, y - self.GetHeight() / 2)
		else:
			for key in g_offlineShopAdvertisementBoardDict.keys():
				g_offlineShopAdvertisementBoardDict[key].Hide()
Exemplo n.º 4
0
	def OnUpdate(self):
		if not self.vid:
			return

		if systemSetting.IsShowSalesText():
			self.Show()
			x, y = chr.GetProjectPosition(self.vid, 220)
			self.SetPosition(x - self.GetWidth()/2, y - self.GetHeight()/2)
		
		else:
			for key in g_privateShopAdvertisementBoardDict.keys():
				if  player.GetMainCharacterIndex() == key:  #상점풍선을 안보이게 감추는 경우에도, 플레이어 자신의 상점 풍선은 보이도록 함. by 김준호
					g_privateShopAdvertisementBoardDict[key].Show() 	
					x, y = chr.GetProjectPosition(player.GetMainCharacterIndex(), 220)
					g_privateShopAdvertisementBoardDict[key].SetPosition(x - self.GetWidth()/2, y - self.GetHeight()/2)
				else:
					g_privateShopAdvertisementBoardDict[key].Hide()
Exemplo n.º 5
0
 def OnChangeShopNamesRange(self):
     pos = self.ctrlShopNamesRange.GetSliderPos()
     uiPrivateShopBuilder.SetShopNamesRange(pos)
     if systemSetting.IsShowSalesText():
         uiPrivateShopBuilder.UpdateADBoard()