def openFileDialog(self):
        """ Opens the file explorer dialog.
    """
        self.dialog = guiobjects.OcempPanel(373, 372, [528, 100], GG.utils.UPLOAD_BACKGROUND)
        self.dialog.zOrder = 10000
        self.listDir = guiobjects.OcempImageFileList(310, 239)
        self.listDir.topleft = 31, 60
        self.dialog.add_child(self.listDir)
        buttonOK = guiobjects.createButton(
            GG.utils.OK_BUTTON_IMAGE,
            [233, 308],
            ["aceptar", self.showTooltip, self.removeTooltip],
            self.closeFileDialog,
            "OK",
        )
        self.dialog.add_child(buttonOK)
        buttonCancel = guiobjects.createButton(
            GG.utils.CANCEL_BUTTON_IMAGE,
            [122, 308],
            ["cerrar", self.showTooltip, self.removeTooltip],
            self.closeFileDialog,
            "KO",
        )

        self.dialog.add_child(buttonCancel)
        self.hud.addSprite(self.dialog)
        self.hud.widgetContainer.add_widget(self.dialog)
 def __paintButtons(self):
   """ Paints the exchangeWindow buttons.
   """  
   buttonOK = guiobjects.createButton(BUTTON_OK, [240, 100], ["Aceptar", self.showTooltip, self.removeTooltip], self.okExchange)
   self.container.add_child(buttonOK)
   buttonCancel = guiobjects.createButton(BUTTON_CANCEL, [240, 180], ["Cancelar", self.showTooltip, self.removeTooltip], self.koExchange)
   self.container.add_child(buttonCancel)
Beispiel #3
0
 def draw(self):
     """ Draws the item parts on screen.
 """
     self.window = guiobjects.OcempPanel(150, 300,
                                         [GG.utils.SCREEN_SZ[0] - 151, 129],
                                         GG.utils.ADMIN_ACTIONS_BACKGROUND)
     titleLabel = guiobjects.OcempLabel(self.title,
                                        guiobjects.STYLES["teleportLabel"])
     titleLabel.topleft = 4, 0
     self.window.add_child(titleLabel)
     self.listItems = guiobjects.OcempImageObjectList(
         110, 205, self.listItems)
     self.listItems.topleft = 20, 40
     self.window.add_child(self.listItems)
     okButton = guiobjects.createButton(
         GG.utils.TINY_OK_IMAGE, [10, 262],
         [self.tooltipLabel, self.showTooltip, self.removeTooltip],
         self.accept)
     self.window.add_child(okButton)
     cancelButton = guiobjects.createButton(
         GG.utils.TINY_CANCEL_IMAGE, [80, 262],
         ["Cerrar menu", self.showTooltip, self.removeTooltip],
         self.showOrHide)
     self.window.add_child(cancelButton)
     self.window.zOrder = 10000
 def __paintButtons(self):
     """ Paints the exchangeWindow buttons.
 """
     buttonOK = guiobjects.createButton(
         BUTTON_OK, [240, 100],
         ["Aceptar", self.showTooltip, self.removeTooltip], self.okExchange)
     self.container.add_child(buttonOK)
     buttonCancel = guiobjects.createButton(
         BUTTON_CANCEL, [240, 180],
         ["Cancelar", self.showTooltip, self.removeTooltip],
         self.koExchange)
     self.container.add_child(buttonCancel)
Beispiel #5
0
 def __paintButtons(self):
     """ Paints modify and discard buttons on screen.
 """
     editButton = guiobjects.createButton(
         GG.utils.TINY_OK_IMAGE, [50, 230],
         ["Modificar habitación", self.showTooltip, self.removeTooltip],
         self.applyEditRoom)
     self.container.add_child(editButton)
     cancelButton = guiobjects.createButton(
         GG.utils.TINY_CANCEL_IMAGE, [180, 230],
         ["Descartar edición", self.showTooltip, self.removeTooltip],
         self.discardEditRoom)
     self.container.add_child(cancelButton)
     self.container.zOrder = 10000
    def __paintButtons(self):
        """ Paints the control buttons on screen.
    """
        createButton = guiobjects.createButton(
            GG.utils.TINY_OK_IMAGE, [20, 340], ["Crear objeto", self.showTooltip, self.removeTooltip], self.accept
        )
        self.container.add_child(createButton)

        defaultButton = guiobjects.createButton(
            GG.utils.TINY_CANCEL_IMAGE,
            [90, 340],
            ["Restaurar valores por defecto", self.showTooltip, self.removeTooltip],
            self.__restoreDefault,
        )
        self.container.add_child(defaultButton)
Beispiel #7
0
    def __paintButtons(self):
        """ Paints the control buttons on screen.
    """
        createButton = guiobjects.createButton(
            GG.utils.TINY_OK_IMAGE, [20, 340],
            ["Crear objeto", self.showTooltip, self.removeTooltip],
            self.accept)
        self.container.add_child(createButton)

        defaultButton = guiobjects.createButton(
            GG.utils.TINY_CANCEL_IMAGE, [90, 340], [
                "Restaurar valores por defecto", self.showTooltip,
                self.removeTooltip
            ], self.__restoreDefault)
        self.container.add_child(defaultButton)
 def __paintButtons(self):
     """ Paints the control buttons on screen.
 """
     createButton = guiobjects.createButton(
         GG.utils.TINY_OK_IMAGE, [150, 275], ["Crear habitación", self.showTooltip, self.removeTooltip], self.accept
     )
     self.container.add_child(createButton)
 def __paintSendButton(self):
     """ Paints the broadcast send message button.
 """
     sendButton = guiobjects.createButton(
         GG.utils.TINY_OK_IMAGE, [120, 80], ["Enviar mensaje", self.showTooltip, self.removeTooltip], self.accept
     )
     self.container.add_child(sendButton)
Beispiel #10
0
 def __paintDeleteButton(self):
     """ Paints the delete button.
 """
     deleteButton = guiobjects.createButton(
         DELETE_CONTACT_IMAGE, [20, 315],
         ["Eliminar contacto", self.showTooltip, self.removeTooltip],
         self.accept)
     self.container.add_child(deleteButton)
Beispiel #11
0
 def __paintSendButton(self):
     """ Paints the broadcast send message button.
 """
     sendButton = guiobjects.createButton(
         GG.utils.TINY_OK_IMAGE, [120, 80],
         ["Enviar mensaje", self.showTooltip, self.removeTooltip],
         self.accept)
     self.container.add_child(sendButton)
Beispiel #12
0
 def __paintButtons(self):
     """ Paints the control buttons on screen.
 """
     createButton = guiobjects.createButton(
         GG.utils.TINY_OK_IMAGE, [150, 275],
         ["Crear habitación", self.showTooltip, self.removeTooltip],
         self.accept)
     self.container.add_child(createButton)
 def __paintButtons(self):
     """ Paints modify and discard buttons on screen.
 """
     editButton = guiobjects.createButton(
         GG.utils.TINY_OK_IMAGE,
         [50, 230],
         ["Modificar habitación", self.showTooltip, self.removeTooltip],
         self.applyEditRoom,
     )
     self.container.add_child(editButton)
     cancelButton = guiobjects.createButton(
         GG.utils.TINY_CANCEL_IMAGE,
         [180, 230],
         ["Descartar edición", self.showTooltip, self.removeTooltip],
         self.discardEditRoom,
     )
     self.container.add_child(cancelButton)
     self.container.zOrder = 10000
 def __paintButtonFileChooser(self, iPos):
     buttonFileChooser = guiobjects.createButton(
         GG.utils.FILE_BUTTON_IMAGE,
         [10 + self.labelShift[0], 40 + iPos * self.spacing + 40 + self.labelShift[1]],
         ["subir imagen", self.showTooltip, self.removeTooltip],
         self.openFileDialog,
     )
     self.container.add_child(buttonFileChooser)
     self.activeLabels.append(buttonFileChooser)
     return buttonFileChooser
Beispiel #15
0
 def __paintButtonFileChooser(self, iPos):
     buttonFileChooser = guiobjects.createButton(
         GG.utils.FILE_BUTTON_IMAGE, [
             10 + self.labelShift[0],
             40 + iPos * self.spacing + 40 + self.labelShift[1]
         ], ["subir imagen", self.showTooltip, self.removeTooltip],
         self.openFileDialog)
     self.container.add_child(buttonFileChooser)
     self.activeLabels.append(buttonFileChooser)
     return buttonFileChooser
Beispiel #16
0
    def openFileDialog(self):
        """ Opens the file explorer dialog.
    """
        self.dialog = guiobjects.OcempPanel(373, 372, [528, 100],
                                            GG.utils.UPLOAD_BACKGROUND)
        self.dialog.zOrder = 10000
        self.listDir = guiobjects.OcempImageFileList(310, 239)
        self.listDir.topleft = 31, 60
        self.dialog.add_child(self.listDir)
        buttonOK = guiobjects.createButton(
            GG.utils.OK_BUTTON_IMAGE, [233, 308],
            ["aceptar", self.showTooltip, self.removeTooltip],
            self.closeFileDialog, "OK")
        self.dialog.add_child(buttonOK)
        buttonCancel = guiobjects.createButton(
            GG.utils.CANCEL_BUTTON_IMAGE, [122, 308],
            ["cerrar", self.showTooltip, self.removeTooltip],
            self.closeFileDialog, "KO")

        self.dialog.add_child(buttonCancel)
        self.hud.addSprite(self.dialog)
        self.hud.widgetContainer.add_widget(self.dialog)
 def draw(self):
     """ Draws the item parts on screen.
 """
     self.window = guiobjects.OcempPanel(
         150, 300, [GG.utils.SCREEN_SZ[0] - 151, 129], GG.utils.ADMIN_ACTIONS_BACKGROUND
     )
     titleLabel = guiobjects.OcempLabel(self.title, guiobjects.STYLES["teleportLabel"])
     titleLabel.topleft = 4, 0
     self.window.add_child(titleLabel)
     self.listItems = guiobjects.OcempImageObjectList(110, 205, self.listItems)
     self.listItems.topleft = 20, 40
     self.window.add_child(self.listItems)
     okButton = guiobjects.createButton(
         GG.utils.TINY_OK_IMAGE, [10, 262], [self.tooltipLabel, self.showTooltip, self.removeTooltip], self.accept
     )
     self.window.add_child(okButton)
     cancelButton = guiobjects.createButton(
         GG.utils.TINY_CANCEL_IMAGE,
         [80, 262],
         ["Cerrar menu", self.showTooltip, self.removeTooltip],
         self.showOrHide,
     )
     self.window.add_child(cancelButton)
     self.window.zOrder = 10000
 def __paintDeleteButton(self):
   """ Paints the delete button.
   """  
   deleteButton = guiobjects.createButton(DELETE_CONTACT_IMAGE, [20, 315], ["Eliminar contacto", self.showTooltip, self.removeTooltip], self.accept)
   self.container.add_child(deleteButton)