Skip to content

AddWidget

otvv edited this page Jul 19, 2020 · 7 revisions

CTabs::AddWidget

What it does:

This function adds a new WIdget into the Widgets container. In other words it will add a new Widget into the menu.

Parameters:

This function takes a std::shared_ptr<FGUI::CWidget> as an argument. The argument is: The instance (pointer) of the widget (control) that you want to add.

Widgets:

List of widgets that is using this function:

  • Container

Setting up a Widget

Here's how you can add a new Widget:

buildrPattern.Widget(MyWidget).Title("Widget Title").(...).SpawnIn(Container);

NOTE: (...) are the rest of the functions that you need to set up a widget (Position, Size, Font, etc)

NOTE: "MyWidget" can be any widget.

NOTE: You can spawn your widget inside any Container.