コード例 #1
0
void CMissionHighscoresView::DrawCategories(TPoint& aLocation)
{
	iGraphicsFont->SetFont(iFontForHighscoresCategories);
	TInt lFontHeight = iFontForHighscoresCategories.HeightAndDescentOfFont.GetIntInBaseInt();
	TPoint lTempLocation = aLocation;

	DrawCenteredString(lTempLocation, iFontForHighscoresCategories, iStringRank, 100, lFontHeight);
	lTempLocation.iX += 100;
	DrawCenteredString(lTempLocation, iFontForHighscoresCategories, iStringName, 260, lFontHeight);
	lTempLocation.iX += 260;
	DrawCenteredString(lTempLocation, iFontForHighscoresCategories, iStringScore, 180, lFontHeight);
	lTempLocation.iX += 180;
	DrawCenteredString(lTempLocation, iFontForHighscoresCategories, iStringTime, 180, lFontHeight);
	lTempLocation.iX += 180;
	DrawCenteredString(lTempLocation, iFontForHighscoresCategories, iStringDate, 150, lFontHeight);
	lTempLocation.iX += 150;

	aLocation.iY -= lFontHeight;
}
コード例 #2
0
void CMissionHighscoresView::ChildViewDrawMethod()
{
	iGraphicsEngine->SetClearColour(KColourBlack);
	iGraphicsEngine->ClearScreen();

	//Background for Stats
	iDescriptionBackgroundTexture->DrawArrays();

	//draw Highscores
	iGraphicsFont->SetColour(KColourBlack);

	TPoint lTableLocation (70, 340 + iTableYOffset);
	DrawCategories(lTableLocation);
	DrawRow(lTableLocation, iMission->HighscoreTable.Rank1, 1);
	DrawRow(lTableLocation, iMission->HighscoreTable.Rank2, 2);
	DrawRow(lTableLocation, iMission->HighscoreTable.Rank3, 3);
	DrawRow(lTableLocation, iMission->HighscoreTable.Rank4, 4);
	DrawRow(lTableLocation, iMission->HighscoreTable.Rank5, 5);
	DrawRow(lTableLocation, iMission->HighscoreTable.Rank6, 6);
	DrawRow(lTableLocation, iMission->HighscoreTable.Rank7, 7);
	DrawRow(lTableLocation, iMission->HighscoreTable.Rank8, 8);
	DrawRow(lTableLocation, iMission->HighscoreTable.Rank9, 9);
	DrawRow(lTableLocation, iMission->HighscoreTable.Rank10, 10);


	//draw Background Texture
	iBackgroundTexture->DrawArrays();

	//draw Mission Status
	iGraphicsFont->SetFont(iFontForTitle);
	iGraphicsFont->SetColour(KColourDarkRed);
	DrawCenteredString(TPoint(0,610), iFontForTitle, iStringTitle, 1024, 50);

	//draw Mission Name
	iGraphicsFont->SetFont(iFontForMissionName);
	iGraphicsFont->SetColour(KColourDarkRed);
	DrawCenteredString(TPoint(200,420), iFontForMissionName, iStringMissionName, 625, 40);

	//draw Controls
	iButtonBack->Draw();
	iScrollBar->Draw();
	iTouchSurface->Draw();
}
コード例 #3
0
void CMissionHighscoresView::DrawRow(TPoint& aLocation, const SMissionHighscoreTableEntry& aEntry, TInt aRankNumber)
{
	iGraphicsFont->SetFont(iFontForHighscoresRows);
	TInt lFontHeight = iFontForHighscoresRows.HeightAndDescentOfFont.GetIntInBaseInt();
	TPoint lTempLocation = aLocation;
	CString* lStringRank = (new CString(""))->AppendNum(aRankNumber);

	DrawCenteredString(lTempLocation, iFontForHighscoresRows, lStringRank, 100, lFontHeight);
	lTempLocation.iX += 100;
	DrawCenteredString(lTempLocation, iFontForHighscoresRows, aEntry.PlayerName, 260, lFontHeight);
	lTempLocation.iX += 260;
	DrawCenteredString(lTempLocation, iFontForHighscoresRows, aEntry.Score, 180, lFontHeight);
	lTempLocation.iX += 180;
	DrawCenteredString(lTempLocation, iFontForHighscoresRows, aEntry.Time, 180, lFontHeight);
	lTempLocation.iX += 180;
	DrawCenteredString(lTempLocation, iFontForHighscoresRows, aEntry.Date, 150, lFontHeight);
	lTempLocation.iX += 150;

	aLocation.iY -= lFontHeight;
	delete lStringRank;
}
コード例 #4
0
ファイル: main_form.c プロジェクト: kjk/noah-palm
static void MainFormDisplayAbout(AppContext* appContext)
{
    UInt16 currentY=0;
    WinPushDrawState();
    SetGlobalBackColor(appContext);
    ClearRectangle(0, currentY, appContext->screenWidth, appContext->screenHeight - currentY - FRM_RSV_H - 1);
    HideScrollbar();
    
    currentY+=7;
    FntSetFont(largeFont);
    DrawCenteredString(appContext, "ArsLexis iNoah", currentY);
    currentY+=16;


#ifdef INTERNAL_BUILD
    DrawCenteredString(appContext, "Ver 1.1 (internal)", currentY);
#else
 #ifdef DEBUG
    DrawCenteredString(appContext, "Ver 1.1 (debug)", currentY);
 #else
    DrawCenteredString(appContext, "Ver 1.1", currentY);
 #endif // DEBUG
#endif // INTERNAL_BUILD

    currentY+=20;
    
    FntSetFont(boldFont);
    DrawCenteredString(appContext, "Copyright \251 ArsLexis", currentY);
    currentY+=24;

    FntSetFont(largeFont);
    DrawCenteredString(appContext, "http://www.arslexis.com", currentY);
    currentY+=24;

    FntSetFont(stdFont);
#ifdef UNLOCKED
    DrawCenteredString(appContext, "Registered PalmSource version", currentY);
#else
    if (0==StrLen(appContext->prefs.regCode))
    {
        DrawCenteredString(appContext, "Unregistered", currentY);
        currentY+=14;
#ifdef  DEMO_HANDANGO
        DrawCenteredString(appContext, "Buy at: www.handango.com/purchase", currentY);
        currentY+=14;
        DrawCenteredString(appContext, "        Product ID: 101763", currentY);
#else
  #ifdef DEMO_PALMGEAR
        DrawCenteredString(appContext, "Buy at: www.palmgear.com?53831", currentY);
  #else
        DrawCenteredString(appContext, "Buy at: www.arslexis.com/buy.html", currentY);
  #endif
#endif
    }
    else
    {
        DrawCenteredString(appContext, "Registered version", currentY);
    }
#endif  // UNLOCKED
    WinPopDrawState();
}
コード例 #5
0
void CCampaignScreen::ChildViewDrawMethod()
{
	iGraphicsEngine->SetClearColour(KColourBlack);
	iGraphicsEngine->ClearScreen();

	//draw Background for Campaign Boxes
	iSelectionBackgroundTexture->DrawArrays();

	//------------- Draw Mission Boxes ----------------//
	TPoint lBoxLocation (112, 467 + iYOffsetValue); //want some space from the top as well
	lBoxLocation.iY -= 200; //need to make space for the first box
	lBoxLocation.iY -= 20; //some space between start

	//draw Briefing Screen
	if(iCampaign->CampaignBriefingScreen.Enabled)
	{
		//draw box
		iMissionBox->SetNewLowerLeftCoordinate(TPointIntFloat(TIntFloat::Convert(lBoxLocation.iX), TIntFloat::Convert(lBoxLocation.iY)));
		iMissionBox->DrawArrays();

		//draw campaign image
		iBriefingImage->SetNewLowerLeftCoordinate(TPointIntFloat(TIntFloat::Convert(lBoxLocation.iX), TIntFloat::Convert(lBoxLocation.iY)));
		iBriefingImage->AssignTexture(&iImageStore->GetImage(iCampaign->CampaignBriefingScreen.SmallMapImage));
		iBriefingImage->DrawArrays();

		//check if not unlocked
		if(!iCampaign->CampaignBriefingScreen.Unlocked)
		{
			iGraphicsFont->SetFont(iFontLocked);
			iGraphicsFont->SetColour(KColourRed);
			DrawCenteredString(TPoint(lBoxLocation.iX, lBoxLocation.iY), iFontLocked, iStringLocked, 610, 160);
		}

		//draw Start Button
		iBriefingButton->SetLowerLeftLocation(TPoint(lBoxLocation.iX + 610, lBoxLocation.iY));
		iBriefingButton->Draw();

		//draw Mission Name
		iGraphicsFont->SetFont(iFontForMissionNames);
		iGraphicsFont->SetColour(KColourDarkBlue);
		DrawCenteredString(TPoint(lBoxLocation.iX, lBoxLocation.iY + 160), iFontForMissionNames, iStringBriefingScreen, 800, 40);

		//add space between boxes
		lBoxLocation.iY -= 200; //offset for box length
		lBoxLocation.iY -= 30; //space between boxes
	}

	//draw Mission Boxes
	for(TInt lIndex = 0; lIndex < iMissionBoxes->GetCount(); lIndex++)
	{
		//draw box
		iMissionBox->SetNewLowerLeftCoordinate(TPointIntFloat(TIntFloat::Convert(lBoxLocation.iX), TIntFloat::Convert(lBoxLocation.iY)));
		iMissionBox->DrawArrays();

		//draw Mission image
		iMissionImage->SetNewLowerLeftCoordinate(TPointIntFloat(TIntFloat::Convert(lBoxLocation.iX), TIntFloat::Convert(lBoxLocation.iY)));
		iMissionImage->AssignTexture(&iImageStore->GetImage(iMissionBoxes->Get(lIndex)->Mission->MissionImage));
		iMissionImage->DrawArrays();

		//check if not unlocked
		if(!iMissionBoxes->Get(lIndex)->Mission->Unlocked)
		{
			iGraphicsFont->SetFont(iFontLocked);
			iGraphicsFont->SetColour(KColourRed);
			DrawCenteredString(TPoint(lBoxLocation.iX, lBoxLocation.iY), iFontLocked, iStringLocked, 400, 160);
		}

		//draw difficulty Images
		TPoint lDifficultyImageLocation = TPoint(lBoxLocation.iX + 400 + 58, lBoxLocation.iY + 125);
		//draw Baby
		if(iMissionBoxes->Get(lIndex)->Mission->CompletedBaby)
			iMissionDifficultyImage->AssignTexture(&iImageStore->GetImage(EImageIdFrontendCampaignScreenBabySymbol));
		else
			iMissionDifficultyImage->AssignTexture(&iImageStore->GetImage(EImageIdFrontendCampaignScreenBabySymbolGreyedOut));
		iMissionDifficultyImage->SetNewLowerLeftCoordinate((TPointIntFloat(TIntFloat::Convert(lDifficultyImageLocation.iX), TIntFloat::Convert(lDifficultyImageLocation.iY))));
		iMissionDifficultyImage->DrawArrays();
		lDifficultyImageLocation.iX += 71;
		//draw Easy
		if(iMissionBoxes->Get(lIndex)->Mission->CompletedEasy)
			iMissionDifficultyImage->AssignTexture(&iImageStore->GetImage(EImageIdFrontendCampaignScreenEasySymbol));
		else
			iMissionDifficultyImage->AssignTexture(&iImageStore->GetImage(EImageIdFrontendCampaignScreenEasySymbolGreyedOut));
		iMissionDifficultyImage->SetNewLowerLeftCoordinate((TPointIntFloat(TIntFloat::Convert(lDifficultyImageLocation.iX), TIntFloat::Convert(lDifficultyImageLocation.iY))));
		iMissionDifficultyImage->DrawArrays();
		lDifficultyImageLocation.iX += 71;
		//draw Medium
		if(iMissionBoxes->Get(lIndex)->Mission->CompletedMedium)
			iMissionDifficultyImage->AssignTexture(&iImageStore->GetImage(EImageIdFrontendCampaignScreenMediumSymbol));
		else
			iMissionDifficultyImage->AssignTexture(&iImageStore->GetImage(EImageIdFrontendCampaignScreenMediumSymbolGreyedOut));
		iMissionDifficultyImage->SetNewLowerLeftCoordinate((TPointIntFloat(TIntFloat::Convert(lDifficultyImageLocation.iX), TIntFloat::Convert(lDifficultyImageLocation.iY))));
		iMissionDifficultyImage->DrawArrays();
		lDifficultyImageLocation.iX += 71;
		//draw Hard
		if(iMissionBoxes->Get(lIndex)->Mission->CompletedHard)
			iMissionDifficultyImage->AssignTexture(&iImageStore->GetImage(EImageIdFrontendCampaignScreenHardSymbol));
		else
			iMissionDifficultyImage->AssignTexture(&iImageStore->GetImage(EImageIdFrontendCampaignScreenHardSymbolGreyedOut));
		iMissionDifficultyImage->SetNewLowerLeftCoordinate((TPointIntFloat(TIntFloat::Convert(lDifficultyImageLocation.iX), TIntFloat::Convert(lDifficultyImageLocation.iY))));
		iMissionDifficultyImage->DrawArrays();

		//draw Highscore
		iGraphicsFont->SetFont(iFontForHighscore);
		iGraphicsFont->SetColour(KColourDarkRed);
		//draw HighScore:
		iGraphicsFont->DrawStringToScreenHorizontally(TPoint(lBoxLocation.iX + 410, lBoxLocation.iY + 90), iStringHighscore);
		TInt lLenghtOfScore = iGraphicsFont->GetWidthOfString(iFontForHighscore, iMissionBoxes->Get(lIndex)->MissionScore);
		//draw numerical value,is centered to the right
		iGraphicsFont->DrawStringToScreenHorizontally(TPoint(lBoxLocation.iX + (790 - lLenghtOfScore),lBoxLocation.iY + 90), iMissionBoxes->Get(lIndex)->MissionScore);

		//Draw Load Button
		iMissionBoxes->Get(lIndex)->LoadButton->SetLowerLeftLocation(TPoint(lBoxLocation.iX + 410, lBoxLocation.iY + 14));
		iMissionBoxes->Get(lIndex)->LoadButton->Draw();
		//Draw Start Button
		iMissionBoxes->Get(lIndex)->StartButton->SetLowerLeftLocation(TPoint(lBoxLocation.iX + 625, lBoxLocation.iY + 14));
		iMissionBoxes->Get(lIndex)->StartButton->Draw();

		//draw Mission Name
		iGraphicsFont->SetFont(iFontForMissionNames);
		iGraphicsFont->SetColour(KColourDarkBlue);
		DrawCenteredString(TPoint(lBoxLocation.iX, lBoxLocation.iY + 160), iFontForMissionNames, iMissionBoxes->Get(lIndex)->MissionName, 800, 40);

		//add space between boxes
		lBoxLocation.iY -= 200; //offset for box length
		lBoxLocation.iY -= 30; //space between boxes
	}

	//draw Debriefing Screen
	if(iCampaign->CampaignDebriefingScreen.Enabled)
	{
		//draw box
		iMissionBox->SetNewLowerLeftCoordinate(TPointIntFloat(TIntFloat::Convert(lBoxLocation.iX), TIntFloat::Convert(lBoxLocation.iY)));
		iMissionBox->DrawArrays();

		//draw campaign image
		iBriefingImage->SetNewLowerLeftCoordinate(TPointIntFloat(TIntFloat::Convert(lBoxLocation.iX), TIntFloat::Convert(lBoxLocation.iY)));
		iBriefingImage->AssignTexture(&iImageStore->GetImage(iCampaign->CampaignDebriefingScreen.SmallMapImage));
		iBriefingImage->DrawArrays();

		//check if not unlocked
		if(!iCampaign->CampaignDebriefingScreen.Unlocked)
		{
			iGraphicsFont->SetFont(iFontLocked);
			iGraphicsFont->SetColour(KColourRed);
			DrawCenteredString(TPoint(lBoxLocation.iX, lBoxLocation.iY), iFontLocked, iStringLocked, 610, 160);
		}

		//draw Start Button
		iDebriefingButton->SetLowerLeftLocation(TPoint(lBoxLocation.iX + 610, lBoxLocation.iY));
		iDebriefingButton->Draw();

		//draw Mission Name
		iGraphicsFont->SetFont(iFontForMissionNames);
		iGraphicsFont->SetColour(KColourDarkBlue);
		DrawCenteredString(TPoint(lBoxLocation.iX, lBoxLocation.iY + 160), iFontForMissionNames, iStringDebriefingScreen, 800, 40);

		//add space between boxes
		lBoxLocation.iY -= 200; //offset for box length
		lBoxLocation.iY -= 30; //space between boxes
	}

	//--------------- Draw Background And Controls -------------//

	iBackgroundTexture->DrawArrays();

	//draw Select Mission String
	iGraphicsFont->SetColour(KColourDarkRed);
	iGraphicsFont->SetFont(iFontSelectMission);
	DrawCenteredString(TPoint(360, 480), iFontSelectMission, iStringSelectMission, 310, 40);

	//Scroll Bar
	iScrollBar->Draw();

	//draw Back Button
	iBackButton->Draw();
}