Search found 53 matches
三角锥Cone
import "ecere" class Model : Object //三角锥 { public: bool Create(DisplaySystem displaySystem) { bool result = false; if(this) { InitializeMesh(displaySystem); if(mesh) { if(mesh.Allocate({ vertices = true, texCoords1 = true }, 12, displaySystem)) { Vector3Df vertices[12] = { //正面 {0, -(flo...
- Wed Mar 10, 2010 8:57 am
- Forum: 欢迎使用中文讨论
- Topic: 移动图片movepicture
- Replies: 0
- Views: 10094
移动图片movepicture
import "ecere" class Form1 : Window { text = "移动图片"; background = black; borderStyle = sizable; hasMaximize = true; hasMinimize = true; hasClose = true; size = { 800, 600 }; Bitmap bmp; Point drag , moving; bool dragging; bool OnLoadGraphics(void) { bmp = Bitmap{}; bmp.LoadT(&qu...
- Wed Mar 10, 2010 8:53 am
- Forum: 欢迎使用中文讨论
- Topic: 加载背景图片loadBackgroudImage
- Replies: 0
- Views: 10009
加载背景图片loadBackgroudImage
import "ecere" class Image : Window { text = "加载背景图片"; background = black; borderStyle = fixed; hasMinimize = true; hasClose = true; size = { 500, 400 }; isActiveClient = true; BitmapResource boardBMP { ":back.jpg", window = this }; void OnRedraw(Surface surface) { sur...
- Wed Mar 10, 2010 8:49 am
- Forum: 欢迎使用中文讨论
- Topic: 画三角形drawTriangle
- Replies: 1
- Views: 12293
Re: 画圆drawCircle
画圆,变椭圆时,size={a,b,0}改变a,b的值 drawCircle import "ecere" #define SIDE 50 //内切多边形的边数 class Model : Object // 画圆 { public: bool Create(DisplaySystem displaySystem) { bool result = false; if(this) { InitializeMesh(displaySystem); if(mesh) { if(mesh.Allocate({ vertices = true, texCoords1 = true }...
- Wed Mar 10, 2010 8:38 am
- Forum: 欢迎使用中文讨论
- Topic: 画三角形drawTriangle
- Replies: 1
- Views: 12293
画三角形drawTriangle
drawTriangle.rar import "ecere" #define SIDES 3 class Triangle : Object { public: bool Create(DisplaySystem displaySystem) { bool result = false; if(this) { InitializeMesh(displaySystem); if(mesh) { if(mesh.Allocate({ vertices = true, texCoords1 = true }, SIDES, displaySystem)) { Vector3D...
- Wed Mar 10, 2010 8:31 am
- Forum: 欢迎使用中文讨论
- Topic: 按ECS退出(exit on escape)
- Replies: 0
- Views: 9900
按ECS退出(exit on escape)
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 {};
- Wed Mar 10, 2010 8:12 am
- Forum: 欢迎使用中文讨论
- Topic: 登陆界面(login Interface)
- Replies: 1
- Views: 12298
登陆界面(login Interface)
字符串的比较问题,有谁有更好的方法。 On comparison of string, who have a better way??? strcmp(str1,str2) str1 > str2 return >0 str1==str2 return 0 str1 < str2 return <0 当s1<s2时,返回值<0 当s1=s2时,返回值=0 当s1>s2时,返回值>0 能不能直接比较? How to directly compare? str3="abc" if(str3=="abc") { ...} import "ece...
- Wed Mar 10, 2010 7:59 am
- Forum: 欢迎使用中文讨论
- Topic: 模拟红绿灯(Simulation of traffic lights)
- Replies: 0
- Views: 10232
模拟红绿灯(Simulation of traffic lights)
import "ecere" class Form1 : Window { text = "红绿灯traffic lights"; background = activeBorder; borderStyle = sizable; hasMaximize = true; hasMinimize = true; hasClose = true; size = { 344, 224 }; anchor = { horz = -127, vert = -68 }; BitmapResource red{"red.png"}; Bitmap...
- Wed Mar 10, 2010 7:51 am
- Forum: 欢迎使用中文讨论
- Topic: 动态添加按钮 add a button Dynamically
- Replies: 0
- Views: 10381
动态添加按钮 add a button Dynamically
import "ecere" class Form1 : Window { text = "增加删除按钮add&delete button"; background = activeBorder; borderStyle = sizable; hasMaximize = true; hasMinimize = true; hasClose = true; size = { 200, 240 }; anchor = { horz = -215, vert = -108 }; Button button1 { this, text = "...
- Wed Mar 10, 2010 7:48 am
- Forum: 欢迎使用中文讨论
- Topic: ecere 1+1=2
- Replies: 0
- Views: 9837
ecere 1+1=2
import "ecere" class Form1 : Window { text = "1+1=2"; background = activeBorder; borderStyle = sizable; hasClose = true; size = { 400, 216 }; anchor = { horz = -91, vert = -108 }; Button button1 { this, text = "add", size = { 64, 21 }, position = { 224, 64 }; bool Noti...