Skip to content

Easier way to create custom imgui right-click menus for graphics #1010

@kushalkolar

Description

@kushalkolar

The current way that it's done is very clunky. I propose something like:

ImguiFigure has a click event handler, if there's a graphic in the pick info (thanks to #947 we can do this now) we can check a Graphic.right_click_menu property which must be an instance of Popup. right_click_menu.setter could take a Popup class and create the instance internally, passing it the parent Figure instance.

This will also make it easy to have some standard default right-click menus for various graphics, like images. We could allow overriding these default by passing a dict to ImguiFigure, like {fpl.ImageGraphic: CustomPopupClass, ...}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions