本文整理匯總了Python中Menu.Menu.activate方法的典型用法代碼示例。如果您正苦於以下問題:Python Menu.activate方法的具體用法?Python Menu.activate怎麽用?Python Menu.activate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Menu.Menu
的用法示例。
在下文中一共展示了Menu.activate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: DialogBox
# 需要導入模塊: from Menu import Menu [as 別名]
# 或者: from Menu.Menu import activate [as 別名]
dialog_box = DialogBox((100, 150), "Useless text that could be in a " +
"dialog box.",["OK", "Cancel", "Quit"], font, 300)
text_lines = TextLines((300, 300),
"This is a pretty long line that won't fit in 200 px. "+
"Hence, it's going to be split.",
font,
200,
0)
radio_buttons = RadioButtonList((450, 50), ["English",
"French",
"Spanish"],
font)
menu1.activate()
menu2.activate()
button1.activate()
button2.activate()
text_lines.activate()
dialog_box.activate()
radio_buttons.activate()
elements = [dialog_box, menu1, menu2, button1, button2, text_lines,
radio_buttons]
released = 1
events = []
while 1:
old_elements = elements