Esempio n. 1
0
 def createDirectScrolledListItem(self, parent=None):
     if parent is None or parent.getName().split("-")[0] != "DirectScrolledList":
         base.messenger.send("showWarning", ["Scrolled List Items must be added to Scrolled Lists.\nPlease select a scrolled list first!"])
         return None
     if self.visEditorInAspect2D:
         element = DirectScrolledListItem(
             text="scrolled list item",
             parent=parent,
             command=base.messenger.send,
             extraArgs=["select_list_item_changed"],
             scale=0.1)
     else:
         element = DirectScrolledListItem(
             text="scrolled list item",
             text_scale=24,
             borderWidth=(2, 2),
             parent=parent,
             command=base.messenger.send,
             extraArgs=["select_list_item_changed"],
             scale=1)
     elementInfo = ElementInfo(element, "DirectScrolledListItem")
     elementInfo.command = "base.messenger.send"
     elementInfo.extraArgs = "'select_list_item_changed'"
     self.setupBind(elementInfo)
     return elementInfo
    def __init__(self, rootParent=None):

        self.pg456 = DirectScrolledList(
            forceHeight=0.1,
            frameSize=(-0.5, 0.5, -0.01, 0.75),
            hpr=LVecBase3f(0, 0, 0),
            numItemsVisible=5,
            pos=LPoint3f(0.025, 0, -0.175),
            state='normal',
            text='Developers',
            decButton_borderWidth=(0.005, 0.005),
            decButton_hpr=LVecBase3f(0, 0, 0),
            decButton_pos=LPoint3f(-0.45, 0, 0.03),
            decButton_state='disabled',
            decButton_text='Prev',
            decButton_text_align=TextNode.A_left,
            decButton_text_scale=(0.05, 0.05),
            decButton_text_pos=(0, 0),
            decButton_text_fg=LVecBase4f(0, 0, 0, 1),
            decButton_text_bg=LVecBase4f(0, 0, 0, 0),
            decButton_text_wordwrap=None,
            incButton_borderWidth=(0.005, 0.005),
            incButton_hpr=LVecBase3f(0, 0, 0),
            incButton_pos=LPoint3f(0.45, 0, 0.03),
            incButton_state='disabled',
            incButton_text='Next',
            incButton_text_align=TextNode.A_right,
            incButton_text_scale=(0.05, 0.05),
            incButton_text_pos=(0, 0),
            incButton_text_fg=LVecBase4f(0, 0, 0, 1),
            incButton_text_bg=LVecBase4f(0, 0, 0, 0),
            incButton_text_wordwrap=None,
            itemFrame_frameColor=(1, 1, 1, 1),
            itemFrame_frameSize=(-0.47, 0.47, -0.5, 0.1),
            itemFrame_hpr=LVecBase3f(0, 0, 0),
            itemFrame_pos=LPoint3f(0, 0, 0.6),
            text_align=TextNode.A_center,
            text_scale=(0.1, 0.1),
            text_pos=(0, 0.015),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=rootParent,
        )
        self.pg456.setTransparency(0)

        self.pg1135 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317,
                       -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Marcic_Admin',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg456,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg1135.setTransparency(0)

        self.pg1154 = DirectScrolledListItem(
            frameSize=(-4.831, 4.831, -0.213, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.1),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            state='disabled',
            text='panda3dmastercoder',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg456,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg1154.setTransparency(0)

        self.pg456.addItem(self.pg1135)
        self.pg456.addItem(self.pg1154)
    def __init__(self, rootParent=None):

        self.pg471 = DirectScrolledList(
            forceHeight=0.1,
            frameSize=(-0.5, 0.5, -0.01, 0.75),
            hpr=LVecBase3f(0, 0, 0),
            numItemsVisible=5,
            pos=LPoint3f(0.4, 0, 0.05),
            state='normal',
            text='CEPBEPA',
            decButton_borderWidth=(0.005, 0.005),
            decButton_hpr=LVecBase3f(0, 0, 0),
            decButton_pos=LPoint3f(-0.45, 0, 0.03),
            decButton_state='disabled',
            decButton_text='Prev',
            decButton_text_align=TextNode.A_left,
            decButton_text_scale=(0.05, 0.05),
            decButton_text_pos=(0, 0),
            decButton_text_fg=LVecBase4f(0, 0, 0, 1),
            decButton_text_bg=LVecBase4f(0, 0, 0, 0),
            decButton_text_wordwrap=None,
            incButton_borderWidth=(0.005, 0.005),
            incButton_hpr=LVecBase3f(0, 0, 0),
            incButton_pos=LPoint3f(0.45, 0, 0.03),
            incButton_text='Next',
            incButton_text_align=TextNode.A_right,
            incButton_text_scale=(0.05, 0.05),
            incButton_text_pos=(0, 0),
            incButton_text_fg=LVecBase4f(0, 0, 0, 1),
            incButton_text_bg=LVecBase4f(0, 0, 0, 0),
            incButton_text_wordwrap=None,
            itemFrame_frameColor=(1, 1, 1, 1),
            itemFrame_frameSize=(-0.47, 0.47, -0.5, 0.1),
            itemFrame_hpr=LVecBase3f(0, 0, 0),
            itemFrame_pos=LPoint3f(0, 0, 0.6),
            text_align=TextNode.A_center,
            text_scale=(0.1, 0.1),
            text_pos=(0, 0.015),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=rootParent,
        )
        self.pg471.setTransparency(0)

        self.pg820 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317,
                       -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Admin fun server.',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg471,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg820.setTransparency(0)

        self.pg839 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317,
                       -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.1),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Bosses of game',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg471,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg839.setTransparency(0)

        self.pg861 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317,
                       -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.2),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Hahahahha',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg471,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg861.setTransparency(0)

        self.pg886 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317,
                       -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.3),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Empty',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg471,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg886.setTransparency(0)

        self.pg914 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317,
                       -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.4),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            state='disabled',
            text='Empty',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg471,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg914.setTransparency(0)

        self.pg2484 = DirectEntry(
            frameSize=(-0.1, 10.1, -0.3962500154972076, 1.087500011920929),
            hpr=LVecBase3f(0, 0, 0),
            initialText='',
            pos=LPoint3f(-13.4, 0, -3.225),
            scale=LVecBase3f(1.5, 1.5, 1),
            text_align=TextNode.A_left,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg914,
        )
        self.pg2484.setTransparency(0)

        self.pg3545 = DirectButton(
            frameSize=(-2.3, 2.3, -0.213, 0.825),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(7.825, 0, -1.25),
            scale=LVecBase3f(1, 1, 1),
            text='D. connect',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg2484,
            command=self.load_game,
            pressEffect=1,
        )
        self.pg3545.setTransparency(0)

        self.pg945 = DirectScrolledListItem(
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='scrolled list item',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg471,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg945.setTransparency(0)

        self.pg471.addItem(self.pg820)
        self.pg471.addItem(self.pg839)
        self.pg471.addItem(self.pg861)
        self.pg471.addItem(self.pg886)
        self.pg471.addItem(self.pg914)
        self.pg471.addItem(self.pg945)
Esempio n. 4
0
    def __init__(self, USERNAME, rootParent=None):
        
        self.pg149 = DirectLabel(
            frameSize=(-1.149999976158142, 1.25, -0.11250001192092896, 0.7250000238418579),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0.525),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Top',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=rootParent,
        )
        self.pg149.setTransparency(0)

        self.pg1336 = DirectScrolledList(
            forceHeight=0.1,
            frameSize=(-0.5, 0.5, -0.01, 0.75),
            hpr=LVecBase3f(0, 0, 0),
            numItemsVisible=5,
            pos=LPoint3f(0.025, 0, -0.25),
            state='normal',
            text='scrolled list',
            decButton_borderWidth=(0.005, 0.005),
            decButton_hpr=LVecBase3f(0, 0, 0),
            decButton_pos=LPoint3f(-0.45, 0, 0.03),
            decButton_state='disabled',
            decButton_text='Prev',
            decButton_text_align=TextNode.A_left,
            decButton_text_scale=(0.05, 0.05),
            decButton_text_pos=(0, 0),
            decButton_text_fg=LVecBase4f(0, 0, 0, 1),
            decButton_text_bg=LVecBase4f(0, 0, 0, 0),
            decButton_text_wordwrap=None,
            incButton_borderWidth=(0.005, 0.005),
            incButton_hpr=LVecBase3f(0, 0, 0),
            incButton_pos=LPoint3f(0.45, 0, 0.03),
            incButton_state='disabled',
            incButton_text='Next',
            incButton_text_align=TextNode.A_right,
            incButton_text_scale=(0.05, 0.05),
            incButton_text_pos=(0, 0),
            incButton_text_fg=LVecBase4f(0, 0, 0, 1),
            incButton_text_bg=LVecBase4f(0, 0, 0, 0),
            incButton_text_wordwrap=None,
            itemFrame_frameColor=(1, 1, 1, 1),
            itemFrame_frameSize=(-0.47, 0.47, -0.5, 0.1),
            itemFrame_hpr=LVecBase3f(0, 0, 0),
            itemFrame_pos=LPoint3f(0, 0, 0.6),
            text_align=TextNode.A_center,
            text_scale=(0.1, 0.1),
            text_pos=(0, 0.015),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=rootParent,
        )
        self.pg1336.setTransparency(0)

        self.pg1693 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317, -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            state='disabled',
            text='Admin',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg1336,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg1693.setTransparency(0)

        self.pg1715 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317, -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.1),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='NFSMW',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg1336,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg1715.setTransparency(0)

        self.pg1740 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317, -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.2),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='|X_X|',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg1336,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg1740.setTransparency(0)

        self.pg1768 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317, -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.3),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text=USERNAME,
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg1336,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg1768.setTransparency(0)

        self.pg1799 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317, -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.4),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='.___.',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg1336,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg1799.setTransparency(0)

        self.pg1336.addItem(self.pg1693)
        self.pg1336.addItem(self.pg1715)
        self.pg1336.addItem(self.pg1740)
        self.pg1336.addItem(self.pg1768)
        self.pg1336.addItem(self.pg1799)
class GUI_3:
    def __init__(self, rootParent=None):

        self.pg149 = DirectLabel(
            frameSize=(-3.15, 3.25, -0.113, 0.725),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0.525),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Moderators',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=rootParent,
        )
        self.pg149.setTransparency(0)

        self.pg422 = DirectScrolledList(
            forceHeight=0.1,
            scale=LVecBase3f(10, 10, 10),
            frameSize=(-0.5, 0.5, -0.01, 0.75),
            hpr=LVecBase3f(0, 0, 0),
            numItemsVisible=5,
            pos=LPoint3f(0, 0, -7.9),
            state='normal',
            text='',
            decButton_borderWidth=(0.005, 0.005),
            decButton_hpr=LVecBase3f(0, 0, 0),
            decButton_pos=LPoint3f(-0.45, 0, 0.03),
            decButton_state='disabled',
            decButton_text='Prev',
            decButton_text_align=TextNode.A_left,
            decButton_text_scale=(0.05, 0.05),
            decButton_text_pos=(0, 0),
            decButton_text_fg=LVecBase4f(0, 0, 0, 1),
            decButton_text_bg=LVecBase4f(0, 0, 0, 0),
            decButton_text_wordwrap=None,
            incButton_borderWidth=(0.005, 0.005),
            incButton_hpr=LVecBase3f(0, 0, 0),
            incButton_pos=LPoint3f(0.45, 0, 0.03),
            incButton_state='disabled',
            incButton_text='Next',
            incButton_text_align=TextNode.A_right,
            incButton_text_scale=(0.05, 0.05),
            incButton_text_pos=(0, 0),
            incButton_text_fg=LVecBase4f(0, 0, 0, 1),
            incButton_text_bg=LVecBase4f(0, 0, 0, 0),
            incButton_text_wordwrap=None,
            itemFrame_frameColor=(1, 1, 1, 1),
            itemFrame_frameSize=(-0.47, 0.47, -0.5, 0.1),
            itemFrame_hpr=LVecBase3f(0, 0, 0),
            itemFrame_pos=LPoint3f(0, 0, 0.6),
            text_align=TextNode.A_center,
            text_scale=(0.1, 0.1),
            text_pos=(0, 0.015),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg149,
        )
        self.pg422.setTransparency(0)

        self.pg1117 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317,
                       -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            state='disabled',
            text='Marcic_Admin',
            text_align=TextNode.A_center,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg422,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg1118 = DirectScrolledListItem(
            frameSize=(-3.831250286102295, 3.9062500953674317,
                       -0.21250001192092896, 0.85),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            state='disabled',
            text='panda3dmastercoder',
            text_align=TextNode.A_center,
            text_scale=(0.8, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            text_wordwrap=None,
            parent=self.pg422,
            command=base.messenger.send,
            extraArgs=['select_list_item_changed'],
        )
        self.pg1117.setTransparency(0)

        self.pg422.addItem(self.pg1117)
        self.pg422.addItem(self.pg1118)

    def show(self):
        self.pg149.show()

    def hide(self):
        self.pg149.hide()

    def destroy(self):
        self.pg149.destroy()