Exemplo n.º 1
0
class GUI:
    def __init__(self, rootParent=None):
        
        self.frmChat = DirectFrame(
            frameColor=(0.25, 0.25, 0.25, 1.0),
            frameSize=(-0.4, 0.4, -1.25, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0),
            parent=rootParent,
        )
        self.frmChat.setTransparency(0)

        self.frmMessages = DirectScrolledFrame(
            borderWidth=(0.005, 0.005),
            canvasSize=(-0.38, 0.34, -1.2, 0.0),
            frameColor=(1, 1, 1, 1),
            frameSize=(-0.38, 0.38, -1.0, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.1),
            relief=3,
            scrollBarWidth=0.03,
            state='normal',
            horizontalScroll_borderWidth=(0.01, 0.01),
            horizontalScroll_frameSize=(-0.05, 0.05, -0.015, 0.015),
            horizontalScroll_hpr=LVecBase3f(0, 0, 0),
            horizontalScroll_pos=LPoint3f(0, 0, 0),
            horizontalScroll_decButton_borderWidth=(0.01, 0.01),
            horizontalScroll_decButton_frameSize=(-0.05, 0.05, -0.04, 0.04),
            horizontalScroll_decButton_hpr=LVecBase3f(0, 0, 0),
            horizontalScroll_decButton_pos=LPoint3f(0, 0, 0),
            horizontalScroll_incButton_borderWidth=(0.01, 0.01),
            horizontalScroll_incButton_frameSize=(-0.05, 0.05, -0.04, 0.04),
            horizontalScroll_incButton_hpr=LVecBase3f(0, 0, 0),
            horizontalScroll_incButton_pos=LPoint3f(0, 0, 0),
            horizontalScroll_thumb_borderWidth=(0.01, 0.01),
            horizontalScroll_thumb_hpr=LVecBase3f(0, 0, 0),
            horizontalScroll_thumb_pos=LPoint3f(0, 0, 0),
            verticalScroll_borderWidth=(0.01, 0.01),
            verticalScroll_frameSize=(-0.015, 0.015, -0.05, 0.05),
            verticalScroll_hpr=LVecBase3f(0, 0, 0),
            verticalScroll_pos=LPoint3f(0, 0, 0),
            verticalScroll_decButton_borderWidth=(0.01, 0.01),
            verticalScroll_decButton_frameSize=(-0.04, 0.04, -0.05, 0.05),
            verticalScroll_decButton_hpr=LVecBase3f(0, 0, 0),
            verticalScroll_decButton_pos=LPoint3f(0.36, 0, -0.02),
            verticalScroll_incButton_borderWidth=(0.01, 0.01),
            verticalScroll_incButton_frameSize=(-0.04, 0.04, -0.05, 0.05),
            verticalScroll_incButton_hpr=LVecBase3f(0, 0, 0),
            verticalScroll_incButton_pos=LPoint3f(0.36, 0, -0.98),
            verticalScroll_thumb_borderWidth=(0.01, 0.01),
            verticalScroll_thumb_hpr=LVecBase3f(0, 0, 0),
            verticalScroll_thumb_pos=LPoint3f(0.36, 0, -0.418625),
            parent=self.frmChat,
        )
        self.frmMessages.setTransparency(0)

        self.txtMessage = DirectEntry(
            borderWidth=(0.005, 0.005),
            frameColor=(1.0, 1.0, 1.0, 1.0),
            hpr=LVecBase3f(0, 0, 0),
            overflow=1,
            pos=LPoint3f(-0.375, 0, -1.195),
            relief=3,
            scale=LVecBase3f(0.045, 0.045, 0.045),
            width=14.0,
            text_align=TextNode.A_left,
            text_scale=(1.0, 1.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmChat,
        )
        self.txtMessage.setTransparency(0)

        self.btnSend = DirectButton(
            frameColor=(0.0, 0.0, 0.0, 0.0),
            frameSize=(-0.4, 0.4, -0.4, 0.4),
            hpr=LVecBase3f(0, 0, 0),
            image='assets/chat/ChatSend.png',
            pos=LPoint3f(0.33, 0, -1.18),
            relief=1,
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='',
            image_scale=LVecBase3f(0.4, 1, 0.4),
            image_pos=LPoint3f(0, 0, 0),
            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),
            parent=self.frmChat,
            command=base.messenger.send,
            extraArgs=["sendMessage"],
        )
        self.btnSend.setTransparency(1)

        self.btnToggleChat = DirectButton(
            frameColor=(0.15, 0.15, 0.15, 1.0),
            frameSize=(-0.4, 0.4, -0.02, 0.05),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.05),
            relief=1,
            scale=LVecBase3f(1, 1, 1),
            text='Toggle Chat',
            text_align=TextNode.A_center,
            text_scale=(0.05, 0.05),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0.8, 0.8, 0.8, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=rootParent,
            command=base.messenger.send,
            extraArgs=["toggleChat"],
        )
        self.btnToggleChat.setTransparency(0)


    def show(self):
        self.frmChat.show()
        self.btnToggleChat.show()

    def hide(self):
        self.frmChat.hide()
        self.btnToggleChat.hide()

    def destroy(self):
        self.frmChat.destroy()
        self.btnToggleChat.destroy()
class GUI_server:
    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)

    def show(self):
        self.pg471.show()

    def hide(self):
        self.pg471.hide()

    def destroy(self):
        self.pg471.destroy()
Exemplo n.º 3
0
class GUI:
    def __init__(self, rootParent=None):

        self.frmMain = DirectFrame(
            frameColor=(1, 1, 1, 1),
            frameSize=(-1.777, 1.777, -1.0, 1.0),
            hpr=LVecBase3f(0, 0, 0),
            image='assets/menu/Background.png',
            pos=LPoint3f(0, 0, 0),
            image_scale=LVecBase3f(1.77778, 0, 1.1638),
            image_pos=LPoint3f(0, 0, 0),
            parent=rootParent,
        )
        self.frmMain.setTransparency(0)

        self.lblptions = DirectLabel(
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0.8),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Options',
            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),
            parent=self.frmMain,
        )
        self.lblptions.setTransparency(0)

        self.lblServer = DirectLabel(
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-0.75, 0, 0.175),
            scale=LVecBase3f(1, 1, 1),
            text='Game Server URL:',
            text_align=TextNode.A_left,
            text_scale=(0.05, 0.05),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.lblServer.setTransparency(0)

        self.btnOk = DirectButton(
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-0.375, 0, -0.775),
            relief=1,
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Ok',
            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),
            parent=self.frmMain,
            command=base.messenger.send,
            extraArgs=["options_ok"],
            pressEffect=1,
        )
        self.btnOk.setTransparency(0)

        self.btnCancel = DirectButton(
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0.275, 0, -0.775),
            relief=1,
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Cancel',
            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),
            parent=self.frmMain,
            command=base.messenger.send,
            extraArgs=["options_cancel"],
            pressEffect=1,
        )
        self.btnCancel.setTransparency(0)

        self.txtServer = DirectEntry(
            borderWidth=(0.01, 0.01),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-0.15, 0, 0.17),
            scale=LVecBase3f(1, 1, 1),
            width=25.0,
            text_align=TextNode.A_left,
            text_scale=(0.05, 0.05),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.txtServer.setTransparency(0)

        self.cbMusic = DirectCheckButton(
            frameSize=(-3.0, 2.0, -0.3, 1.0),
            hpr=LVecBase3f(0, 0, 0),
            indicatorValue=1,
            pos=LPoint3f(0, 0, -0.21),
            scale=LVecBase3f(0.05, 0.1, 0.05),
            text='Music',
            indicator_hpr=LVecBase3f(0, 0, 0),
            indicator_pos=LPoint3f(-2.625, 0, 0.05),
            indicator_relief='sunken',
            indicator_text_align=TextNode.A_center,
            indicator_text_scale=(1, 1),
            indicator_text_pos=(0, -0.2),
            indicator_text_fg=LVecBase4f(0, 0, 0, 1),
            indicator_text_bg=LVecBase4f(0, 0, 0, 0),
            text_align=TextNode.A_center,
            text_scale=(1.0, 1.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.cbMusic.setTransparency(0)

        self.cbSFX = DirectCheckButton(
            frameSize=(-3.0, 2.0, -0.3, 1.0),
            hpr=LVecBase3f(0, 0, 0),
            indicatorValue=1,
            pos=LPoint3f(0, 0, -0.315),
            scale=LVecBase3f(0.05, 0.1, 0.05),
            text='SFX',
            indicator_hpr=LVecBase3f(0, 0, 0),
            indicator_pos=LPoint3f(-2.625, 0, 0.05),
            indicator_relief='sunken',
            indicator_text_align=TextNode.A_center,
            indicator_text_scale=(1, 1),
            indicator_text_pos=(0, -0.2),
            indicator_text_fg=LVecBase4f(0, 0, 0, 1),
            indicator_text_bg=LVecBase4f(0, 0, 0, 0),
            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),
            parent=self.frmMain,
        )
        self.cbSFX.setTransparency(0)

        self.lblAudio = DirectLabel(
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, -0.1),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Audio',
            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),
            parent=self.frmMain,
        )
        self.lblAudio.setTransparency(0)

        self.lblConnection = DirectLabel(
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0.3),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Connection',
            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),
            parent=self.frmMain,
        )
        self.lblConnection.setTransparency(0)

    def show(self):
        self.frmMain.show()

    def hide(self):
        self.frmMain.hide()

    def destroy(self):
        self.frmMain.destroy()
Exemplo n.º 4
0
class GUI:
    def __init__(self, rootParent=None):

        self.frmMain = DirectFrame(
            borderWidth=(2, 2),
            frameColor=(1, 1, 1, 1),
            frameSize=(-300.0, 300.0, -250.0, 250.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0),
            parent=rootParent,
        )
        self.frmMain.setTransparency(0)

        self.frmHeader = DirectFrame(
            borderWidth=(2, 2),
            frameColor=(0.25, 0.25, 0.25, 1.0),
            frameSize=(-300.0, 300.0, -20.0, 20.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 230),
            parent=self.frmMain,
        )
        self.frmHeader.setTransparency(0)

        self.lblHeader = DirectLabel(
            borderWidth=(2, 2),
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-295, 0, -5),
            scale=LVecBase3f(1, 1, 1),
            text='Settings',
            text_align=TextNode.A_left,
            text_scale=(16.0, 16.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(1, 1, 1, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmHeader,
        )
        self.lblHeader.setTransparency(0)

        self.btnOk = DirectButton(
            borderWidth=(2, 2),
            frameSize=(-45.0, 45.0, -6.0, 14.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(120, 0, -220),
            relief=1,
            scale=LVecBase3f(1, 1, 1),
            text='OK',
            text_align=TextNode.A_center,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
            command=messenger.send,
            extraArgs=["Settings_OK"],
        )
        self.btnOk.setTransparency(0)

        self.btnCancel = DirectButton(
            borderWidth=(2, 2),
            frameSize=(-45.0, 45.0, -6.0, 14.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(230, 0, -220),
            relief=1,
            scale=LVecBase3f(1, 1, 1),
            text='Cancel',
            text_align=TextNode.A_center,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
            command=messenger.send,
            extraArgs=["Settings_CANCEL"],
        )
        self.btnCancel.setTransparency(0)

        self.lblCustomWidgets = DirectLabel(
            borderWidth=(2, 2),
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-260, 0, 5),
            scale=LVecBase3f(1, 1, 1),
            text='Custom widgets path:',
            text_align=TextNode.A_left,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.lblCustomWidgets.setTransparency(0)

        self.txtCustomWidgetsPath = DirectEntry(
            borderWidth=(0.167, 0.167),
            hpr=LVecBase3f(0, 0, 0),
            overflow=1,
            pos=LPoint3f(-50, 0, 5),
            scale=LVecBase3f(12, 1, 12),
            width=18.0,
            text_align=TextNode.A_left,
            text_scale=(1.0, 1.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.txtCustomWidgetsPath.setTransparency(0)

        self.lblAskForQuit = DirectLabel(
            borderWidth=(2, 2),
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-260, 0, 140),
            scale=LVecBase3f(1, 1, 1),
            text='Ask before quit:',
            text_align=TextNode.A_left,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.lblAskForQuit.setTransparency(0)

        self.cbAskForQuit = DirectCheckButton(
            borderWidth=(2, 2),
            frameColor=(1.0, 1.0, 1.0, 1.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(110, 0, 145),
            scale=LVecBase3f(1, 1, 1),
            text='',
            indicator_borderWidth=(2, 2),
            indicator_hpr=LVecBase3f(0, 0, 0),
            indicator_pos=LPoint3f(-11, 0, -7.2),
            indicator_relief='sunken',
            indicator_text_align=TextNode.A_center,
            indicator_text_scale=(24, 24),
            indicator_text_pos=(0, -0.2),
            indicator_text_fg=LVecBase4f(0, 0, 0, 1),
            indicator_text_bg=LVecBase4f(0, 0, 0, 0),
            text_align=TextNode.A_left,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.cbAskForQuit.setTransparency(0)

        self.lblExecutableScripts = DirectLabel(
            borderWidth=(2, 2),
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-260, 0, 95),
            scale=LVecBase3f(1, 1, 1),
            text='Create executable Scripts:',
            text_align=TextNode.A_left,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.lblExecutableScripts.setTransparency(0)

        self.cbExecutableScripts = DirectCheckButton(
            borderWidth=(2, 2),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(110, 0, 100),
            scale=LVecBase3f(1, 1, 1),
            text='',
            indicator_borderWidth=(2, 2),
            indicator_hpr=LVecBase3f(0, 0, 0),
            indicator_pos=LPoint3f(-11, 0, -7.2),
            indicator_relief='sunken',
            indicator_text_align=TextNode.A_center,
            indicator_text_scale=(24, 24),
            indicator_text_pos=(0, -0.2),
            indicator_text_fg=LVecBase4f(0, 0, 0, 1),
            indicator_text_bg=LVecBase4f(0, 0, 0, 0),
            text_align=TextNode.A_center,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.cbExecutableScripts.setTransparency(0)

        self.btnBrowseWidgetPath = DirectButton(
            borderWidth=(2, 2),
            frameSize=(-45.25, 45.25, -6.0, 14.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(230, 0, 5),
            relief=1,
            scale=LVecBase3f(1, 1, 1),
            text='Browse',
            text_align=TextNode.A_center,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.btnBrowseWidgetPath.setTransparency(0)

        self.lblShowToolbar = DirectLabel(
            borderWidth=(2, 2),
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-260, 0, 50),
            scale=LVecBase3f(1, 1, 1),
            text='Show toolbar',
            text_align=TextNode.A_left,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.lblShowToolbar.setTransparency(0)

        self.cbShowToolbar = DirectCheckButton(
            borderWidth=(2, 2),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(110, 0, 55),
            scale=LVecBase3f(1, 1, 1),
            text='',
            indicator_borderWidth=(2, 2),
            indicator_hpr=LVecBase3f(0, 0, 0),
            indicator_pos=LPoint3f(-11, 0, -7.2),
            indicator_relief='sunken',
            indicator_text_align=TextNode.A_center,
            indicator_text_scale=(24, 24),
            indicator_text_pos=(0, -0.2),
            indicator_text_fg=LVecBase4f(0, 0, 0, 1),
            indicator_text_bg=LVecBase4f(0, 0, 0, 0),
            text_align=TextNode.A_center,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.cbShowToolbar.setTransparency(0)

        self.lblSearchPath = DirectLabel(
            borderWidth=(2, 2),
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-260, 0, -45),
            scale=LVecBase3f(1, 1, 1),
            text='Search paths',
            text_align=TextNode.A_left,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.lblSearchPath.setTransparency(0)

        self.txtSearchPaths = DirectEntry(
            borderWidth=(0.167, 0.167),
            frameSize=(-0.167, 18.167, -0.463, 1.155),
            hpr=LVecBase3f(0, 0, 0),
            overflow=1,
            pos=LPoint3f(-50, 0, -45),
            scale=LVecBase3f(12, 1, 12),
            width=18.0,
            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),
            parent=self.frmMain,
        )
        self.txtSearchPaths.setTransparency(0)

        self.btnBrowseSearchPaths = DirectButton(
            borderWidth=(2, 2),
            frameSize=(-45.25, 45.25, -6.0, 14.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(230, 0, -45),
            relief=1,
            scale=LVecBase3f(1, 1, 1),
            text='Browse',
            text_align=TextNode.A_center,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.btnBrowseSearchPaths.setTransparency(0)

        self.lblWorkDir = DirectLabel(
            borderWidth=(2, 2),
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-260, 0, -95),
            scale=LVecBase3f(1, 1, 1),
            text='Default work directory',
            text_align=TextNode.A_left,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
        )
        self.lblWorkDir.setTransparency(0)

        self.txtWorkDir = DirectEntry(
            borderWidth=(0.08333333333333333, 0.08333333333333333),
            hpr=LVecBase3f(0, 0, 0),
            overflow=1,
            pos=LPoint3f(-50, 0, -95),
            scale=LVecBase3f(12, 1, 12),
            width=18.0,
            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),
            parent=self.frmMain,
        )
        self.txtWorkDir.setTransparency(0)

        self.btnBrowseWorkDir = DirectButton(
            borderWidth=(2, 2),
            frameSize=(-45.25, 45.25, -6.0, 14.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(230, 0, -95),
            relief=1,
            scale=LVecBase3f(1, 1, 1),
            text='Browse',
            text_align=TextNode.A_center,
            text_scale=(12.0, 12.0),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmMain,
            pressEffect=1,
        )
        self.btnBrowseWorkDir.setTransparency(0)

        self.spinAutosaveDealy = DirectSpinBox(
            frameSize=(-2.1, 1.0, -0.742, 0.742),
            hpr=LVecBase3f(0, 0, 0),
            maxValue=3600,
            minValue=10,
            pos=LPoint3f(105, 0, -140),
            value=60,
            scale=LVecBase3f(12, 1, 12),
            decButton_hpr=LVecBase3f(0, 0, 0),
            decButton_pos=LPoint3f(0.583333, 0, -0.533333),
            decButton_text='6',
            decButton_text0_align=TextNode.A_center,
            decButton_text0_scale=(1, 1),
            decButton_text0_pos=(0, 0),
            decButton_text0_fg=LVecBase4f(0, 0, 0, 1),
            decButton_text0_bg=LVecBase4f(0, 0, 0, 0),
            decButton_text0_wordwrap=None,
            decButton_text1_align=TextNode.A_center,
            decButton_text1_scale=(1, 1),
            decButton_text1_pos=(0, 0),
            decButton_text1_fg=LVecBase4f(0, 0, 0, 1),
            decButton_text1_bg=LVecBase4f(0, 0, 0, 0),
            decButton_text1_wordwrap=None,
            decButton_text2_align=TextNode.A_center,
            decButton_text2_scale=(1, 1),
            decButton_text2_pos=(0, 0),
            decButton_text2_fg=LVecBase4f(0, 0, 0, 1),
            decButton_text2_bg=LVecBase4f(0, 0, 0, 0),
            decButton_text2_wordwrap=None,
            decButton_text3_align=TextNode.A_center,
            decButton_text3_scale=(1, 1),
            decButton_text3_pos=(0, 0),
            decButton_text3_fg=LVecBase4f(0, 0, 0, 1),
            decButton_text3_bg=LVecBase4f(0, 0, 0, 0),
            decButton_text3_wordwrap=None,
            incButton_hpr=LVecBase3f(0, 0, 0),
            incButton_pos=LPoint3f(0.583333, 0, -0.016667),
            incButton_text='5',
            incButton_text0_align=TextNode.A_center,
            incButton_text0_scale=(1, 1),
            incButton_text0_pos=(0, 0),
            incButton_text0_fg=LVecBase4f(0, 0, 0, 1),
            incButton_text0_bg=LVecBase4f(0, 0, 0, 0),
            incButton_text0_wordwrap=None,
            incButton_text1_align=TextNode.A_center,
            incButton_text1_scale=(1, 1),
            incButton_text1_pos=(0, 0),
            incButton_text1_fg=LVecBase4f(0, 0, 0, 1),
            incButton_text1_bg=LVecBase4f(0, 0, 0, 0),
            incButton_text1_wordwrap=None,
            incButton_text2_align=TextNode.A_center,
            incButton_text2_scale=(1, 1),
            incButton_text2_pos=(0, 0),
            incButton_text2_fg=LVecBase4f(0, 0, 0, 1),
            incButton_text2_bg=LVecBase4f(0, 0, 0, 0),
            incButton_text2_wordwrap=None,
            incButton_text3_align=TextNode.A_center,
            incButton_text3_scale=(1, 1),
            incButton_text3_pos=(0, 0),
            incButton_text3_fg=LVecBase4f(0, 0, 0, 1),
            incButton_text3_bg=LVecBase4f(0, 0, 0, 0),
            incButton_text3_wordwrap=None,
            valueEntry_hpr=LVecBase3f(0, 0, 0),
            valueEntry_initialText='60',
            valueEntry_pos=LPoint3f(0, 0, -0.345625),
            valueEntry_text_align=TextNode.A_right,
            valueEntry_text_scale=(1, 1),
            valueEntry_text_pos=(0, 0),
            valueEntry_text_fg=LVecBase4f(0, 0, 0, 1),
            valueEntry_text_bg=LVecBase4f(0, 0, 0, 0),
            valueEntry_text_wordwrap=None,
            parent=self.frmMain,
        )
        self.spinAutosaveDealy.setTransparency(0)

        self.lblAutosaveDelay = DirectLabel(
            borderWidth=(2, 2),
            frameColor=(0.8, 0.8, 0.8, 0.0),
            frameSize=LVecBase4f(0.3, 84.45, -3.9, 8.7),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-260, 0, -140),
            scale=LVecBase3f(1, 1, 1),
            text='Autosave delay in seconds',
            text0_align=TextNode.A_left,
            text0_scale=(12.0, 12.0),
            text0_pos=(0, 0),
            text0_fg=LVecBase4f(0, 0, 0, 1),
            text0_bg=LVecBase4f(0, 0, 0, 0),
            text0_wordwrap=None,
            parent=self.frmMain,
        )
        self.lblAutosaveDelay.setTransparency(0)

    def show(self):
        self.frmMain.show()

    def hide(self):
        self.frmMain.hide()

    def destroy(self):
        self.frmMain.destroy()
Exemplo n.º 5
0
class GUI:
    def __init__(self, rootParent=None):
        
        self.frmCreateRoom = DirectFrame(
            borderWidth=(0.01, 0.01),
            frameColor=(1, 1, 1, 1),
            frameSize=(-0.65, 0.65, -0.55, 0.55),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0),
            relief=5,
            parent=rootParent,
        )
        self.frmCreateRoom.setTransparency(0)

        self.btnOk = DirectButton(
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-0.425, 0, -0.45),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='OK',
            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),
            parent=self.frmCreateRoom,
            command=base.messenger.send,
            extraArgs=["createRoom_Ok"],
        )
        self.btnOk.setTransparency(0)

        self.btnCancel = DirectButton(
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0.4, 0, -0.45),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Cancel',
            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),
            parent=self.frmCreateRoom,
            command=base.messenger.send,
            extraArgs=["createRoom_Cancel"],
        )
        self.btnCancel.setTransparency(0)

        self.pg1640 = DirectLabel(
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0, 0, 0.425),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Create New Room',
            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),
            parent=self.frmCreateRoom,
        )
        self.pg1640.setTransparency(0)

        self.pg2148 = DirectLabel(
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-0.05, 0, 0.24),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Room Name',
            text_align=TextNode.A_right,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmCreateRoom,
        )
        self.pg2148.setTransparency(0)

        self.pg2173 = DirectLabel(
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-0.05, 0, 0.065),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='# of Players',
            text_align=TextNode.A_right,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmCreateRoom,
        )
        self.pg2173.setTransparency(0)

        self.pg2201 = DirectLabel(
            frameColor=(0.8, 0.8, 0.8, 0.0),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-0.05, 0, -0.115),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Game Type',
            text_align=TextNode.A_right,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmCreateRoom,
        )
        self.pg2201.setTransparency(0)

        self.entryRoomName = DirectEntry(
            hpr=LVecBase3f(0, 0, 0),
            overflow=1,
            pos=LPoint3f(0.08, 0, 0.25),
            scale=LVecBase3f(0.05, 0.1, 0.05),
            width=8.0,
            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),
            parent=self.frmCreateRoom,
        )
        self.entryRoomName.setTransparency(0)

        self.optionNumPlayers = DirectOptionMenu(
            items=['item1'],
            frameSize=(0.07500000298023224, 3.012500149011612, -0.11250001192092896, 0.75),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0.175, 0, 0.06),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='item1',
            cancelframe_frameSize=(-1, 1, -1, 1),
            cancelframe_hpr=LVecBase3f(0, 0, 0),
            cancelframe_pos=LPoint3f(0, 0, 0),
            cancelframe_relief=None,
            item_frameSize=(0.07500000298023224, 2.4125001430511475, -0.11250001192092896, 0.75),
            item_hpr=LVecBase3f(0, 0, 0),
            item_pos=LPoint3f(-0.075, 0, -0.75),
            item_text='item1',
            item0_text_align=TextNode.A_left,
            item0_text_scale=(1, 1),
            item0_text_pos=(0, 0),
            item0_text_fg=LVecBase4f(0, 0, 0, 1),
            item0_text_bg=LVecBase4f(0, 0, 0, 0),
            popupMarker_frameSize=(-0.5, 0.5, -0.2, 0.2),
            popupMarker_hpr=LVecBase3f(0, 0, 0),
            popupMarker_pos=LPoint3f(2.7125, 0, 0.31875),
            popupMarker_relief=2,
            popupMarker_scale=LVecBase3f(0.4, 0.4, 0.4),
            popupMenu_frameSize=(0, 2.3375001400709152, -0.862500011920929, 0),
            popupMenu_hpr=LVecBase3f(0, 0, 0),
            popupMenu_pos=LPoint3f(0, 0, 0),
            popupMenu_relief='raised',
            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),
            parent=self.frmCreateRoom,
        )
        self.optionNumPlayers.setTransparency(0)

        self.optionGameType = DirectOptionMenu(
            items=['item1'],
            frameSize=(0.07500000298023224, 3.012500149011612, -0.11250001192092896, 0.75),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0.175, 0, -0.125),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='item1',
            cancelframe_frameSize=(-1, 1, -1, 1),
            cancelframe_hpr=LVecBase3f(0, 0, 0),
            cancelframe_pos=LPoint3f(0, 0, 0),
            cancelframe_relief=None,
            item_frameSize=(0.07500000298023224, 2.4125001430511475, -0.11250001192092896, 0.75),
            item_hpr=LVecBase3f(0, 0, 0),
            item_pos=LPoint3f(-0.075, 0, -0.75),
            item_text='item1',
            item0_text_align=TextNode.A_left,
            item0_text_scale=(1, 1),
            item0_text_pos=(0, 0),
            item0_text_fg=LVecBase4f(0, 0, 0, 1),
            item0_text_bg=LVecBase4f(0, 0, 0, 0),
            popupMarker_frameSize=(-0.5, 0.5, -0.2, 0.2),
            popupMarker_hpr=LVecBase3f(0, 0, 0),
            popupMarker_pos=LPoint3f(2.7125, 0, 0.31875),
            popupMarker_relief=2,
            popupMarker_scale=LVecBase3f(0.4, 0.4, 0.4),
            popupMenu_frameSize=(0, 2.3375001400709152, -0.862500011920929, 0),
            popupMenu_hpr=LVecBase3f(0, 0, 0),
            popupMenu_pos=LPoint3f(0, 0, 0),
            popupMenu_relief='raised',
            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),
            parent=self.frmCreateRoom,
        )
        self.optionGameType.setTransparency(0)

        self.pg629 = DirectLabel(
            frameColor=(0.8, 0.8, 0.8, 0.0),
            frameSize=(-1.15, 1.25, -0.113, 0.725),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(-0.055, 0, -0.3),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='Difficulty',
            text_align=TextNode.A_right,
            text_scale=(1, 1),
            text_pos=(0, 0),
            text_fg=LVecBase4f(0, 0, 0, 1),
            text_bg=LVecBase4f(0, 0, 0, 0),
            parent=self.frmCreateRoom,
        )
        self.pg629.setTransparency(0)

        self.optionDifficulty = DirectOptionMenu(
            items=['item1'],
            frameSize=(0.1, 3.013, -0.113, 0.75),
            hpr=LVecBase3f(0, 0, 0),
            pos=LPoint3f(0.175, 0, -0.305),
            scale=LVecBase3f(0.1, 0.1, 0.1),
            text='item1',
            cancelframe_frameSize=(-1, 1, -1, 1),
            cancelframe_hpr=LVecBase3f(0, 0, 0),
            cancelframe_pos=LPoint3f(0, 0, 0),
            cancelframe_relief=None,
            item_frameSize=(0.07500000298023224, 2.4125001430511475, -0.11250001192092896, 0.75),
            item_hpr=LVecBase3f(0, 0, 0),
            item_pos=LPoint3f(-0.075, 0, -0.75),
            item_text='item1',
            item0_text_align=TextNode.A_left,
            item0_text_scale=(1, 1),
            item0_text_pos=(0, 0),
            item0_text_fg=LVecBase4f(0, 0, 0, 1),
            item0_text_bg=LVecBase4f(0, 0, 0, 0),
            popupMarker_frameSize=(-0.5, 0.5, -0.2, 0.2),
            popupMarker_hpr=LVecBase3f(0, 0, 0),
            popupMarker_pos=LPoint3f(2.7125, 0, 0.31875),
            popupMarker_relief=2,
            popupMarker_scale=LVecBase3f(0.4, 0.4, 0.4),
            popupMenu_frameSize=(0, 2.3375001400709152, -0.862500011920929, 0),
            popupMenu_hpr=LVecBase3f(0, 0, 0),
            popupMenu_pos=LPoint3f(0, 0, 0),
            popupMenu_relief='raised',
            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),
            parent=self.frmCreateRoom,
        )
        self.optionDifficulty.setTransparency(0)


    def show(self):
        self.frmCreateRoom.show()

    def hide(self):
        self.frmCreateRoom.hide()

    def destroy(self):
        self.frmCreateRoom.destroy()