예제 #1
0
    def __init__(self):
        ShowBase.__init__(self)

        # Construct a new LUIRegion
        region = LUIRegion.make("LUI", base.win)

        # Construct a new InputHandler to catch and process events
        handler = LUIInputHandler()
        base.mouseWatcher.attach_new_node(handler)
        region.set_input_handler(handler)

        # Load the default LUI skin
        skin = LUIDefaultSkin()
        skin.load()

        # LUI is initialized now, so we can start adding elements, for example:
        button = LUIButton(parent=region.root, text="Hello world!", top=30, left=30)
예제 #2
0
    def __init__(self):
        """ Constructs the demo framework """

        if False:
            self._skin = LUIMetroSkin()
            base.win.set_clear_color(Vec4(1))
        else:
            self._skin = LUIDefaultSkin()
            base.win.set_clear_color(Vec4(0.1, 0.0, 0.0, 1))
        self._skin.load()

        # Construct the LUIRegion
        region = LUIRegion.make("LUI", base.win)
        handler = LUIInputHandler()
        base.mouseWatcher.attach_new_node(handler)
        region.set_input_handler(handler)

        self._root = region.root
        self._constructor_params = []
예제 #3
0
    def __init__(self):
        """ Constructs the demo framework """

        if False:
            self._skin = LUIMetroSkin()
            base.win.set_clear_color(Vec4(1))
        else:
            self._skin = LUIDefaultSkin()
            base.win.set_clear_color(Vec4(0.1, 0.0, 0.0, 1))
        self._skin.load()

        # Construct the LUIRegion
        region = LUIRegion.make("LUI", base.win)
        handler = LUIInputHandler()
        base.mouseWatcher.attach_new_node(handler)
        region.set_input_handler(handler)

        self._root = region.root
        self._constructor_params = []
예제 #4
0
    def __init__(self):
        ShowBase.__init__(self)

        # Construct a new LUIRegion
        region = LUIRegion.make("LUI", base.win)

        # Construct a new InputHandler to catch and process events
        handler = LUIInputHandler()
        base.mouseWatcher.attach_new_node(handler)
        region.set_input_handler(handler)

        # Load the default LUI skin
        skin = LUIDefaultSkin()
        skin.load()

        # LUI is initialized now, so we can start adding elements, for example:
        button = LUIButton(parent=region.root,
                           text="Hello world!",
                           top=30,
                           left=30)
예제 #5
0
from Skins.Metro.LUIMetroSkin import LUIMetroSkin

s = ShowBase()

# Load a LUI Skin
if False:
    skin = LUIMetroSkin()
    base.win.set_clear_color(Vec4(1))
else:
    skin = LUIDefaultSkin()
    base.win.set_clear_color(Vec4(0.1, 0.0, 0.0, 1))

skin.load()

# Initialize LUI
region = LUIRegion.make("LUI", base.win)
handler = LUIInputHandler()
base.mouseWatcher.attach_new_node(handler)
region.set_input_handler(handler)

# Title
title_label = LUILabel(parent=region.root, text="LUI Console Example", font_size=40,
                       font="header", pos=(25, 17))

# Container
container = LUIFrame(parent = region.root, width=700, height=500,
    style=LUIFrame.FS_sunken, margin=30, top=50)

text_container = LUIScrollableRegion(parent=container, width=675, height=440,
    padding=0)