Code: Select all
import "ecere"
class Form1 : Window
{
text = "例子:按ECS退出";
background = black;
borderStyle = sizable;
hasClose = true;
size = { 640, 480 };
bool OnKeyDown(Key key, unichar ch)
{
switch(key)
{
case escape:
Destroy(0);
return false;
}
return true;
}
}
Form1 form1 {};