diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2020-12-23 18:24:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-23 18:24:00 +0100 |
commit | c4c211c3b7608f79457f16bb42ad8839a9cdcf5a (patch) | |
tree | b623ca5f4ac718466a13cf50659b1486cb6681c9 /tests | |
parent | 1e08647195a690d14666443b7691d8406a7e73b7 (diff) | |
parent | 4b8b8039316493ee3fa77c6bb93f95e109fa68a6 (diff) |
Merge pull request #44605 from madmiraal/rename-control-margin
Rename Control margin to offset
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_gui.cpp | 6 | ||||
-rw-r--r-- | tests/test_rect2.h | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/test_gui.cpp b/tests/test_gui.cpp index c2d81bda69..a4559687c8 100644 --- a/tests/test_gui.cpp +++ b/tests/test_gui.cpp @@ -67,8 +67,8 @@ public: SceneTree::init(); Panel *frame = memnew(Panel); - frame->set_anchor(MARGIN_RIGHT, Control::ANCHOR_END); - frame->set_anchor(MARGIN_BOTTOM, Control::ANCHOR_END); + frame->set_anchor(SIDE_RIGHT, Control::ANCHOR_END); + frame->set_anchor(SIDE_BOTTOM, Control::ANCHOR_END); frame->set_end(Point2(0, 0)); Ref<Theme> t = memnew(Theme); @@ -199,7 +199,7 @@ public: richtext->set_position(Point2(600, 210)); richtext->set_size(Point2(180, 250)); - richtext->set_anchor_and_margin(MARGIN_RIGHT, Control::ANCHOR_END, -20); + richtext->set_anchor_and_offset(SIDE_RIGHT, Control::ANCHOR_END, -20); frame->add_child(richtext); diff --git a/tests/test_rect2.h b/tests/test_rect2.h index b1c588fda1..b6edc9ce81 100644 --- a/tests/test_rect2.h +++ b/tests/test_rect2.h @@ -197,10 +197,10 @@ TEST_CASE("[Rect2] Growing") { "grow_individual() with positive and negative values should return the expected Rect2."); CHECK_MESSAGE( - Rect2(0, 100, 1280, 720).grow_margin(MARGIN_TOP, 500).is_equal_approx(Rect2(0, -400, 1280, 1220)), + Rect2(0, 100, 1280, 720).grow_margin(SIDE_TOP, 500).is_equal_approx(Rect2(0, -400, 1280, 1220)), "grow_margin() with positive value should return the expected Rect2."); CHECK_MESSAGE( - Rect2(0, 100, 1280, 720).grow_margin(MARGIN_TOP, -500).is_equal_approx(Rect2(0, 600, 1280, 220)), + Rect2(0, 100, 1280, 720).grow_margin(SIDE_TOP, -500).is_equal_approx(Rect2(0, 600, 1280, 220)), "grow_margin() with negative value should return the expected Rect2."); } @@ -409,10 +409,10 @@ TEST_CASE("[Rect2i] Growing") { "grow_individual() with positive and negative values should return the expected Rect2i."); CHECK_MESSAGE( - Rect2i(0, 100, 1280, 720).grow_margin(MARGIN_TOP, 500) == Rect2i(0, -400, 1280, 1220), + Rect2i(0, 100, 1280, 720).grow_margin(SIDE_TOP, 500) == Rect2i(0, -400, 1280, 1220), "grow_margin() with positive value should return the expected Rect2i."); CHECK_MESSAGE( - Rect2i(0, 100, 1280, 720).grow_margin(MARGIN_TOP, -500) == Rect2i(0, 600, 1280, 220), + Rect2i(0, 100, 1280, 720).grow_margin(SIDE_TOP, -500) == Rect2i(0, 600, 1280, 220), "grow_margin() with negative value should return the expected Rect2i."); } |