[head]
Google  

GUIのサンプルコード - Button

DrawButton.py

GUIBaseButton
import Blender
from Blender import Draw,BGL

Event_Exit=0

def DrawGui():
    Draw.Button ('Exit',Event_Exit,20,20,100,20,"Tip text")

def ButtonEvent(evt):
    if (evt==Event_Exit):
        Draw.Exit()

def KeyEvent(evt, val):
    # val: 1=KeyDown 0=KeyUp
    if (not val) :
        return
    if evt in [Draw.ESCKEY, Draw.QKEY]:
        Draw.Exit()

Draw.Register(DrawGui, KeyEvent, ButtonEvent)
2006.05.11(Thu) 20:41 初出
[foot]