本文整理汇总了C++中SpinBox::set_pos方法的典型用法代码示例。如果您正苦于以下问题:C++ SpinBox::set_pos方法的具体用法?C++ SpinBox::set_pos怎么用?C++ SpinBox::set_pos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SpinBox
的用法示例。
在下文中一共展示了SpinBox::set_pos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
virtual void init() {
SceneMainLoop::init();
#if 0
Viewport *vp = memnew( Viewport );
vp->set_world( Ref<World>( memnew( World )));
get_root()->add_child(vp);
vp->set_rect(Rect2(0,0,256,256));
vp->set_as_render_target(true);
vp->set_render_target_update_mode(Viewport::RENDER_TARGET_UPDATE_ALWAYS);
Camera *camera = memnew( Camera );
vp->add_child(camera);
camera->make_current();
TestCube *testcube = memnew( TestCube );
vp->add_child(testcube);
testcube->set_transform(Transform( Matrix3().rotated(Vector3(0,1,0),Math_PI*0.25), Vector3(0,0,-8)));
Sprite *sp = memnew( Sprite );
sp->set_texture( vp->get_render_target_texture() );
// sp->set_texture( ResourceLoader::load("res://ball.png") );
sp->set_pos(Point2(300,300));
get_root()->add_child(sp);
return;
#endif
Panel * frame = memnew( Panel );
frame->set_anchor( MARGIN_RIGHT, Control::ANCHOR_END );
frame->set_anchor( MARGIN_BOTTOM, Control::ANCHOR_END );
frame->set_end( Point2(0,0) );
get_root()->add_child( frame );
Label *label = memnew( Label );
label->set_pos( Point2( 80,90 ) );
label->set_size( Point2( 170,80 ) );
label->set_align( Label::ALIGN_FILL );
//label->set_text("There");
label->set_text("There was once upon a time a beautiful unicorn that loved to play with little girls...");
frame->add_child(label);
Button *button = memnew( Button );
button->set_pos( Point2( 20,20 ) );
button->set_size( Point2( 1,1 ) );
button->set_text("This is a biggie button");
frame->add_child( button );
#if 0
Sprite *tf = memnew( Sprite );
frame->add_child(tf);
Image img;
ImageLoader::load_image("LarvoClub.png",&img);
img.resize(512,512);
img.generate_mipmaps();
img.compress();
Ref<Texture> text = memnew( Texture );
text->create_from_image(img);
tf->set_texture(text);
tf->set_pos(Point2(50,50));
//tf->set_scale(Point2(0.3,0.3));
return;
#endif
Tree * tree = memnew( Tree );
tree->set_columns(2);
tree->set_pos( Point2( 230,210 ) );
tree->set_size( Point2( 150,250 ) );
TreeItem *item = tree->create_item();
item->set_editable(0,true);
item->set_text(0,"root");
item = tree->create_item( tree->get_root() );
item->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
item->set_editable(0,true);
item->set_text(0,"check");
item->set_cell_mode(1, TreeItem::CELL_MODE_CHECK);
item->set_editable(1,true);
item->set_text(1,"check2");
item = tree->create_item( tree->get_root() );
item->set_cell_mode(0, TreeItem::CELL_MODE_RANGE);
//.........这里部分代码省略.........