diff options
Diffstat (limited to 'main/tests/test_gui.cpp')
-rw-r--r-- | main/tests/test_gui.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/main/tests/test_gui.cpp b/main/tests/test_gui.cpp index cf32bf7073..3d0b96ae5b 100644 --- a/main/tests/test_gui.cpp +++ b/main/tests/test_gui.cpp @@ -94,7 +94,7 @@ public: 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)); + sp->set_position(Point2(300,300)); get_root()->add_child(sp); @@ -113,7 +113,7 @@ public: Label *label = memnew(Label); - label->set_pos(Point2(80, 90)); + label->set_position(Point2(80, 90)); label->set_size(Point2(170, 80)); label->set_align(Label::ALIGN_FILL); //label->set_text("There"); @@ -123,7 +123,7 @@ public: Button *button = memnew(Button); - button->set_pos(Point2(20, 20)); + button->set_position(Point2(20, 20)); button->set_size(Point2(1, 1)); button->set_text("This is a biggie button"); @@ -141,7 +141,7 @@ public: Ref<ImageTexture> tt = memnew( ImageTexture ); tt->create_from_image(img); tf->set_texture(tt); - tf->set_pos(Point2(50,50)); + tf->set_position(Point2(50,50)); //tf->set_scale(Point2(0.3,0.3)); @@ -151,7 +151,7 @@ public: Tree *tree = memnew(Tree); tree->set_columns(2); - tree->set_pos(Point2(230, 210)); + tree->set_position(Point2(230, 210)); tree->set_size(Point2(150, 250)); TreeItem *item = tree->create_item(); @@ -192,14 +192,14 @@ public: LineEdit *line_edit = memnew(LineEdit); - line_edit->set_pos(Point2(30, 190)); + line_edit->set_position(Point2(30, 190)); line_edit->set_size(Point2(180, 1)); frame->add_child(line_edit); HScrollBar *hscroll = memnew(HScrollBar); - hscroll->set_pos(Point2(30, 290)); + hscroll->set_position(Point2(30, 290)); hscroll->set_size(Point2(180, 1)); hscroll->set_max(10); hscroll->set_page(4); @@ -208,7 +208,7 @@ public: SpinBox *spin = memnew(SpinBox); - spin->set_pos(Point2(30, 260)); + spin->set_position(Point2(30, 260)); spin->set_size(Point2(120, 1)); frame->add_child(spin); @@ -216,7 +216,7 @@ public: ProgressBar *progress = memnew(ProgressBar); - progress->set_pos(Point2(30, 330)); + progress->set_position(Point2(30, 330)); progress->set_size(Point2(120, 1)); frame->add_child(progress); @@ -225,7 +225,7 @@ public: MenuButton *menu_button = memnew(MenuButton); menu_button->set_text("I'm a menu!"); - menu_button->set_pos(Point2(30, 380)); + menu_button->set_position(Point2(30, 380)); menu_button->set_size(Point2(1, 1)); frame->add_child(menu_button); @@ -244,7 +244,7 @@ public: options->add_item("Hello, testing"); options->add_item("My Dearest"); - options->set_pos(Point2(230, 180)); + options->set_position(Point2(230, 180)); options->set_size(Point2(1, 1)); frame->add_child(options); @@ -253,7 +253,7 @@ public: Tree * tree = memnew( Tree ); tree->set_columns(2); - tree->set_pos( Point2( 230,210 ) ); + tree->set_position( Point2( 230,210 ) ); tree->set_size( Point2( 150,250 ) ); @@ -281,7 +281,7 @@ public: RichTextLabel *richtext = memnew(RichTextLabel); - richtext->set_pos(Point2(600, 210)); + richtext->set_position(Point2(600, 210)); richtext->set_size(Point2(180, 250)); richtext->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, 20); @@ -337,21 +337,21 @@ public: tabc->add_child(ctl); label = memnew(Label); label->set_text("Some Label"); - label->set_pos(Point2(20, 20)); + label->set_position(Point2(20, 20)); ctl->add_child(label); ctl = memnew(Control); ctl->set_name("tab 3"); button = memnew(Button); button->set_text("Some Button"); - button->set_pos(Point2(30, 50)); + button->set_position(Point2(30, 50)); ctl->add_child(button); tabc->add_child(ctl); frame->add_child(tabc); - tabc->set_pos(Point2(400, 210)); + tabc->set_position(Point2(400, 210)); tabc->set_size(Point2(180, 250)); /*Ref<ImageTexture> text = memnew( ImageTexture ); @@ -359,14 +359,14 @@ public: Sprite* sprite = memnew(Sprite); sprite->set_texture(text); - sprite->set_pos(Point2(300, 300)); + sprite->set_position(Point2(300, 300)); frame->add_child(sprite); sprite->show(); Sprite* sprite2 = memnew(Sprite); sprite->set_texture(text); sprite->add_child(sprite2); - sprite2->set_pos(Point2(50, 50)); + sprite2->set_position(Point2(50, 50)); sprite2->show();*/ } }; |