[Src]->New Colors For Noticement Window

Codes submitted by developers and people of outpost. Come here to get codes for your client sources.
Post Reply
diuuude
Outpost bitch
Posts: 592
Joined: Wed Dec 28, 2005 11:57 pm

Post by diuuude »

This code will add some new colors that can be displayed in the noticement window. If you already tried to find some new colors adding special char at the beginning of each line of your noticement, you should have noticed that only Black, White and Dark Blue colors were available.

Now you'll have 9 nice colors added, with some new special characters used.


<span style='color:red'>In Game.cpp</span>

in function DrawDialogBox_Text

Find :

Code: Select all

	for &#40;i = 0; i < 17; i++&#41;
	if &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93; != NULL&#41; &#123;
 &nbsp;if &#40;m_bDialogTrans == FALSE&#41; &#123; // v2.173
 &nbsp;	switch &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg&#91;0&#93;&#41; &#123;
 &nbsp;	case '_'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 255,255,255&#41;; break;
 &nbsp;	case ';'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 4, 0, 50&#41;; break;
 &nbsp;	default&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg, 45,25,25&#41;; break;
 &nbsp;	&#125;
 &nbsp;&#125;
 &nbsp;else PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg, 0,0,0&#41;;
	&#125;
Replace it with :

Code: Select all

	for &#40;i = 0; i < 17; i++&#41;
	if &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93; != NULL&#41; &#123;
 &nbsp;if &#40;m_bDialogTrans == FALSE&#41; &#123; // v2.173
 &nbsp;	switch &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg&#91;0&#93;&#41; &#123;
 &nbsp;	// White
 &nbsp;	case '_'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 255,255,255&#41;; break;
 &nbsp;	// Dark Blue
 &nbsp;	case ';'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 4, 0, 50&#41;; break;
 &nbsp;	// Red
 &nbsp;	case '&#58;'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 255, 0, 0&#41;; break;
 &nbsp;	// Yellow
 &nbsp;	case '/'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 250, 250, 0&#41;; break;
 &nbsp;	// Lime
 &nbsp;	case '£'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 0, 255, 0&#41;; break;
 &nbsp;	// Green
 &nbsp;	case '#'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 0, 200, 0&#41;; break;
 &nbsp;	// Blue
 &nbsp;	case '!'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 0, 0, 255&#41;; break;
 &nbsp;	// Magenta
 &nbsp;	case '?'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 255, 0, 255&#41;; break;
 &nbsp;	// Pink
 &nbsp;	case ','&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 255, 155, 255&#41;; break;
 &nbsp;	// Gray
 &nbsp;	case '&#036;'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 155, 155, 155&#41;; break;
 &nbsp;	// Orange
 &nbsp;	case '^'&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, &#40;m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg+1&#41;, 255, 205, 0&#41;; break;
 &nbsp;	// Default Color
 &nbsp;	default&#58; PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg, 45,25,25&#41;; break;
 &nbsp;	&#125;
 &nbsp;&#125;
 &nbsp;else PutAlignedString&#40;sX +24, sX +236, sY + 50 +i*13, m_pMsgTextList&#91;i + m_stDialogBoxInfo&#91;18&#93;.sView&#93;->m_pMsg, 0,0,0&#41;;
	&#125;
<a href='http://www.technohell.net' target='_blank'><b><span style='color:red'>>>> Helbreath Ressources Website Here <<<</span></b></a><br>C++ Sources, Tools, Server Files, Help on Forum, C++ Snippets, Toplist... Updated often, come visit us !
Jensen
Loyal fan
Posts: 300
Joined: Tue Aug 02, 2005 7:40 am
Location: Illinois, USA
Contact:

Post by Jensen »

neat, i didnt even know about the symbols -> colors in the noticement's existance
-><-
Drajwer
&lt;3 bd long time
Posts: 841
Joined: Fri Dec 10, 2004 3:24 pm

Post by Drajwer »

thanks, i was looking for that.
<img src='http://img440.imageshack.us/img440/2627/15pt.jpg' border='0' alt='user posted image' /><br><br>HBPolska characters:<br><br>Hellios 150+ Aresden Hero Mage<br>TheBill 120 Aresden plrider<br>Kill_Me 100 Full-Hero plrider<br>Rockeater 110+ Aresden Plate Mage<br><br><a href='http://www.helbreath.org' target='_blank'>http://www.helbreath.org</a> come and play (250 ppl online)
Post Reply