[][src]Module crystal_engine::state

Contains the states that are used in GameState. These are in a seperate module so we don't pollute the base module documentation.

Structs

FixedVec

A fixed vec of light sources. This is limited to 100 entries because of a limitation in the way Crystal's shaders are implemented. Please open an issue if you need more light sources.

GuiElementBuilder

A struct that is used to create a GuiElement. It is constructed by calling GameState::add_new_element()

GuiElementCanvasBuilder

A struct that is used to render a custom texture for a GuiElement. This can be further customized by e.g. .with_text and with_border. Finalize this GuiElement by calling .build().

GuiElementData

The data of a GuiElement. This can be used to manipulate an existing GuiElement.

GuiElementTextureBuilder

A struct that is used to create a GuiElement with a texture. This is created by calling GameState::create_gui_element().texture(".."). Currently nothing can be manipulated in this struct.

KeyboardState

The state of the keyboard. This can be used to check which keys are pressed during the current frame.

LightState

The state of the lights in the game. Lights come in two flavors.

Enums

FbxError

Errors that can occur when loading an .fbx file

GuiError

Errors generated when creating GUI elements

InitError

Errors that are thrown during initialization. These are mostly internal and graphic card errors and are (hopefully) unlikely to occur.

ModelError

Errors generated when loading a model

ObjError

Errors that can occur when loading an .obj file