WorldWidget:set_widget

Sets the widget managed by this component.

Usage

world_widget:set_widget(widget)

Arguments

Name Type Description
widget Widget Widget to manage and draw.

Examples

local ecs = crystal.ECS:new();
local entity = ecs:spawn(crystal.Entity);
entity:add_component(crystal.WorldWidget);
entity:set_widget(crystal.Widget:new());

This site uses Just the Docs, a documentation theme for Jekyll.