MapName in RoomList

Socius Decennalis
Decennium
Joined
Jul 2, 2011
Messages
78
Reaction score
21
Hello.

ZRoomListBox.cpp

Find
Code:
		// 방 이름
		pDC->SetFont( MFontManager::Get("FONTc8b") );
 		r.x = width + m_RoomWidth*0.12 + pressed_reposition;
 		r.y = height /*+ m_RoomHeight*0.3*/ + pressed_reposition;
  		r.w = m_RoomWidth*0.75;
		r.h = m_RoomHeight/**0.85*/;
 		
		MFont * pFont  = pDC->GetFont();
		char szBufTemp[SMI_MAPNAME_LENGTH];
		int strLength = 0;
		int RoomWidth = pFont->GetWidth(m_pMapInfo[i].room_name);
		if( RoomWidth > m_RoomWidth*0.7 )
		{
			while( strLength < 29 )
			{
				if( m_pMapInfo[i].map_name[strLength] == '0' ) // 이름의 끝
					strcpy( szBufTemp, m_pMapInfo[i].room_name );
				if( ((unsigned char)m_pMapInfo[i].room_name[strLength]) > 127 )
					strLength += 2;
				else
					++strLength;
			}
			strncpy( szBufTemp, m_pMapInfo[i].room_name, strLength*sizeof(char) );
			szBufTemp[strLength] = '\0';
			strcat( szBufTemp, "..."	);

			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), szBufTemp, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, szBufTemp, MAM_LEFT );
		}
		else
		{
			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), m_pMapInfo[i].room_name, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, m_pMapInfo[i].room_name, MAM_LEFT );
		}

And replace to
Code:
		// 방 이름
		pDC->SetFont( MFontManager::Get("FONTc8b") );
 		r.x = width + m_RoomWidth*0.12 + pressed_reposition;
 		r.y = height - m_RoomHeight*0.15 + pressed_reposition;
  		r.w = m_RoomWidth*0.75;
		r.h = m_RoomHeight/**0.85*/;
 		
		MFont * pFont  = pDC->GetFont();
		char szBufTemp[SMI_MAPNAME_LENGTH];
		int strLength = 0;
		int RoomWidth = pFont->GetWidth(m_pMapInfo[i].room_name);
		if( RoomWidth > m_RoomWidth*0.7 )
		{
			while( strLength < 29 )
			{
				if( m_pMapInfo[i].map_name[strLength] == '0' ) // 이름의 끝
					strcpy( szBufTemp, m_pMapInfo[i].room_name );
				if( ((unsigned char)m_pMapInfo[i].room_name[strLength]) > 127 )
					strLength += 2;
				else
					++strLength;
			}
			strncpy( szBufTemp, m_pMapInfo[i].room_name, strLength*sizeof(char) );
			szBufTemp[strLength] = '\0';
			strcat( szBufTemp, "..."	);

			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), szBufTemp, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, szBufTemp, MAM_LEFT );
		}
		else
		{
			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), m_pMapInfo[i].room_name, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, m_pMapInfo[i].room_name, MAM_LEFT );
		}


	
		// 방 맵 이름
		pDC->SetFont( MFontManager::Get("FONTc8b") );
 		r.x = width + m_RoomWidth*0.12 + pressed_reposition;
 		r.y = height + m_RoomHeight*0.2 + pressed_reposition;
  		r.w = m_RoomWidth*0.75;
		r.h = m_RoomHeight/**0.85*/;
 		
		int RoomWidth1 = pFont->GetWidth(m_pMapInfo[i].map_name);
		if( RoomWidth1 > m_RoomWidth*0.7 )
		{
			while( strLength < 29 )
			{
				if( m_pMapInfo[i].map_name[strLength] == '0' ) // 이름의 끝
					strcpy( szBufTemp, m_pMapInfo[i].map_name );
				if( ((unsigned char)m_pMapInfo[i].map_name[strLength]) > 127 )
					strLength += 2;
				else
					++strLength;
			}
			strncpy( szBufTemp, m_pMapInfo[i].map_name, strLength*sizeof(char) );
			szBufTemp[strLength] = '\0';
			strcat( szBufTemp, "..."	);

			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), szBufTemp, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, szBufTemp, MAM_LEFT );
		}
		else
		{
			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), m_pMapInfo[i].map_name, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, m_pMapInfo[i].map_name, MAM_LEFT );
		}
 

Attachments

  • 1 - MapName in RoomList - RaGEZONE Forums
    1.webp
    28 KB · Views: 884
Hello.

ZRoomListBox.cpp

Find
Code:
		// 방 이름
		pDC->SetFont( MFontManager::Get("FONTc8b") );
 		r.x = width + m_RoomWidth*0.12 + pressed_reposition;
 		r.y = height /*+ m_RoomHeight*0.3*/ + pressed_reposition;
  		r.w = m_RoomWidth*0.75;
		r.h = m_RoomHeight/**0.85*/;
 		
		MFont * pFont  = pDC->GetFont();
		char szBufTemp[SMI_MAPNAME_LENGTH];
		int strLength = 0;
		int RoomWidth = pFont->GetWidth(m_pMapInfo[i].room_name);
		if( RoomWidth > m_RoomWidth*0.7 )
		{
			while( strLength < 29 )
			{
				if( m_pMapInfo[i].map_name[strLength] == '0' ) // 이름의 끝
					strcpy( szBufTemp, m_pMapInfo[i].room_name );
				if( ((unsigned char)m_pMapInfo[i].room_name[strLength]) > 127 )
					strLength += 2;
				else
					++strLength;
			}
			strncpy( szBufTemp, m_pMapInfo[i].room_name, strLength*sizeof(char) );
			szBufTemp[strLength] = '\0';
			strcat( szBufTemp, "..."	);

			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), szBufTemp, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, szBufTemp, MAM_LEFT );
		}
		else
		{
			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), m_pMapInfo[i].room_name, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, m_pMapInfo[i].room_name, MAM_LEFT );
		}

And replace to
Code:
		// 방 이름
		pDC->SetFont( MFontManager::Get("FONTc8b") );
 		r.x = width + m_RoomWidth*0.12 + pressed_reposition;
 		r.y = height - m_RoomHeight*0.15 + pressed_reposition;
  		r.w = m_RoomWidth*0.75;
		r.h = m_RoomHeight/**0.85*/;
 		
		MFont * pFont  = pDC->GetFont();
		char szBufTemp[SMI_MAPNAME_LENGTH];
		int strLength = 0;
		int RoomWidth = pFont->GetWidth(m_pMapInfo[i].room_name);
		if( RoomWidth > m_RoomWidth*0.7 )
		{
			while( strLength < 29 )
			{
				if( m_pMapInfo[i].map_name[strLength] == '0' ) // 이름의 끝
					strcpy( szBufTemp, m_pMapInfo[i].room_name );
				if( ((unsigned char)m_pMapInfo[i].room_name[strLength]) > 127 )
					strLength += 2;
				else
					++strLength;
			}
			strncpy( szBufTemp, m_pMapInfo[i].room_name, strLength*sizeof(char) );
			szBufTemp[strLength] = '\0';
			strcat( szBufTemp, "..."	);

			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), szBufTemp, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, szBufTemp, MAM_LEFT );
		}
		else
		{
			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), m_pMapInfo[i].room_name, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, m_pMapInfo[i].room_name, MAM_LEFT );
		}


	
		// 방 맵 이름
		pDC->SetFont( MFontManager::Get("FONTc8b") );
 		r.x = width + m_RoomWidth*0.12 + pressed_reposition;
 		r.y = height + m_RoomHeight*0.2 + pressed_reposition;
  		r.w = m_RoomWidth*0.75;
		r.h = m_RoomHeight/**0.85*/;
 		
		int RoomWidth1 = pFont->GetWidth(m_pMapInfo[i].map_name);
		if( RoomWidth1 > m_RoomWidth*0.7 )
		{
			while( strLength < 29 )
			{
				if( m_pMapInfo[i].map_name[strLength] == '0' ) // 이름의 끝
					strcpy( szBufTemp, m_pMapInfo[i].map_name );
				if( ((unsigned char)m_pMapInfo[i].map_name[strLength]) > 127 )
					strLength += 2;
				else
					++strLength;
			}
			strncpy( szBufTemp, m_pMapInfo[i].map_name, strLength*sizeof(char) );
			szBufTemp[strLength] = '\0';
			strcat( szBufTemp, "..."	);

			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), szBufTemp, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, szBufTemp, MAM_LEFT );
		}
		else
		{
			pDC->SetColor( 0,0,0);
			pDC->Text( MRECT( r.x+1, r.y+1, r.w, r.h), m_pMapInfo[i].map_name, MAM_LEFT);
			if(  m_pMapInfo[i].roomState == GMAE_CLOSED || bRoomFull )
				pDC->SetColor( 115,146,173 );
			else
				pDC->SetColor( 255, 255, 255 );
			pDC->Text(r, m_pMapInfo[i].map_name, MAM_LEFT );
		}

Good Job Bro :)
 
its not that perfect cuz its only the meint maps, skillmaps or somting like that not work.

DogGunz_20140325_224421 - MapName in RoomList - RaGEZONE Forums DogGunz_20140325_224439 - MapName in RoomList - RaGEZONE Forums

I think it works well
 
Back