Fethi Polat 1
Fethi Polat
kralhakan2009 1
kralhakan2009
Vahsi Uzman 1
Vahsi Uzman
Best Studio 1
Best Studio
Agora Metin2 1
Agora Metin2
raderde 1
raderde
Cannn6161 1
Cannn6161
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Mt2Hizmet 1
Mt2Hizmet
melankolıa18 1
melankolıa18
Hikaye Ekle
Reklam vermek için turkmmo@gmail.com
Kaynak ikonu

Altın Konu [C++/PY] Auto-Hide-Window 2022-03-16

indirmek için izniniz yok
5.00 yıldız(lar) 3 Değerlendirme Değerlendirenler

ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!

Is there any possibility to save the setting in the metin2.cfg file so the option remains saved when you re-open the client?
 
Is there any possibility to save the setting in the metin2.cfg file so the option remains saved when you re-open the client?
You have to connect the settings with another client file, for example metin2.cfg and make the system read them from there, then you will always have them saved. Try to use source, there is a tutorial for fog setting ~ on/off type and adapt it to your needs.
 
You have to connect the settings with another client file, for example Metin2.cfg and make the system read them from there, then you will always have them saved. Try to use source, there is a tutorial for fog setting ~ on/off type and adapt it to your needs.
I solved. @EmreAkca06AnK y ou can update the github with this update:
PythonSystem.cpp search:
m_Config.bShowSalesText = true;
Add:
m_Config.bGUIMode = true;
Search:
void CPythonSystem::SetShowSalesTextFlag(int iFlag)
{
m_Config.bShowSalesText = iFlag == 1 ? true : false;
}

Add:
void CPythonSystem::SetGUIMode(int iFlag)
{
m_Config.bGUIMode = iFlag == 1 ? true : false;
}

bool CPythonSystem::IsGUIMode()
{
return m_Config.bGUIMode;
}

Search:
else if (!stricmp(command, "SHOW_MONEY_TEXT"))
m_Config.bShowMoneyText = atoi(value) == 1 ? true : false;
Add:
else if (!stricmp(command, "GUI_MODE_ON"))
m_Config.bGUIMode = atoi(value) == 1 ? true : false;

Search:
if (m_Config.bShowSalesText == 0)
fprintf(fp, "SHOW_SALESTTEXT %d\n", m_Config.bShowSalesText);

Add:
fprintf(fp, "GUI_MODE_ON %d\n", m_Config.bGUIMode);

Open PythonSystem.h and search:
bool bShowMoneyText;
Add:
bool bGUIMode;

Sarch:
void SetShowSalesTextFlag(int iFlag);
Add:
void SetGUIMode(int iFlag);
bool IsGUIMode();

Open PythonSystemModule.cpp and search:
PyObject * systemSetShadowLevel(PyObject * poSelf, PyObject * poArgs)
{
int level;

if (!PyTuple_GetInteger(poArgs, 0, &level))
return Py_BuildException();

if (level > 0)
CPythonSystem::Instance().SetShadowLevel(level);

return Py_BuildNone();
}
Add:
PyObject* systemSetGUIMode(PyObject* poSelf, PyObject* poArgs)
{
int iFlag;
if (!PyTuple_GetInteger(poArgs, 0, &iFlag))
return Py_BuildException();

CPythonSystem::Instance().SetGUIMode(iFlag);

return Py_BuildNone();
}

PyObject* systemIsGUIMode(PyObject* poSelf, PyObject* poArgs)
{
return Py_BuildValue("i", CPythonSystem::Instance().IsGUIMode());
}
Search:
{ "GetShadowLevel", systemGetShadowLevel, METH_VAARGS },
{ "SetShadowLevel", systemSetShadowLevel, METH_VAARGS },
Add:
{ "SetGUIMode", systemSetGUIMode, METH_VAARGS },
{ "IsGUIMode", systemIsGUIMode, METH_VAARRGS },

Compile binary and open interfacemodule.py, search for x2:
constInfo.AUTO_HIDE_OPTION == False:
replace both with:
systemSetting.IsGUIMode()

Open uisystemoption.py and search for(in class OptionDialog):
Add after:
self.RefreshGUIMode()

search for
def __OnClickAutoHideModeOnButton
and
def __OnClickAutoHideModeOffButton
replace these 2 defs with:
def __OnClickAutoHideModeOnButton(self):
systemSetting.SetGUIMode(True)
self.RefreshGUIMode()

def __OnClickAutoHideModeOffButton(self):
systemSetting.SetGUIMode(False)
self.RefreshGUIMode()

def RefreshGUIMode(self):
if systemSetting.IsGUIMode():
self.autoHideModeButtonList[0].Down()
self.autoHideModeButtonList[1].SetUp()
else:
self.autoHideModeButtonList[0].SetUp()
self.autoHideModeButtonList[1].Down()

Search for:
if app.__BL_WINDOW_AUTO_HIDE__:
self.autoHideModeButtonList[0].SAFE_SetEvent(self.__OnClickAutoHideModeOnButton)
self.autoHideModeButtonList[1].SAFE_SetEvent(self.__OnClickAutoHideModeOffButton)
self.__ClickRadioButton(self.autoHideModeButtonList, 1)
Replace with:
if app.__BL_WINDOW_AUTO_HIDE__:
self.autoHideModeButtonList[0].SAFE_SetEvent(self.__OnClickAutoHideModeOnButton)
self.autoHideModeButtonList[1].SAFE_SetEvent(self.__OnClickAutoHideModeOffButton)

And done. :tongue: Now the setting will be saved in metin2.cfg and it will save after re-opening the client.
 
I solved. @EmreAkca06AnK y ou can update the github with this update:
PythonSystem.cpp search:

Add:

Search:


Add:


Search:

Add:


Search:


Add:


Open PythonSystem.h and search:

Add:


Sarch:

Add:


Open PythonSystemModule.cpp and search:

Add:

Search:

Add:


Compile binary and open interfacemodule.py, search for x2:

replace both with:


Open uisystemoption.py and search for(in class OptionDialog):

Add after:


search for

and

replace these 2 defs with:


Search for:

Replace with:


And done. :tongue: Now the setting will be saved in metin2.cfg and it will save after re-opening the client.
I will add after checking :) good luck to your hands
 
Eline Sağlık Güzel bir Sisteme Benziyor.
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst