csc.view.StandardButton

class csc.view.StandardButton

StandardButton enum

This enumerates the basic types of standard buttons. Ok, Cancel, Yes, No

1#This script showcases the use of StandardButton in a dialog
2import csc
3def run(scene):
4    dialog_buttons = [csc.view.DialogButton(csc.view.StandardButton.Ok, lambda: scene.success('Pressed Ok')),
5                      csc.view.DialogButton(csc.view.StandardButton.Yes, lambda: scene.success('Pressed Yes')),
6                      csc.view.DialogButton(csc.view.StandardButton.No, lambda: scene.success('Pressed No')),
7                      csc.view.DialogButton(csc.view.StandardButton.Cancel, lambda: scene.success('Pressed Cancel'))]
8
9    csc.view.DialogManager.instance().show_buttons_dialog("Test dialog window", "Press anything", dialog_buttons)

Members:

Ok

Cancel

No

Yes

__init__(self: csc.view.StandardButton, value: int) None

Methods

__init__(self, value)

Attributes

Cancel

No

Ok

Yes

name

value

Cancel = <StandardButton.Cancel: 1>
No = <StandardButton.No: 3>
Ok = <StandardButton.Ok: 0>
Yes = <StandardButton.Yes: 2>
__annotations__ = {}
__eq__(self: object, other: object) bool
__getstate__(self: object) int
__hash__(self: object) int
__index__(self: csc.view.StandardButton) int
__init__(self: csc.view.StandardButton, value: int) None
__int__(self: csc.view.StandardButton) int
__members__ = {'Cancel': <StandardButton.Cancel: 1>, 'No': <StandardButton.No: 3>, 'Ok': <StandardButton.Ok: 0>, 'Yes': <StandardButton.Yes: 2>}
__module__ = 'csc.view'
__ne__(self: object, other: object) bool
__repr__(self: object) str
__setstate__(self: csc.view.StandardButton, state: int) None
__str__(self: object) str
property name
property value