Beispiel #1
0
void RoundRectTextButton::draw()const
{
    int const W = width_m;
    int const H = height_m;
    switch (getState()) {
    case State::LEFT:
        rect_m.draw(HSV(colorH_m, 0.5, 0.9));
        FontAsset(FONT_NAME).drawCenter(text_m, rect_m.center);
        break;
    case State::MOUSE_OVER:
        RoundRect(rect_m.rect.scaled(1.03), 5).moveBy(-W*SCALE/2, -H*SCALE/2).draw(HSV(colorH_m, 0.8, 0.9));
        FontAsset(FONT_NAME).drawCenter(text_m, rect_m.center);
        break;
    case State::PRESSED:
        RoundRect(rect_m.rect.scaled(1.03), 5).moveBy(-W*SCALE/2, -H*SCALE/2+2).draw(HSV(colorH_m, 0.8, 0.6));
        FontAsset(FONT_NAME).drawCenter(text_m, rect_m.center);
        break;
    case State::RELEASED:
        rect_m.draw(HSV(colorH_m, 0.5, 0.9));
        FontAsset(FONT_NAME).drawCenter(text_m, rect_m.center);
        break;
    default:
        break;
    }
}
Beispiel #2
0
void renderResult(int score, bool updated, int fc)
{
	FontAsset(L"GameoverFont")(L"GAME OVER!!").drawCenter(Vec2(Window::Width() / 2.0, Window::Height() / 3.0), Palette::Red);
	FontAsset(L"ResultFont")(L"最終記録:", score, L" m").drawCenter(Vec2(Window::Width() / 2.0, Window::Height() / 3.0 * 2));
	if(updated && fc % 2 == 0) FontAsset(L"ResultFont")(L"記録更新!").drawCenter(Vec2(Window::Width() / 2.0, Window::Height() / 3.0 * 2 + 24.0f), Palette::Yellow);
	FontAsset(L"GameoverFontMini")(L"スペースキーでタイトルに戻る").drawCenter(Vec2(Window::Width() / 2.0, Window::Height() / 4.0 * 3.0 + 16.0f));
}
void StaffRollContent::draw()const
{
	if (state_m == L"firstTitle"){
		FontAsset(titleEnglishFontHandle)(L"G a r b a g e C o l l e c t i o n").drawCenter(Window::Center(), Palette::Whitesmoke);
		FontAsset(titleJapaneseFontHandle)(L"〜 ガ ベ こ れ 〜").drawCenter(Window::Center().movedBy(0,FontAsset(titleJapaneseFontHandle).size+40), Palette::Whitesmoke);
	}
	else if (state_m == L"circleLogo"){
		TextureAsset(circleLogoHandle).scale(0.8).drawAt(Window::Center());
	}
	else if (state_m == L"titleLogo"){
		DespiteOfScene::sendDrawingInstruction();
	}
	else if (state_m == L"finalize"){

	}
	else{
		memory_m.draw();
		memoryR_m->draw();
	}
}
Beispiel #4
0
	void draw()const override{
		texture.draw();
		TextureAsset(L"Window").scale(Min(frameCount,10)/10.,Min(frameCount,10)/10.).drawAt(240, 320);
		
		double Zoom = -2.5 * Max(0., 10. - frameCount);
		(RetryButton.stretched(Zoom))(TextureAsset(L"Button")).draw();
		(TweetButton.stretched(Zoom))(TextureAsset(L"Button")).draw();
		(TitleButton.stretched(Zoom))(TextureAsset(L"Button")).draw();
		
		if (frameCount > 10) {
			(FontAsset(L"Font"))(L"Score"+Format(m_data->score)).draw(100,100);
		}
	}
Beispiel #5
0
void renderCurrentMax()
{
	FontAsset(L"ScoreFont")(L"現在の最長距離:", Record::instance().getCurrentMaxScore(), L" m").draw(Vec2(2, 2) * 2, Palette::White);
}
Beispiel #6
0
void renderInfo(int score)
{
	// hud
	FontAsset(L"ScoreFont")(L"距離:", score, L" m").draw(Vec2(2, 2) * 2, Palette::White);
}
Beispiel #7
0
void FontSharedText::draw()const
{
	FontAsset(fontName_m).drawCenter(string_m, center_m, color_m);
}
Beispiel #8
0
bool ScoreEffect::update(double sec) {
	FontAsset(L"middleLog").drawCenter(Format(score), pos, HSV(Palette::Lightgreen).toColorF(1.0 - sec));

	return sec < 1.0;
}