Blame |
Last modification |
View Log
| RSS feed
unit app_glscene_highscore;
interface
uses OpenGL, GLaux, glExt, sux_constant, sux_object, app_constant,
resource_texture, resource_shader;
type
TSettings=record
end;
SAGLSHighScore=class(SUXObject)
settings:TSettings;
procedure onTimerView;
procedure onTimerEnter;
procedure initialize;
constructor Create(parent:TObject);
destructor Destroy; override;
end;
implementation
uses sux_main, gl_main, main;
// --- SAGLSHighScore
procedure SAGLSHighScore.onTimerView;
var s: SXInt;
y: SXFloat;
begin
app.scene.renderOutlineText(320, 60, SX_GLFONT_ALIGN_CENTER, 4.0, 'High Score');
for s := 0 to SX_MAX_HIGHSCORE do
begin
y := 150 + s * 30;
with app.game.highscore.settings.scores[s] do
begin
app.scene.renderOutlineText(130, y, SX_GLFONT_ALIGN_LEFT, 1.5, name);
app.scene.renderOutlineText(500, y, SX_GLFONT_ALIGN_RIGHT, 1.5, sx.convert.intToStr(score));
end;
end;
end;
procedure SAGLSHighScore.onTimerEnter;
begin
app.scene.renderOutlineText(320, 120, SX_GLFONT_ALIGN_CENTER, 4.0, 'Enter High Score');
app.scene.renderOutlineText(320, 220, SX_GLFONT_ALIGN_CENTER, 2.5,
'Player ' + sx.convert.intToStr(app.game.settings.highscore.playerindex)
+ ', your name please:');
app.scene.renderOutlineText(320, 270, SX_GLFONT_ALIGN_CENTER, 2.5, app.game.settings.highscore.name);
end;
procedure SAGLSHighScore.initialize;
begin
end;
constructor SAGLSHighScore.Create(parent:TObject);
begin
inherited Create(parent,'GL High Score');
end;
destructor SAGLSHighScore.Destroy;
begin
inherited;
end;
end.