コード例 #1
0
ファイル: uiPickMoney.py プロジェクト: dealex999/EgnaroV2
    def Open(self, maxValue, unitValue=1):

        if locale.IsYMIR() or locale.IsCHEONMA() or locale.IsHONGKONG():
            unitValue = ""

        width = self.GetWidth()
        (mouseX, mouseY) = wndMgr.GetMousePosition()

        if mouseX + width / 2 > wndMgr.GetScreenWidth():
            xPos = wndMgr.GetScreenWidth() - width
        elif mouseX - width / 2 < 0:
            xPos = 0
        else:
            xPos = mouseX - width / 2

        self.SetPosition(xPos, mouseY - self.GetHeight() - 20)

        if locale.IsARABIC():
            self.maxValueTextLine.SetText("/" + str(maxValue))
        else:
            self.maxValueTextLine.SetText(" / " + str(maxValue))

        self.pickValueEditLine.SetText(str(unitValue))
        self.pickValueEditLine.SetFocus()

        ime.SetCursorPosition(1)

        self.unitValue = unitValue
        self.maxValue = maxValue
        self.Show()
        self.SetTop()
コード例 #2
0
	def ShowMapName(self, mapName, x, y):
		if not self.MAP_NAME_IMAGE.has_key(mapName):
			print " [ERROR] - There is no map name image", mapName
			return

		try:
			self.LoadImage(self.MAP_NAME_IMAGE[mapName])
		except RuntimeError:
			return

		self.__Initialize()

		if mapName == "metin2_map_deviltower1":
			self.SetPosition(-60, 80)

			self.floorImage = ui.ExpandedImageBox()
			self.floorImage.AddFlag("not_pick")
			self.floorImage.SetWindowHorizontalAlignCenter()
			self.floorImage.SetPosition(100, 80)
			self.floorImage.SetAlpha(0.0)
			self.floorImage.Show()
			# 맵이름 (ex: 아귀동굴) 이미지 로딩 & 표시			
			try:
				floor = self.__GetDevilTowerFloor(x, y)
				print x, y, floor
				self.floorImage.LoadImage(LOCALE_PATH+"devil1_%df.tga" % floor)
			except RuntimeError:
				self.SetPosition(0, 80)
				self.floorImage.Hide()
				self.floorImage = None
							
			if locale.IsYMIR() or locale.IsWE_KOREA():	
				self.objectiveImage = ui.ExpandedImageBox()
				self.objectiveImage.AddFlag("not_pick")
				self.objectiveImage.SetWindowHorizontalAlignCenter()
				self.objectiveImage.SetPosition(0, 200)
				self.objectiveImage.SetAlpha(0.0)
				self.objectiveImage.Show()
			
				# 층별 목표 이미지 로딩 & 표시
				# 던전은 현재 몇층인지 알아오는 부분 때문에 하드코딩을 피하기가 힘들다...
				try:
					floor = self.__GetDevilTowerFloor(x, y)
					print x, y, floor
					self.objectiveImage.LoadImage(LOCALE_PATH + mapName + "/obj_%02df.tga" % floor)
				except RuntimeError:
					self.SetPosition(0, 80)
					self.objectiveImage.Hide()
					self.objectiveImage = None
				
		if mapName == "metin2_map_devilsCatacomb":
			self.SetPosition(-75, 80)

			self.floorImage = ui.ExpandedImageBox()
			self.floorImage.AddFlag("not_pick")
			self.floorImage.SetWindowHorizontalAlignCenter()
			self.floorImage.SetPosition(100, 80)
			self.floorImage.SetAlpha(0.0)
			self.floorImage.Show()

			# 맵이름 (ex: 아귀동굴) 이미지 로딩 & 표시
			try:
				floor = self.__GetDevilBase(x, y)
				print x, y, floor
				self.floorImage.LoadImage(LOCALE_PATH+"devil1_%df.tga" % floor)
			except RuntimeError:
				self.SetPosition(0, 80)
				self.floorImage.Hide()
				self.floorImage = None
			if locale.IsYMIR() or locale.IsWE_KOREA():	
				self.objectiveImage = ui.ExpandedImageBox()
				self.objectiveImage.AddFlag("not_pick")
				self.objectiveImage.SetWindowHorizontalAlignCenter()
				self.objectiveImage.SetPosition(0, 200)
				self.objectiveImage.SetAlpha(0.0)
				self.objectiveImage.Show()
				

				# 층별 목표 이미지 로딩 & 표시
				# 던전은 현재 몇층인지 알아오는 부분 때문에 하드코딩을 피하기가 힘들다...
				try:
					floor = self.__GetDevilBase(x, y)
					print x, y, floor
					self.objectiveImage.LoadImage(LOCALE_PATH + mapName + "/obj_%02df.tga" % floor)
				except RuntimeError:
					self.SetPosition(0, 80)
					self.objectiveImage.Hide()
					self.objectiveImage = None
								
		self.state = self.STATE_FADE_IN
		self.fadeStartTime = app.GetTime() + 1.0
		self.Show()
コード例 #3
0
ファイル: introLogin.py プロジェクト: dealex999/EgnaroV2
        return src


if locale.IsNEWCIBN() or locale.IsCIBN10():
    LOGIN_DELAY_SEC = 20.0
    FULL_BACK_IMAGE = TRUE
    NEWCIBN_PASSPOD_AUTH = TRUE
    PASSPOD_MSG_DICT = {
        "PASERR1": locale.LOGIN_FAILURE_PASERR1,
        "PASERR2": locale.LOGIN_FAILURE_PASERR2,
        "PASERR3": locale.LOGIN_FAILURE_PASERR3,
        "PASERR4": locale.LOGIN_FAILURE_PASERR4,
        "PASERR5": locale.LOGIN_FAILURE_PASERR5,
    }

elif locale.IsYMIR() or locale.IsCHEONMA():
    FULL_BACK_IMAGE = TRUE

elif locale.IsHONGKONG():
    FULL_BACK_IMAGE = TRUE
    RUNUP_MATRIX_AUTH = TRUE
    PASSPOD_MSG_DICT = {
        "NOTELE": locale.LOGIN_FAILURE_NOTELEBLOCK,
    }

elif locale.IsJAPAN():
    FULL_BACK_IMAGE = TRUE


def IsFullBackImage():
    global FULL_BACK_IMAGE
コード例 #4
0
import item
import player
import chat
import grp
import uiScriptLocale
import uiRefine
import uiAttachMetin
import uiPickMoney
import uiCommon
import uiPrivateShopBuilder  # 개인상점 열동안 ItemMove 방지
import locale
import constInfo
import ime
import uiToolTip

if locale.IsEUROPE() and app.GetLocalePath() != "locale/sg" or locale.IsYMIR(
) or locale.IsJAPAN():
    ITEM_MALL_BUTTON_ENABLE = TRUE
else:
    ITEM_MALL_BUTTON_ENABLE = FALSE

ITEM_FLAG_APPLICABLE = 1 << 14

COSTUME_START_INDEX = 109
COSTUME_SLOT_COUNT = 3


class CostumeWindow(ui.ScriptWindow):
    def __init__(self, wndInventory):
        import exception

        #if not app.ENABLE_COSTUME_SYSTEM:
コード例 #5
0
    REGION_DICT = {
        0: {
            1: {
                "name": "����",
                "channel": SERVER01_CHANNEL_DICT,
            },
        },
    }

    TESTADDR = {
        "ip": "202.229.16.4",
        "tcp_port": 50000,
        "udp_port": 50000,
    }

elif locale.IsYMIR():
    STATE_NONE = "..."

    STATE_DICT = {0: "����", 1: "����", 2: "ȥ��", 3: "FULL"}

    SERVER01_CHANNEL_DICT = {
        1: {
            "key": 11,
            "name": "� 1   ",
            "ip": "202.31.212.51",
            "tcp_port": 50010,
            "udp_port": 50010,
            "state": STATE_NONE,
        },
        2: {
            "key": 12,
コード例 #6
0
	def Open(self):
		print "OPEN LOADING WINDOW -------------------------------------------------------------------------------"

		#app.HideCursor()

		try:
			pyScrLoader = ui.PythonScriptLoader()
			
			if locale.IsYMIR() or locale.IsWE_KOREA() or locale.IsCANADA() or locale.IsBRAZIL() or locale.IsEUROPE():
				pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "LoadingWindow.py")
			else:			
				pyScrLoader.LoadScriptFile(self, "UIScript/LoadingWindow.py")
		except:
			import exception
			exception.Abort("LodingWindow.Open - LoadScriptFile Error")

		try:
			self.loadingImage=self.GetChild("BackGround")
			self.errMsg=self.GetChild("ErrorMessage")
			self.loadingGage=self.GetChild("FullGage")
		except:
			import exception
			exception.Abort("LodingWindow.Open - LoadScriptFile Error")

		self.errMsg.Hide()

		if locale.IsHONGKONG():
			imgFileNameDict = {
				0 : app.GetLocalePath() + "/ui/loading/loading0.sub",
				1 : app.GetLocalePath() + "/ui/loading/loading1.sub",
				2 : app.GetLocalePath() + "/ui/loading/loading2.sub",
				3 : app.GetLocalePath() + "/ui/loading/loading3.sub",
				4 : app.GetLocalePath() + "/ui/loading/loading4.sub",
				5 : app.GetLocalePath() + "/ui/loading/loading5.sub",
				6 : app.GetLocalePath() + "/ui/loading/loading6.sub"
			}
		elif locale.IsCIBN10():
			imgFileNameDict = {
				0 : app.GetLocalePath() + "/ui/loading/loading0.jpg",
				1 : app.GetLocalePath() + "/ui/loading/loading1.jpg",
				2 : app.GetLocalePath() + "/ui/loading/loading2.jpg",
				3 : app.GetLocalePath() + "/ui/loading/loading3.jpg",
				4 : app.GetLocalePath() + "/ui/loading/loading4.jpg",
				5 : app.GetLocalePath() + "/ui/loading/loading5.jpg",
				6 : app.GetLocalePath() + "/ui/loading/loading6.jpg",
				7 : app.GetLocalePath() + "/ui/loading/loading7.jpg",
			}
		elif locale.IsYMIR() or locale.IsWE_KOREA() or locale.IsCANADA() or locale.IsBRAZIL() or locale.IsEUROPE() or locale.IsJAPAN():
			imgFileNameDict = {
				0 : uiScriptLocale.LOCALE_UISCRIPT_PATH + "loading/loading0.sub",
				1 : uiScriptLocale.LOCALE_UISCRIPT_PATH + "loading/loading1.sub",
				2 : uiScriptLocale.LOCALE_UISCRIPT_PATH + "loading/loading2.sub",
				3 : uiScriptLocale.LOCALE_UISCRIPT_PATH + "loading/loading3.sub",

			}
		elif constInfo.SUB2_LOADING_ENABLE:
			imgFileNameDict = {
				0 : "d:/ymir work/uiloading/background_loading_warrior.sub",
				1 : "d:/ymir work/uiloading/background_loading_assassin.sub",
				2 : "d:/ymir work/uiloading/background_loading_shaman.sub",
				3 : "d:/ymir work/uiloading/background_loading_sura.sub",
				4 : "d:/ymir work/uiloading/background_loading_assassin2.sub",
				5 : "d:/ymir work/uiloading/background_loading_sura2.sub",
				6 : "d:/ymir work/uiloading/background_loading_assassin3.sub",
				7 : "d:/ymir work/uiloading/background_loading_assassin3.sub",
			}
		else:
			imgFileNameDict = {
				0 : "d:/ymir work/ui/intro/pattern/background_loading_warrior.jpg",
				1 : "d:/ymir work/ui/intro/pattern/background_loading_assassin.jpg",
				2 : "d:/ymir work/ui/intro/pattern/background_loading_shaman.jpg",
			}

		try:
			imgFileName = imgFileNameDict[app.GetRandom(0, len(imgFileNameDict) - 1)]
			self.loadingImage.LoadImage(imgFileName)

		except:
			print "LoadingWindow.Open.LoadImage - %s File Load Error" % (imgFileName)
			self.loadingImage.Hide()


		width = float(wndMgr.GetScreenWidth()) / float(self.loadingImage.GetWidth())
		height = float(wndMgr.GetScreenHeight()) / float(self.loadingImage.GetHeight())

		self.loadingImage.SetScale(width, height)
		self.loadingGage.SetPercentage(2, 100)

		self.Show()

		chrSlot=self.stream.GetCharacterSlot()
		net.SendSelectCharacterPacket(chrSlot)

		app.SetFrameSkip(0)