Jump to content

Map Name Application Window


Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )

Nothing much, something quite simple but it gives it’s looks for those who are interested in details, so let’s start with it.

Here is a visual appearance of the application window.

 

https://metin2.download/picture/CLRymxi0nXJC1H47POwDJ4zBB2SgzOnt/.gif

Xd05cVt.gif

Sorry for the low quality GIF. Here is a bigger view,

https://metin2.download/picture/CLRymxi0nXJC1H47POwDJ4zBB2SgzOnt/.gif

 

UserInterface/Locale_inc.h

Spoiler


/// 1.
// Add
#define ENABLE_MAP_LOCATION_APP_NAME // Enable map location on the app name

 

UserInterface/PythonApplicationModule.cpp

Spoiler


/// 1.
// Search
PyObject* appLoop(PyObject* poSelf, PyObject* poArgs)

// Add above
#if defined(ENABLE_MAP_LOCATION_APP_NAME)
PyObject* appSetText(PyObject* poSelf, PyObject* poArgs)
{
	char* szName;
	if (!PyTuple_GetString(poArgs, 0, &szName))
		return Py_BuildException();

	CPythonApplication& rkApp = CPythonApplication::Instance();
	rkApp.SetText(szName);
	return Py_BuildNone();
}
#endif

/// 2.
// Search
		{ "Loop", appLoop, METH_VARARGS },

// Add above
#if defined(ENABLE_MAP_LOCATION_APP_NAME)
		{ "SetText", appSetText, METH_VARARGS },
#endif

/// 3.
// Search
	PyModule_AddIntConstant(poModule, "CAMERA_STOP", CPythonApplication::CAMERA_STOP);

// Add below
#if defined(ENABLE_MAP_LOCATION_APP_NAME)
	PyModule_AddIntConstant(poModule, "ENABLE_MAP_LOCATION_APP_NAME", 1);
#else
	PyModule_AddIntConstant(poModule, "ENABLE_MAP_LOCATION_APP_NAME", 0);
#endif

 

UserInterface/PythonNetworkStream.cpp

Spoiler


/// 1.
// Search @ bool CPythonNetworkStream::RecvPhasePacket
	case PHASE_GAME: // °ÔÀÓ È­¸é
		SetGamePhase();

// Add below
#if defined(ENABLE_MAP_LOCATION_APP_NAME)
		PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "SetApplicationText", Py_BuildValue("()"));
#endif

 

Client/root/game.py

Spoiler


''' 1. '''
# Search
	# Start
	def StartGame(self):
		self.RefreshInventory()
		self.RefreshEquipment()
		self.RefreshCharacter()
		self.RefreshSkill()

# Add above
	if app.ENABLE_MAP_LOCATION_APP_NAME:
		def SetApplicationText(self):
			mapName = background.GetCurrentMapName()
			if mapName in localeInfo.MINIMAP_ZONE_NAME_DICT:
				app.SetText(localeInfo.APP_TITLE + " - " + localeInfo.MINIMAP_ZONE_NAME_DICT[mapName])

 

 

 

 

 

 

 

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 28
  • Think 1
  • Confused 1
  • Good 3
  • Love 1
  • Love 23
Link to comment
Share on other sites

  • 3 years later...
  • 5 weeks later...

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.