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

        # Scene graph
        self.envedit_data = None

        # GUI settings
        self.bg_color = (0, 0, 0, 0.8)
        self.bbox.width = 300
        self.padding = 10

        master_layout = GUIDockLayout()
        self.set_child(master_layout)

        layout = GUIStackLayout()
        master_layout.set_child_dock(layout, GUIDockLayout.TOP)

        title = GUILabel()
        title.text_size = 30
        title.set_font(GUISystem.get_font("default_light"))
        title.set_text("Scene Graph")
        layout.add_child(title)

        spacer = GUIComponent()
        spacer.bbox.height = 20
        layout.add_child(spacer)

        scroll_container = GUIScrollContainer(scroll_v=True, scroll_h=True)
        master_layout.set_child_dock(scroll_container, GUIDockLayout.CENTER)

        self.scene_list = GUIList()
        scroll_container.set_child(self.scene_list)
예제 #2
0
    def __init__(self):
        GUIFrame.__init__(self)
        self.components = None
        self.envedit_data = None

        # GUI settings
        self.bg_color = (0, 0, 0, 0.8)
        self.bbox.width = 300
        self.padding = 10

        master_layout = GUIDockLayout()
        self.set_child(master_layout)

        self.layout = GUIStackLayout()
        master_layout.set_child_dock(self.layout, GUIDockLayout.TOP)

        title = GUILabel()
        title.text_size = 30
        title.set_font(GUISystem.get_font("default_light"))
        title.set_text("Components")
        self.layout.add_child(title)

        spacer = GUIComponent()
        spacer.bbox.height = 20
        self.layout.add_child(spacer)

        self.add_component_dropdown = GUIDropdown()
        self.add_component_dropdown.child.set_text("Add Component...")

        scroll_container = GUIScrollContainer(scroll_v=True, scroll_h=True)
        master_layout.set_child_dock(scroll_container, GUIDockLayout.CENTER)

        self.component_layout = GUIStackLayout()
        scroll_container.set_child(self.component_layout)
예제 #3
0
파일: gui_label.py 프로젝트: Boxxfish/edenv
 def __init__(self):
     GUIFrame.__init__(self)
     self.text = ""
     self.font = GUISystem.get_font("default")
     self.text_color = (1, 1, 1, 1)
     self.bg_color = (1, 0, 1, 0)
     self.text_size = 12
     self.frame = None