Legend#

Legend#

Constructor#

Legend([items])

An imgui legend.

Properties#

Legend.collapsed

Legend.height

height of the window

Legend.items

the items in this legend, in the order they are drawn

Legend.location

location of the window

Legend.size

edge or toolbar thickness in pixels, None for floating and fractional windows

Legend.width

width of the window

Legend.window_flags

imgui window flags

Legend.x

canvas x position of the window

Legend.y

canvas y position of the window

Methods#

Legend.add(item)

Add an item to the legend.

Legend.draw()

helps simplify using imgui by managing window creation & position, and pushing/popping the ID

Legend.remove(item)

Remove an item from the legend, it can be added to a legend again later.

Legend.update()

Implement your GUI here and it will be drawn within the window.