Problem Displaying UMMU data in HUD

Kubala95

New member
Joined
Jan 30, 2011
Messages
22
Reaction score
0
Points
1
Hi, I'm writing module for Cassiopee station (this French addon, it's oryginal based on SC3). I'm working on UMMU support and I want extend HUD by adding crew list. My clbkDrawHUD method look that:

Code:
bool Cassiopee::clbkDrawHUD (int mode, const HUDPAINTSPEC* hps, oapi::Sketchpad* skp)
{
	switch(hudmode)
	{
	case DEFAULT:
		// draw the default HUD
		return true;
	case UMMU:
		// UMmu display messages
		skp->Text(5, hps->H/60*15, cUmmuHudDisplay, strlen(cUmmuHudDisplay));

		const char space[] =  {32}; // Space :)
		const char empty[] = "-- Empty slot --"; // Text on list, when no astronaut in slot
		for(int slot = 1; slot <= 4; ++slot)
		{
			if(Crew.GetCrewMiscIdBySlotNumber(slot) != NULL)
			{
				skp->Text(hps->W/60*40, hps->H/60*13+60*slot, Crew.GetCrewMiscIdBySlotNumber(slot), strlen( Crew.GetCrewMiscIdBySlotNumber(slot) ));
				skp->Text(hps->W/60*45, hps->H/60*13+60*slot, space, strlen(space));
				skp->Text(hps->W/60*46, hps->H/60*13+60*slot, Crew.GetCrewNameBySlotNumber(slot), strlen( Crew.GetCrewNameBySlotNumber(slot) ));
			}
			else skp->Text(hps->W/60*40, hps->H/60*13-60*slot, empty, strlen(empty));
		}
		return true;
	}
}

It compile OK, but in Orbiter list's lines are identical oddly chars. Please help and thanks.

PS. Sorry for my English, but look under my nick :)
 
Last edited:
Top