Created
July 18, 2014 03:32
-
-
Save jerstlouis/fbe121cf7a716eab53fd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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