|
楼主 |
发表于 2006-9-21 01:01:00
|
显示全部楼层
Re:自定义鼠标图形和GUI中的form问题
没在form中呀,我是这样写的.
TestObject()
{
OnMouseMove =MouseMoveProc;
Form *form;
tex = CreateActiveTexture2D(L"res/cursor/arror.Anim");
tex->Loop=true;
InitGUI(L"AquaGUI.HAC",NULL);
Control+=form=new Form(0,0,384,224,L"Test Window");
form->Align=alCenter;
}
void Draw()
{
glDisable(GL_TEXTURE_2D);
glBegin(GL_QUADS);
glColor3f(1,0,0);glVertex2f(0,0);
glColor3f(1,1,1);glVertex2f(640,0);
glColor3f(0,0,1);glVertex2f(640,480);
glColor3f(0,0,0);glVertex2f(0,480);
glEnd();
tex->Draw(X,Y);
}
bool MouseMoveProc(int x,int y,uint32)
{
X=x;
Y=y;
return(true);
} |
|