Widgets
Builders produce a concrete Widget tree. Pass builders to
Frame::child / Flow::child via impl Into<Widget> (From impls on each
builder).
| Widget | Factorio element | Page |
|---|---|---|
Frame |
frame |
Titled container, layout, caption |
Flow |
flow |
Layout container |
ScrollPane |
scroll-pane |
Scrollable container |
Text |
label |
Caption label |
Button |
button |
Caption + on_click |
SpriteButton |
sprite-button |
Sprite + on_click |
Checkbox |
checkbox |
Caption + on_checked |
TextField |
textfield |
Text input |
Slider |
slider |
Numeric slider |
ProgressBar |
progressbar |
Progress display |
DropDown |
drop-down |
Item list |
Sprite |
sprite |
Static sprite |
Line |
line |
Horizontal / vertical rule |
EmptyWidget |
empty-widget |
Spacer / placeholder |
use factorio_rs_gui::shared::button::Button;use factorio_rs_gui::shared::flow::Flow;use factorio_rs_gui::shared::frame::Frame;use factorio_rs_gui::shared::text::Text;use factorio_rs_gui::shared::widget::Widget;
fn app() -> impl Into<Widget> { Frame::new() .caption("Hello") .direction(GuiDirection::Vertical) .child( Flow::new() .direction(GuiDirection::Vertical) .child(Text::new("Label")) .child(Button::new("OK")), )}Prefer factorio_rs_gui::shared::... paths (not a flattened prelude import alone)
so Factorio requires resolve correctly after transpile.
Interactive widgets register handlers through mount / install
— no manual OnGuiClick (or other GUI event) stubs.