Jump to content
  • We need you!

    You must register to discover all the features of our community!

Map name on the application window


Recommended Posts

  • VIP

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://i.gyazo.com/e48ad3ce390849d32da0840c206e67da.mp4

Xd05cVt.gif

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

https://i.gyazo.com/e48ad3ce390849d32da0840c206e67da.mp4

 

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])

 

 

 

 

 

 

 

 

 

  • Love 9
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.