Skip to content

Instantly share code, notes, and snippets.

@jerstlouis
Created July 18, 2014 03:32
Show Gist options
  • Save jerstlouis/fbe121cf7a716eab53fd to your computer and use it in GitHub Desktop.
Save jerstlouis/fbe121cf7a716eab53fd to your computer and use it in GitHub Desktop.
import "ecere"
class Game : GuiApplication
{
resolution = res320x240;
fullScreen = true;
bool Cycle(bool idle)
{
return true;
}
}
class MainMenu : Window
{
anchor = { 0,0,0,0 };
font = { "DejaVu Sans", 40, bold = true };
bool OnKeyDown(Key key, unichar ch)
{
if(key == escape) Destroy(0);
return true;
}
void OnRedraw(Surface surface)
{
surface.background = forestGreen;
surface.Area(0,0, clientSize.w, clientSize.h);
surface.CenterTextf(clientSize.w / 2, clientSize.h / 2, "Hello, Ecere!");
}
}
MainMenu menu { };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment