Canvas#
-
type krpc_UI_Canvas_t#
A canvas for user interface elements. See
krpc_UI_StockCanvas()andkrpc_UI_AddCanvas().-
krpc_error_t krpc_UI_Canvas_RectTransform(krpc_connection_t connection, krpc_UI_RectTransform_t *returnValue, krpc_UI_Canvas_t instance)#
The rect transform for the UI object.
-
krpc_error_t krpc_UI_Canvas_LayoutElement(krpc_connection_t connection, krpc_UI_LayoutElement_t *returnValue, krpc_UI_Canvas_t instance)#
How much space the UI object asks a layout for.
Note
Only has an effect when the object is in a panel that has a layout. A canvas is not inside a layout and does not have one.
-
krpc_error_t krpc_UI_Canvas_Visible(krpc_connection_t connection, bool *returnValue, krpc_UI_Canvas_t instance)#
-
krpc_error_t krpc_UI_Canvas_set_Visible(krpc_connection_t connection, krpc_UI_Canvas_t instance, bool value)#
Whether the UI object is visible.
Note
This is the object’s own setting, which is what it was last set to. An object is only drawn when everything it is inside is visible as well, so an interface can be built with its parts visible, inside a panel that is not, and shown all at once by making that panel visible.
-
krpc_error_t krpc_UI_Canvas_AddPanel(krpc_connection_t connection, krpc_UI_Panel_t *returnValue, krpc_UI_Canvas_t instance, bool visible)#
Create a panel within this object.
- Parameters:
visible – Whether the new panel is visible.
-
krpc_error_t krpc_UI_Canvas_AddText(krpc_connection_t connection, krpc_UI_Text_t *returnValue, krpc_UI_Canvas_t instance, const char *content, bool visible)#
Add text to this object.
- Parameters:
content – The text.
visible – Whether the text is visible.
-
krpc_error_t krpc_UI_Canvas_AddInputField(krpc_connection_t connection, krpc_UI_InputField_t *returnValue, krpc_UI_Canvas_t instance, bool visible)#
Add an input field to this object.
- Parameters:
visible – Whether the input field is visible.
-
krpc_error_t krpc_UI_Canvas_AddButton(krpc_connection_t connection, krpc_UI_Button_t *returnValue, krpc_UI_Canvas_t instance, const char *content, bool visible)#
Add a button to this object.
- Parameters:
content – The label for the button.
visible – Whether the button is visible.
-
krpc_error_t krpc_UI_Canvas_AddToggle(krpc_connection_t connection, krpc_UI_Toggle_t *returnValue, krpc_UI_Canvas_t instance, const char *content, bool visible)#
Add a toggle to this object.
- Parameters:
content – The label for the toggle.
visible – Whether the toggle is visible.
-
krpc_error_t krpc_UI_Canvas_AddToggleGroup(krpc_connection_t connection, krpc_UI_ToggleGroup_t *returnValue, krpc_UI_Canvas_t instance)#
Add a toggle group to this object, to make a set of toggles into radio buttons.
Note
The group is not drawn and does not take up any space. The toggles that belong to it can be added anywhere.
-
krpc_error_t krpc_UI_Canvas_AddSlider(krpc_connection_t connection, krpc_UI_Slider_t *returnValue, krpc_UI_Canvas_t instance, bool vertical, bool visible)#
Add a slider to this object.
- Parameters:
vertical – Whether the slider runs from bottom to top, rather than from left to right.
visible – Whether the slider is visible.
-
krpc_error_t krpc_UI_Canvas_AddDropdown(krpc_connection_t connection, krpc_UI_Dropdown_t *returnValue, krpc_UI_Canvas_t instance, bool visible)#
Add a dropdown to this object.
- Parameters:
visible – Whether the dropdown is visible.
-
krpc_error_t krpc_UI_Canvas_AddImage(krpc_connection_t connection, krpc_UI_Image_t *returnValue, krpc_UI_Canvas_t instance, bool visible)#
Add an image to this object.
- Parameters:
visible – Whether the image is visible.
-
krpc_error_t krpc_UI_Canvas_AddScrollView(krpc_connection_t connection, krpc_UI_ScrollView_t *returnValue, krpc_UI_Canvas_t instance, bool visible)#
Add a scroll view to this object.
- Parameters:
visible – Whether the scroll view is visible.
-
krpc_error_t krpc_UI_Canvas_Remove(krpc_connection_t connection, krpc_UI_Canvas_t instance)#
Remove the UI object.
-
krpc_error_t krpc_UI_Canvas_RectTransform(krpc_connection_t connection, krpc_UI_RectTransform_t *returnValue, krpc_UI_Canvas_t instance)#