Tutorial insert shadow control in the client

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

4peppe

New member
Joined
Feb 18, 2021
Messages
26
Credits
7

Open root/uiSystemOption.py
Search self.tilingModeButtonList = []
Add self.ctrlShadowQuality = 0

Search self.tilingApplyButton=GetObject("tiling_apply")
Add self.ctrlShadowQuality = GetObject("shadow_bar")

Search self.ctrlSoundVolume.SetEvent(ui.__mem_func__(self.OnChangeSoundVolume))
Add self.ctrlShadowQuality.SetSliderPos(float(systemSetting.GetShadowLevel()) / 5.0)
and self.ctrlShadowQuality.SetEvent(ui.__mem_func__(self.OnChangeShadowQuality))

Search def OnChangeSoundVolume(self):

pos = self.ctrlSoundVolume.GetSliderPos()
snd.SetSoundVolumef(pos)

systemSetting.SetSoundVolumef(pos)
Add def OnChangeShadowQuality(self):
pos = self.ctrlShadowQuality.GetSliderPos()

systemSetting.SetShadowLevel(int(pos / 0.2))

Open uiscript/SystemOptionDialog.py
Search
{
"name" : "tiling_apply",
"type" : "button",


"x" : 90+100,
"y" : 185,


"text" : uiScriptLocale.OPTION_TILING_APPLY,


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

},
Add

{
"name" : "shadow_mode",
"type" : "text",


"x" : 30,
"y" : 210,


"text" : uiScriptLocale.OPTION_SHADOW,
},

{
"name" : "shadow_bar",
"type" : "sliderbar",


"x" : 110,
"y" : 210,

},

Open \locale_xx\locale\xx\locale_interface.txt
Add OPTION_SHADOW Shadow (or what you want)

Source: metin2.dev
 
Back
Top