#root/uiSystem.py: #1.) Search: def OnPressExitKey(self): self.Close() return TRUE #2.) Add after function: if app.ENABLE_GRAPHIC_MODE: ################################################################### # title_name : Features for graphic mode # date_created : 2017.01.04 # author : VegaS ################################################################### def IsActiveModeGraphic(self): idx = open("enbconvertor.ini", "r").readlines() if int(idx[1][-2]) > 0: return TRUE return FALSE def __ClickSystemModeButton(self): import dbg, os, app, localeInfo if self.IsActiveModeGraphic(): dam = 0 else: dam = 1 idxCurMode = "EnableProxyLibrary=%d" % (dam) f = [] getLine = 2 if os.path.exists("enbconvertor.ini"): idx = open("enbconvertor.ini", "r") for it in idx: f.append(it) idx.close() while len(f) < int(getLine): f.append("") f[int(getLine)-1] = str(idxCurMode) idx = open("enbconvertor.ini", "w") for it in f: idx.write(it) if (len(it) > 0 and it[-1:] != "\n") or len(it) == 0: idx.write("\n") idx.close() self.Close() if dam > 0: dbg.LogBox(localeInfo.GRAPHIC_MODE_ENABLE) else: dbg.LogBox(localeInfo.GRAPHIC_MODE_DISABLE) dbg.LogBox(localeInfo.GRAPHIC_MODE_RESTART) os.system('start metin2client.exe') ### Change with your name of application. app.Exit() #1.) Search: self.GetChild("exit_button").SAFE_SetEvent(self.__ClickExitButton) #2.) Add bellow: if app.ENABLE_GRAPHIC_MODE: self.GetChild("system_mode_button").SAFE_SetEvent(self.__ClickSystemModeButton) #locale/en/locale_game.txt: GRAPHIC_MODE_ENABLE [i] The graphic mode was enabled. GRAPHIC_MODE_DISABLE [i] The graphic mode was disabled. GRAPHIC_MODE_RESTART [i] Client will restart. #locale/en/ui/systemdialog.py { "name" : "system_mode_button", "type" : "button", "x" : 10, # Position X "y" : 5, # Position Y "text" : "Graphic Mode (Enable/Disable)", "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, //@Src/Client/UserInterface/Locale_inc.h #define ENABLE_GRAPHIC_MODE //@Src/Client/UserInterface/PythonApplicationModule.cpp //1.) Search: #ifdef ENABLE_COSTUME_SYSTEM PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM", 0); #endif //2.) Add bellow: #ifdef ENABLE_GRAPHIC_MODE PyModule_AddIntConstant(poModule, "ENABLE_GRAPHIC_MODE", 1); #else PyModule_AddIntConstant(poModule, "ENABLE_GRAPHIC_MODE", 0); #endif