# Root // uisystemoption.py açılır ve aratılır.

importa eklenir var ise eklemeyiniz.

import background


# Aratılır

		self.tilingModeButtonList = []

# Altına eklenir;

		self.texturesOptionButtonList = []

# Aratılır 

			self.tilingApplyButton=GetObject("tiling_apply")

# Altına eklenir;

			self.texturesOptionButtonList.append(GetObject("texture_classic"))
			self.texturesOptionButtonList.append(GetObject("texture_snow"))
			self.texturesOptionButtonList.append(GetObject("texture_desert"))
			self.texturesOptionButtonList.append(GetObject("texture_green"))

# Aratılır

		self.tilingModeButtonList[1].SAFE_SetEvent(self.__OnClickTilingModeGPUButton)

# Altına eklenir;

		self.texturesOptionButtonList[0].SAFE_SetEvent(self.__OnClickChangeTextureClassic)
		self.texturesOptionButtonList[1].SAFE_SetEvent(self.__OnClickChangeTextureSnow)
		self.texturesOptionButtonList[2].SAFE_SetEvent(self.__OnClickChangeTextureDesert)
		self.texturesOptionButtonList[3].SAFE_SetEvent(self.__OnClickChangeTextureGreen)

# Aratılır

	def OnCloseInputDialog(self):
		self.inputDialog.Close()
		self.inputDialog = None
		return True

# Üstüne eklenir;

	def __OnClickChangeTextureClassic(self):
		systemSetting.SetSnowTexturesMode(False)
		systemSetting.SetDesertTexturesMode(False)
		systemSetting.SetGreenTexturesMode(False)
		self.RefreshTextures()
		if background.GetCurrentMapName():
			classic_maps = [
				"metin2_map_a1",
				"metin2_map_b1",
				"metin2_map_c1"
			]
			classic_map_textures = {
				"metin2_map_a1" : "textureset\metin2_a1.txt",
				"metin2_map_b1" : "textureset\metin2_b1.txt",
				"metin2_map_c1" : "textureset\metin2_c1.txt", }
			if str(background.GetCurrentMapName()) in classic_maps:
				background.TextureChange(classic_map_textures[str(background.GetCurrentMapName())])

	def __OnClickChangeTextureSnow(self):
		systemSetting.SetSnowTexturesMode(True)
		systemSetting.SetDesertTexturesMode(False)
		systemSetting.SetGreenTexturesMode(False)
		self.RefreshTextures()
		if background.GetCurrentMapName():
			snow_maps = [
				"metin2_map_a1",
				"metin2_map_b1",
				"metin2_map_c1"
			]
			snow_maps_textures = {
				"metin2_map_a1" : "textureset\metin2_a1_snown.txt",
				"metin2_map_b1" : "textureset\metin2_b1_snown.txt",
				"metin2_map_c1" : "textureset\metin2_c1_snown.txt", }
			if str(background.GetCurrentMapName()) in snow_maps:
				background.TextureChange(snow_maps_textures[str(background.GetCurrentMapName())])

	def __OnClickChangeTextureDesert(self):
		systemSetting.SetSnowTexturesMode(False)
		systemSetting.SetDesertTexturesMode(True)
		systemSetting.SetGreenTexturesMode(False)
		self.RefreshTextures()
		if background.GetCurrentMapName():
			desert_maps = [
				"metin2_map_a1",
				"metin2_map_b1",
				"metin2_map_c1"
			]
			desert_maps_textures = {
				"metin2_map_a1" : "textureset\metin2_a1_desert.txt",
				"metin2_map_b1" : "textureset\metin2_b1_desert.txt",
				"metin2_map_c1" : "textureset\metin2_c1_desert.txt", }
			if str(background.GetCurrentMapName()) in desert_maps:
				background.TextureChange(desert_maps_textures[str(background.GetCurrentMapName())])		

	def __OnClickChangeTextureGreen(self):
		systemSetting.SetSnowTexturesMode(False)
		systemSetting.SetDesertTexturesMode(False)
		systemSetting.SetGreenTexturesMode(True)
		self.RefreshTextures()
		if background.GetCurrentMapName():
			green_maps = [
				"metin2_map_a1",
				"metin2_map_b1",
				"metin2_map_c1"
			]
			green_maps_textures = {
				"metin2_map_a1" : "textureset\metin2_a1_old.txt",
				"metin2_map_b1" : "textureset\metin2_b1_old.txt",
				"metin2_map_c1" : "textureset\metin2_c1_old.txt", }
			if str(background.GetCurrentMapName()) in green_maps:
				background.TextureChange(green_maps_textures[str(background.GetCurrentMapName())])		


	def RefreshTextures(self):
		if systemSetting.IsSnowTexturesMode():
			self.texturesOptionButtonList[0].SetUp()
			self.texturesOptionButtonList[1].Down()
			self.texturesOptionButtonList[2].SetUp()
			self.texturesOptionButtonList[3].SetUp()
		elif systemSetting.IsDesertTexturesMode():
			self.texturesOptionButtonList[0].SetUp()
			self.texturesOptionButtonList[1].SetUp()
			self.texturesOptionButtonList[2].Down()
			self.texturesOptionButtonList[3].SetUp()
		elif systemSetting.IsGreenTexturesMode():
			self.texturesOptionButtonList[0].SetUp()
			self.texturesOptionButtonList[1].SetUp()
			self.texturesOptionButtonList[2].SetUp()
			self.texturesOptionButtonList[3].Down()
		else:
			self.texturesOptionButtonList[0].Down()
			self.texturesOptionButtonList[1].SetUp()
			self.texturesOptionButtonList[2].SetUp()
			self.texturesOptionButtonList[3].SetUp()


# Root // game.py açılır ve aratılır

		self.currentCubeNPC = 0

# Altına eklenir;

		if systemSetting.IsSnowTexturesMode():
			if background.GetCurrentMapName():
				snow_maps = [
					"metin2_map_a1",
					"metin2_map_b1",
					"metin2_map_c1"
				]
				snow_maps_textures = {
					"metin2_map_a1" : "textureset\metin2_a1_snown.txt",
					"metin2_map_b1" : "textureset\metin2_b1_snown.txt",
					"metin2_map_c1" : "textureset\metin2_c1_snown.txt", }
				if str(background.GetCurrentMapName()) in snow_maps:
					background.TextureChange(snow_maps_textures[str(background.GetCurrentMapName())])
		if systemSetting.IsDesertTexturesMode():
			if background.GetCurrentMapName():
				snow_maps = [
					"metin2_map_a1",
					"metin2_map_b1",
					"metin2_map_c1"
				]
				snow_maps_textures = {
					"metin2_map_a1" : "textureset\metin2_a1_desert.txt",
					"metin2_map_b1" : "textureset\metin2_b1_desert.txt",
					"metin2_map_c1" : "textureset\metin2_c1_desert.txt", }
				if str(background.GetCurrentMapName()) in snow_maps:
					background.TextureChange(snow_maps_textures[str(background.GetCurrentMapName())])	
		if systemSetting.IsGreenTexturesMode():
			if background.GetCurrentMapName():
				snow_maps = [
					"metin2_map_a1",
					"metin2_map_b1",
					"metin2_map_c1"
				]
				snow_maps_textures = {
					"metin2_map_a1" : "textureset\metin2_a1_old.txt",
					"metin2_map_b1" : "textureset\metin2_b1_old.txt",
					"metin2_map_c1" : "textureset\metin2_c1_old.txt", }
				if str(background.GetCurrentMapName()) in snow_maps:
					background.TextureChange(snow_maps_textures[str(background.GetCurrentMapName())])


# uiscript // systemoptiondialog.py açılır ve aratılır


				{
					"name" : "tiling_apply",
					"type" : "button",

					"x" : 210,
					"y" : 242,

					"text" : uiScriptLocale.OPTION_TILING_APPLY,

					"default_image" : ROOT_PATH + "small_Button_01.sub",
					"over_image" : ROOT_PATH + "small_Button_02.sub",
					"down_image" : ROOT_PATH + "small_Button_03.sub",
				},

# Altına eklenir;
# Dipnot; Buraya düzgün eklemediğiniz taktirde sistem seçeneklerine bastığınızda oyun atıcaktır dikkat edelim :)
# Dipnot2; Koordinatları kendi pencerenize göre ayarlayınız.

				{
					"name" : "textures_mode",
					"type" : "text",

					"x" : 30,
					"y" : 347,

					"text" : "Zemin Stili",
				},
				
				{
					"name" : "texture_classic",
					"type" : "radio_button",

					"x" : 110,
					"y" : 332,

					"text" : "Orjinal",

					"default_image" : ROOT_PATH + "middle_Button_01.sub",
					"over_image" : ROOT_PATH + "middle_Button_02.sub",
					"down_image" : ROOT_PATH + "middle_Button_03.sub",
				},
				
				{
					"name" : "texture_snow",
					"type" : "radio_button",

					"x" : 110,
					"y" : 362,

					"text" : "Karlı",

					"default_image" : ROOT_PATH + "middle_Button_01.sub",
					"over_image" : ROOT_PATH + "middle_Button_02.sub",
					"down_image" : ROOT_PATH + "middle_Button_03.sub",
				},
				
				{
					"name" : "texture_desert",
					"type" : "radio_button",

					"x" : 110+70,
					"y" : 332,

					"text" : "Çöl",

					"default_image" : ROOT_PATH + "middle_Button_01.sub",
					"over_image" : ROOT_PATH + "middle_Button_02.sub",
					"down_image" : ROOT_PATH + "middle_Button_03.sub",
				},
				{
					"name" : "texture_green",
					"type" : "radio_button",

					"x" : 110+70,
					"y" : 362,

					"text" : "Eski",

					"default_image" : ROOT_PATH + "middle_Button_01.sub",
					"over_image" : ROOT_PATH + "middle_Button_02.sub",
					"down_image" : ROOT_PATH + "middle_Button_03.sub",
				},

# Verdiğim eix,epk dosyasınıda pack klasörü içine atın, ardından index'e 

*
forgiven_textures
* 

# şeklinde ekleyiniz, ekleyenlere şimdiden hayırlı olsun :)