GetPosition
otvv edited this page Jul 19, 2020
·
13 revisions
This function returns the current position of the widget inside the Container.
This function returns a FGUI::POINT
instance. (x, y)
NOTE: This function doesn't return the widget absolute position (Container + Widget), but the widget initial position.
List of widgets that are using this function:
- All of them.
Let's say I want to add a second widget at the same y
position of the first widget.
buildrPattern.Widget(SecondButton).Title("Click me!").Font("Tahoma", 12, true).Position(200, FirstButton->GetPosition().m_iY).SpawnIn(Container);
This is just a example where this function might be useful. You don't need to use this to assemble your menu.
Next you will learn about the GetAbsolutePosition function.
You can also read the library comments/functions for additional info.