View Full Version : Print from SDK


Lord Olleus
Aug 31, 2006, 04:22 AM
Is there a way to print something on the screen through the sdk?
Something like CyInterface.addImmediateMessage() but for the SDK. It would really help in debugging.

Lord Olleus
Aug 31, 2006, 06:39 AM
After some searching I have found a solution.
You can use:

MessageBox(const TCHAR* szText, const TCHAR* szCaption) to make a popup appear.

or you can use:

messageControlLog(char* s) to write something in Civ 4/logs/MPLog.txt

However, I still can't find a way to write directly into onto the screen.

Dale
Aug 31, 2006, 06:49 AM
LO:

Straight from my MAD mod, printing on screen using the SDK (prints into the log area):


szBuffer = gDLL->getText("MAD Targets: %d1 incoming / %d2 outgoing", getDCMIncoming(), getDCMOutgoing());
gDLL->getInterfaceIFace()->addMessage(getID(), true, GC.getDefineINT("EVENT_MESSAGE_TIME"), szBuffer, "AS2D_NUKE_EXPLODES", MESSAGE_TYPE_INFO, NULL, (ColorTypes)GC.getInfoTypeForString("COLOR_WHITE"), NULL, NULL, true, true);


Hope this helps. :)

Dale

Lord Olleus
Aug 31, 2006, 07:59 AM
Thanks Dale!