您的位置:首页 > 产品设计 > UI/UE

(CEGUI)如何创建控件 ------ScrollablePane的使用(滚动条)

2010-10-15 13:35 232 查看
ScrollablePane* d_pane = static_cast<ScrollablePane*>(d_wm->createWindow("WindowsLook/ScrollablePane"));

*设置滚动面板大小

d_pane->setArea(URect(UDim(0,0),bar_bottom,UDim(1,0),UDim(1,0)));

*自定义范围出现滚动,不使用的话设为true,自动出现滚动

d_pane->setContentPaneAutoSized(false);
d_pane->setContentPaneArea(CEGUI::Rect(0,0,1000,500));
root->addChildWindow(d_pane);

*往滚动面板中添加元素

Window* dlg = d_wm->createWindow("WindowsLook/FrameWindow");
dlg->setMinSize(UVector2(UDim(0,250),UDim(0,100)));
dlg->setSize(UVector2(UDim(0,250),UDim(0,100)));
dlg->setText("Drag me around");

d_pane->addChildWindow(dlg);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐