nanome.api.ui.image module

class Image(file_path='')[source]

Bases: nanome._internal.ui.models._Image, nanome.api.ui.ui_base.UIBase

Represents an image in a menu
class ScalingOptions

Bases: enum.IntEnum

Ways for an image to scale.
To be used with ui.Image().scaling_option
fill = 1
fit = 2
stretch = 0
color
The color of the image
Type:Color
file_path
The file path to the image.
Setting this and calling update_content will change the image.
Type:str
register_held_callback(func)[source]
Registers a function to be called rapidly while the image is being pressed
Parameters:func (method (Image, int, int) -> None) – called while the image is being pressed
register_pressed_callback(func)[source]
Registers a function to be called when the image is pressed
Parameters:func (method (Image, int, int) -> None) – called the image is pressed
register_released_callback(func)[source]
Registers a function to be called when the image is released
Parameters:func (method (Image, int, int) -> None) – called the image is released
scaling_option
Determines how the image scales.
Type:ScalingOptions