def createUI(self):
        w, h = gdata.scrnSize
        cols = 22
        rows = 13
        width = cols * 20 + 4
        height = rows * 20 + 24
        self.win = ui.Window(
            self.app,
            modal=1,
            escKeyClose=1,
            movable=0,
            title=_("Key Command Help"),
            rect=ui.Rect((w - width) / 2, (h - height) / 2, width, height),
            layoutManager=ui.SimpleGridLM(),
        )
        # creating dialog window
        self.win.subscribeAction('*', self)

        t = ui.Text(self.win,
                    id='vText',
                    align=ui.ALIGN_W,
                    layout=(0, 0, cols - 1, rows - 2),
                    editable=0)
        s = ui.Scrollbar(self.win, layout=(cols - 1, 0, 1, rows - 2))
        t.attachVScrollbar(s)

        ui.Title(self.win, layout=(0, rows - 1, cols - 16, 1))
        ui.TitleButton(self.win,
                       layout=(cols - 4, rows - 1, 4, 1),
                       text=_("OK"),
                       action="onCancel")
        ui.TitleButton(self.win,
                       layout=(cols - 16, rows - 1, 12, 1),
                       text=_("Do not show help/tooltip again"),
                       action="onOK")
Exemple #2
0
 def createUI(self):
     w, h = gdata.scrnSize
     self.win = ui.Window(
         self.app,
         title=_('Unhandled exception'),
         modal=1,
         escKeyClose=1,
         movable=0,
         rect=ui.Rect((w - 724) / 2, (h - 443) / 2, 724, 443),
         layoutManager=ui.SimpleGridLM(),
     )
     self.win.subscribeAction('*', self)
     s = ui.Scrollbar(self.win, layout=(35, 0, 1, 20))
     t = ui.Text(self.win, layout=(0, 0, 35, 20), id="vText")
     t.attachVScrollbar(s)
     ui.Button(self.win,
               layout=(0, 20, 9, 1),
               text=_('Continue'),
               action='onContinue')
     ui.Button(self.win,
               layout=(9, 20, 9, 1),
               text=_('Close Application'),
               action='onClose')
     ui.Button(self.win,
               layout=(18, 20, 9, 1),
               text=_('Abort Application'),
               action='onAbort')
     ui.Button(self.win,
               layout=(27, 20, 9, 1),
               text=_('Send to server'),
               action='onSend',
               id='vSend',
               enabled=0)
Exemple #3
0
 def createUI(self):
     w, h = gdata.scrnSize
     self.win = ui.Window(
         self.app,
         modal=1,
         movable=0,
         title=_('Question'),
         rect=ui.Rect((w - 424) / 2, (h - 124) / 2, 424, 124),
         layoutManager=ui.SimpleGridLM(),
     )
     self.win.subscribeAction('*', self)
     ui.Text(self.win,
             layout=(5, 0, 16, 4),
             id='vText',
             background=self.win.app.theme.themeBackground,
             editable=0)
     ui.Label(self.win,
              layout=(0, 0, 5, 4),
              icons=((res.loginLogoImg, ui.ALIGN_W), ))
     ui.Title(self.win,
              layout=(0, 4, 13, 1),
              id='vStatusBar',
              align=ui.ALIGN_W)
     ui.TitleButton(self.win,
                    layout=(13, 4, 4, 1),
                    id='vCancel',
                    action='onCancel')
     ui.TitleButton(self.win,
                    layout=(17, 4, 4, 1),
                    id='vConfirm',
                    action='onConfirm')
    def createUI(self):
        w, h = gdata.scrnSize
        cols = 20
        rows = 13
        width = cols * 20 + 4
        height = rows * 20 + 24
        self.win = ui.Window(
            self.app,
            modal=1,
            escKeyClose=1,
            movable=0,
            title=_("Show buoy text"),
            rect=ui.Rect((w - width) / 2, (h - height) / 2, width, height),
            layoutManager=ui.SimpleGridLM(),
        )
        # creating dialog window
        self.win.subscribeAction('*', self)

        s = ui.Scrollbar(self.win, layout=(cols - 1, 0, 1, rows - 1))
        t = ui.Text(self.win,
                    id='vText',
                    align=ui.ALIGN_W,
                    layout=(0, 0, cols - 1, rows - 1),
                    editable=0)
        t.attachVScrollbar(s)

        ui.Title(self.win, layout=(0, rows - 1, cols - 5, 1))
        okBtn = ui.TitleButton(self.win,
                               layout=(cols - 5, rows - 1, 5, 1),
                               text=_("OK"),
                               action='onOK')
    def createUI(self):
        screenWidth, screenHeight = gdata.scrnSize
        # size of dialog in layout metrics (for SimpleGridLM)
        cols = 25
        rows = 20
        # dialog width and height in pixels
        width = cols * 20 + 5
        height = rows * 20 + 4
        #creating dialog window
        self.win = ui.Window(self.app,
            modal = 1,
            escKeyClose = 1,
            movable = 0,
            title = _("Galaxy finish"),
            rect = ui.Rect((screenWidth - width) / 2, (screenHeight - height) / 2, width, height),
            layoutManager = ui.SimpleGridLM(),
        )
        self.win.subscribeAction('*', self)
        # first row is window title
        rows -= 1

        ui.Label(self.win, layout = (0, 0, cols, 1), text = _("If you are sure to finish this galaxy, click on Finish button."), align = ui.ALIGN_W)
        ui.Label(self.win, layout = (0, 1, cols, 1), text = _("You can enter message visible in finish announcement below."), align = ui.ALIGN_W)

        s = ui.Scrollbar(self.win, layout = (cols - 1, 2, 1, rows - 3))
        t = ui.Text(self.win, layout = (0, 2, cols - 1, rows - 3), id = 'vMsg')
        t.attachVScrollbar(s)

        # dialog bottom line
        ui.Title(self.win, layout = (0, rows - 1, cols - 10, 1))
        ui.TitleButton(self.win, layout = (cols - 10, rows - 1, 5, 1), text = _("Finish"), action = 'onFinish')
        ui.TitleButton(self.win, layout = (cols - 5, rows - 1, 5, 1), text = _("Cancel"), action = 'onClose')
    def createUI(self):
        w, h = gdata.scrnSize
        cols = 22
        rows = 13
        width = cols * 20 + 4
        height = rows * 20 + 24
        self.win = ui.Window(
            self.app,
            modal=1,
            escKeyClose=1,
            movable=0,
            title=_("Edit buoy"),
            rect=ui.Rect((w - width) / 2, (h - height) / 2, width, height),
            layoutManager=ui.SimpleGridLM(),
        )
        # creating dialog window
        self.win.subscribeAction('*', self)

        ui.Label(self.win,
                 text=_("Buoy text:"),
                 align=ui.ALIGN_W,
                 layout=(0, 0, 4, 1))
        ui.Label(self.win,
                 text=_("Visible to:"),
                 align=ui.ALIGN_W,
                 layout=(6, 0, 4, 1))
        ui.Check(self.win,
                 text=_("Allies"),
                 align=ui.ALIGN_W,
                 layout=(10.5, 0, 4, 1),
                 id='vAllied',
                 action="turnOff",
                 data="vAllied")
        ui.Check(self.win,
                 text=_("Scanner Share"),
                 align=ui.ALIGN_W,
                 layout=(15, 0, 6, 1),
                 id='vScanner',
                 action="turnOff",
                 data="vScanner")
        s = ui.Scrollbar(self.win, layout=(cols - 1, 1, 1, rows - 3))
        t = ui.Text(
            self.win,
            id='vText',
            align=ui.ALIGN_W,
            layout=(0, 1, cols - 1, rows - 2),
        )
        t.attachVScrollbar(s)

        ui.Title(self.win, layout=(0, rows - 1, cols - 10, 1))
        ui.TitleButton(self.win,
                       layout=(cols - 10, rows - 1, 5, 1),
                       text=_("Cancel"),
                       action="onCancel")
        okBtn = ui.TitleButton(self.win,
                               layout=(cols - 5, rows - 1, 5, 1),
                               text=_("OK"),
                               action='onOK')
        self.win.acceptButton = okBtn
Exemple #7
0
 def createUI(self):
     w, h = gdata.scrnSize
     self.win = ui.Window(self.app,
         modal = 1,
         escKeyClose = 1,
         titleOnly = w == 800 and h == 600,
         movable = 0,
         title = _("Messages and events"),
         rect = ui.Rect((w - 800 - 4 * (w != 800)) / 2, (h - 600 - 4 * (h != 600)) / 2, 800 + 4 * (w != 800), 580 + 4 * (h != 600)),
         layoutManager = ui.SimpleGridLM(),
     )
     self.win.subscribeAction('*', self)
     # forums
     ui.Listbox(self.win, layout = (0, 0, 10, 27), id = "vForums",
         columns = ((_("Channel"), "text", 5.5, ui.ALIGN_W), (_("#"), "tMsgs", 4.5, ui.ALIGN_E)),
         columnLabels = 1, action = "onForumSelected", sortable = 0)
     # topics
     ui.Listbox(self.win, layout = (10, 0, 30, 15), id = "vMessages",
         columns = (
             (_(" "), "tState", 1, ui.ALIGN_NONE),
             (_("Date"), "tDate", 4, ui.ALIGN_W),
             (_("Sender"), "tSender", 7, ui.ALIGN_W),
             (_("Subject"), "text", 0, ui.ALIGN_W),
         ),
         columnLabels = 1, action = "onMessageSelected", rmbAction = "onPostMenu")
     # messages
     ui.Title(self.win, layout = (10, 15, 5, 1),
         font = "normal-bold", align = ui.ALIGN_W)
     ui.Button(self.win, layout = (15, 15, 5, 1), text = _("New subject"),
         action = "onNewTopic", id = "vNewTopic", enabled = 0)
     ui.Button(self.win, layout = (20, 15, 5, 1), text = _("Reply"),
         action = "onReply", id = "vReply", enabled = 0)
     ui.Button(self.win, layout = (25, 15, 5, 1), text = _("Read all"),
         action = "onAllReaded", id = "vAllReaded", enabled = 0)
     ui.Button(self.win, layout = (30, 15, 5, 1), text = _("Delete"),
         action = "onDelete", id = "vDelete", enabled = 0)
     ui.Button(self.win, layout = (35, 15, 5, 1), text = _("Delete all"),
         action = "onDeleteAll", id = "vDeleteAll", enabled = 0)
     s = ui.Scrollbar(self.win, layout = (39, 16, 1, 11))
     t = ui.Text(self.win, layout = (10, 16, 29, 11), id = "vMessage", editable = 0)
     t.attachVScrollbar(s)
     # status bar
     ui.TitleButton(self.win, layout = (30, 27, 5, 1), text = _('Refresh'), action = 'onRefresh')
     ui.TitleButton(self.win, layout = (35, 27, 5, 1), text = _('Close'), action = 'onClose')
     ui.Title(self.win, id = 'vStatusBar', layout = (0, 27, 30, 1), align = ui.ALIGN_W)
     #@self.win.statusBar = self.win.vStatusBar
     # event menu
     self.eventPopup = ui.Menu(self.app, title = _("Message actions"),
         items = [
             ui.Item(_("Show location"), action = "onShowLoc"),
             ui.Item(_("Show source"), action = "onShowSource"),
             ui.Item(_("Show location and delete msg"), action = "onShowLocDel"),
             ui.Item(_("Show source and delete msg"), action = "onShowSourceDel"),
             ui.Item(_("Delete"), action = "onDelete"),
         ]
     )
     self.eventPopup.subscribeAction("*", self)
Exemple #8
0
    def createUI(self):
        screenWidth, screenHeight = gdata.scrnSize
        # size of dialog in layout metrics (for SimpleGridLM)
        cols = 23
        rows = 27
        # dialog width and height in pixels
        width = cols * 20 + 5
        height = rows * 20 + 4
        #creating dialog window
        self.win = ui.Window(
            self.app,
            modal=1,
            escKeyClose=1,
            movable=0,
            title=_("Empire Overview"),
            rect=ui.Rect((screenWidth - width) / 2,
                         (screenHeight - height) / 2, width, height),
            layoutManager=ui.SimpleGridLM(),
        )
        self.win.subscribeAction('*', self)
        # first row is window title
        rows -= 1

        s = ui.Scrollbar(self.win, layout=(cols - 1, 0, 1, rows - 1))
        t = ui.Text(self.win,
                    layout=(0, 0, cols - 1, rows - 1),
                    id="vText",
                    editable=0)
        self._textRows = rows - 1
        t.attachVScrollbar(s)

        # dialog bottom line
        ui.Title(self.win, layout=(0, rows - 1, cols - 10, 1))
        ui.TitleButton(self.win,
                       layout=(cols - 10, rows - 1, 5, 1),
                       text=_("Analysis"),
                       action="onMenu")
        ui.TitleButton(self.win,
                       layout=(cols - 5, rows - 1, 5, 1),
                       text=_("Close"),
                       action="onClose")

        # analysis menu
        self.analysisMenu = ui.Menu(self.app,
                                    title=_("Field of analysis"),
                                    width=5,
                                    items=[
                                        ui.Item(_("Planets"),
                                                action="onPlanetsAnalysis"),
                                        ui.Item(_("Fleets"),
                                                action="onFleetsAnalysis"),
                                    ])
        self.analysisMenu.subscribeAction("*", self)
Exemple #9
0
	def createUI(self):
		w, h = gdata.scrnSize
		self.win = ui.Window(self.app,
			modal = 1,
			escKeyClose = 1,
			titleOnly = w == 800 and h == 600,
			movable = 0,
			title = _('Split Fleet'),
			rect = ui.Rect((w - 800 - 4 * (w != 800)) / 2, (h - 600 - 4 * (h != 600)) / 2, 800 + 4 * (w != 800), 580 + 4 * (h != 600)),
			layoutManager = ui.SimpleGridLM(),
		)
		self.win.subscribeAction('*', self)
		# tech data
		ui.Title(self.win, layout = (0, 0, 18, 1), text = _('Data'),
			align = ui.ALIGN_W, font = 'normal-bold')
		ui.Listbox(self.win, layout = (0, 1, 18, 25), id = 'vData',
			columns = ((_('Property'), 'text', 11, ui.ALIGN_W),
			(_('Value'), 'tValue', 7, ui.ALIGN_E)),
			columnLabels = 0)
		ui.Button(self.win, layout = (1, 26, 4, 1), text = _('Structure'),
			id = 'vStruct', toggle = 1, action = 'onShowType', data = V_STRUCT)
		ui.Button(self.win, layout = (5, 26, 4, 1), text = _('Ship Hull'),
			id = 'vHull', toggle = 1, action = 'onShowType', data = V_HULL)
		ui.Button(self.win, layout = (9, 26, 4, 1), text = _('Ship Eq.'),
			id = 'vSEquip', toggle = 1, action = 'onShowType', data = V_SEQUIP)
		ui.Button(self.win, layout = (13, 26, 4, 1), text = _('Project'),
			id = 'vProject', toggle = 1, action = 'onShowType', data = V_PROJECT)
		ui.Button(self.win, layout = (17, 26, 1, 1), text = '',
			id = 'vEmpty1', toggle = 0)
		ui.Button(self.win, layout = (0, 26, 1, 1), text = '',
			id = 'vEmpty2', toggle = 0)
		# text field
		ui.Title(self.win, layout = (18, 0, 22, 1), text = _('Description'),
			align = ui.ALIGN_W, font = 'normal-bold')
		s = ui.Scrollbar(self.win, layout = (39, 1, 1, 26))
		t = ui.Text(self.win, layout = (18, 1, 21, 26), id = 'vDescr', editable = 0)
		t.attachVScrollbar(s)
		# status bar + submit/cancel
		ui.TitleButton(self.win, layout = (35, 27, 5, 1), text = _('Close'), action = 'onClose')
		ui.Title(self.win, id = 'vStatusBar', layout = (0, 27, 35, 1), align = ui.ALIGN_W)
 def createUI(self):
     w, h = gdata.scrnSize
     width = 764  # 38 * 20 + 4
     height = 464  # 23 * 20 + 4
     self.win = ui.Window(self.app,
                          modal=1,
                          escKeyClose=1,
                          movable=0,
                          title=_("New message"),
                          rect=ui.Rect((w - width) / 2, (h - height) / 2,
                                       width, height),
                          layoutManager=ui.SimpleGridLM(),
                          tabChange=True)
     self.win.subscribeAction('*', self)
     # headers
     ui.Label(self.win,
              layout=(0, 0, 5, 1),
              text=_("Recipient"),
              align=ui.ALIGN_W)
     ui.ActiveLabel(self.win,
                    layout=(5, 0, 33, 1),
                    id="vRecipient",
                    align=ui.ALIGN_W)
     ui.Label(self.win,
              layout=(0, 1, 5, 1),
              text=_("Subject"),
              align=ui.ALIGN_W)
     ui.Entry(self.win,
              layout=(5, 1, 33, 1),
              id="vTopic",
              align=ui.ALIGN_W,
              orderNo=1)
     ui.Title(self.win,
              layout=(0, 2, 38, 1),
              text=_("Message"),
              font="normal-bold",
              align=ui.ALIGN_W)
     s = ui.Scrollbar(self.win, layout=(37, 3, 1, 18))
     t = ui.Text(self.win, layout=(0, 3, 37, 18), id="vText", orderNo=2)
     t.attachVScrollbar(s)
     # info
     ui.Title(self.win,
              layout=(0, 21, 28, 1),
              id='vStatusBar',
              align=ui.ALIGN_W)
     ui.TitleButton(self.win,
                    layout=(28, 21, 5, 1),
                    text=_("Cancel"),
                    action='onCancel')
     ui.TitleButton(self.win,
                    layout=(33, 21, 5, 1),
                    text=_("Send"),
                    action='onSend')
     # status bar
     #self.win.statusBar = self.win.vStatusBar
     #
     # contact window
     #
     width = 304  # 15 * 20 + 4
     height = 264  # 13 * 20 + 4
     self.cwin = ui.Window(
         self.app,
         modal=1,
         escKeyClose=1,
         titleOnly=0,
         movable=0,
         title=_("Select recipient"),
         rect=ui.Rect((w - width) / 2, (h - height) / 2, width, height),
         layoutManager=ui.SimpleGridLM(),
     )
     self.cwin.subscribeAction('*', self)
     # rename
     ui.Listbox(self.cwin,
                layout=(0, 0, 15, 11),
                id='vContacts',
                columnLabels=0,
                columns=((None, 'text', 0, ui.ALIGN_W), ),
                multiselection=1,
                sortedBy=('text', 1))
     # status bar + submit/cancel
     ui.TitleButton(self.cwin,
                    layout=(10, 11, 5, 1),
                    text=_("Select"),
                    action='onContactSelected')
     ui.TitleButton(self.cwin,
                    layout=(5, 11, 5, 1),
                    text=_("Cancel"),
                    action='onContactCancel')
     ui.Title(self.cwin,
              id='vStatusBar',
              layout=(0, 11, 5, 1),
              align=ui.ALIGN_W)
Exemple #11
0
    def createUI(self):
        w, h = gdata.scrnSize
        self.win = ui.Window(self.app,
            modal = 1,
            movable = 0,
            title = _('Select, which galaxy types do you want to play'),
            rect = ui.Rect((w - 564) / 2, (h - 404) / 2, 564, 404),
            layoutManager = ui.SimpleGridLM(),
            tabChange = True
        )
        ui.Listbox(self.win, layout = (0, 0, 28, 7), id = 'vBookingPublic',
                        sortedBy = ('text', 1),
                        columns = (
                                ('', 'tChoice', 1, ui.ALIGN_NONE),
                                (_('Galaxy type'), 'text', 6, ui.ALIGN_NONE),
                                (_('Scenario'), 'tScenario', 6, ui.ALIGN_NONE),
                                (_('Queue'), 'tCur', 3, ui.ALIGN_NONE),
                                (_('Capacity'), 'tPos', 3, ui.ALIGN_NONE),
                                (_('Last start'), 'tTime', 8, ui.ALIGN_E)
                                ),
                        columnLabels = 1,
                        action = 'onSelect',
                        )
        ui.Listbox(self.win, layout = (0, 0, 28, 7), id = 'vBookingPrivate',
                        sortedBy = ('tOwner', 1),
                        columns = (
                                ('', 'tChoice', 1, ui.ALIGN_NONE),
                                (_('Galaxy type'), 'text', 6, ui.ALIGN_NONE),
                                (_('Scenario'), 'tScenario', 6, ui.ALIGN_NONE),
                                (_('Queue'), 'tCur', 3, ui.ALIGN_NONE),
                                (_('Capacity'), 'tPos', 3, ui.ALIGN_NONE),
                                (_('Owner'), 'tOwner', 8, ui.ALIGN_E)
                                ),
                        columnLabels = 1,
                        action = 'onSelect',
                        )
        self.win.subscribeAction('*', self)

        ui.Button(self.win, layout = (0, 7, 8, 1), id = "vPublicToggle", text = _('Show personal bookings'), action = 'onPublicToggle',
            tooltipTitle = _("Booking types"),
            tooltip = _("Public Bookings\nPublic bookings are recommended way how to jump into new game.\nWhen queue is full, galaxy creation is triggered, and you can start adventure with group of strangers.\n\nPrivate Bookings\nPrivate bookings are the way to start game with group of your friends.\nEvery private booking requires password chosen by the owner.\nSingle player games cannot be privately booked (as they are private by definition).")
                )
        ui.Button(self.win, layout = (20, 7, 8, 1), id = "vCreatePrivate", text = _('Create private booking'), action = 'onCreatePrivate',
                tooltipTitle = _("Create Private Booking"),
                tooltip = _("Private bookings are way how to create games for group of friends.\n\
Every booking has to be created password protected, so you have to tell others\n\
what the password is.\n\n\
Account has limit of {0} private bookings at the time. Created galaxies\n\
no longers counts into the limit.".format(Const.BOOKING_PRIVATE_LIMIT))
                )

        ui.Button(self.win, layout = (20, 7, 8, 1), id = "vDeletePrivate", text = _('Delete private booking'), action = 'onDeletePrivate',
                tooltipTitle = _("Delete Private Booking"),
                tooltip = _("As the author of the booking, you can delete it at any time. No further warning will be issued.")
                )

        ui.Button(self.win, layout = (7, 8.5, 14, 1.5), id = "vToggle", text = _('Toggle booking'), action = 'onToggleBooking')
        scrollBarInfo = ui.Scrollbar(self.win, layout = (27, 10.3, 1, 4.7))
        textBox = ui.Text(self.win, layout = (9, 10.3, 18, 4.7), id = "vInfo", editable = 0)
        textBox.attachVScrollbar(scrollBarInfo)

        ui.Button(self.win, layout = (0.5, 10.5, 8, 1), id = "vGoalToggle", text = _('Display Goals'), action = 'onGoalToggle')
        ui.Label(self.win, layout = (0, 12, 4, 1), text = _("Planets:"), align = ui.ALIGN_W,
                tooltipTitle = _("Planets"),
                tooltip = _("Range of number of planets. About half of them is not colonizable at the beginning.")
                )
        ui.Label(self.win, layout = (4, 12, 4.5, 1), id = "vPlanets", align = ui.ALIGN_E,
                tooltipTitle = _("Planets"),
                tooltip = _("Range of number of planets. About half of them is not colonizable at the beginning.")
                )
        ui.Label(self.win, layout = (0, 13, 4, 1), text = _("Radius:"), align = ui.ALIGN_W,
                tooltipTitle = _("Radius"),
                tooltip = _("Galaxy radius, implies speed of game.")
                )
        ui.Label(self.win, layout = (4, 13, 4.5, 1), id = "vRadius", align = ui.ALIGN_E,
                tooltipTitle = _("Radius"),
                tooltip = _("Galaxy radius, implies speed of game.")
                )
        ui.Label(self.win, layout = (0, 14, 4, 1), text = _("Grouping:"), align = ui.ALIGN_W,
                tooltipTitle = _("Grouping"),
                tooltip = _("How many starting positions are grouped together in vicinity.")
                )
        ui.Label(self.win, layout = (4, 14, 4.5, 1), id = "vPlayerGroup", align = ui.ALIGN_E,
                tooltipTitle = _("Grouping"),
                tooltip = _("How many starting positions are grouped together.")
                )

        ui.Label(self.win, layout = (0, 15.2, 4, 1), text = _("Resources:"), align = ui.ALIGN_W)
        ui.Text (self.win, layout = (4, 15.2, 23, 1.6), id = "vResources", editable = 0)
        ui.Label(self.win, layout = (0, 17, 4, 1), text = _("Challenges:"), align = ui.ALIGN_W)
        ui.Label(self.win, layout = (4, 17, 24, 1), id = "vChallenges", align = ui.ALIGN_W)

        ui.Title(self.win, layout = (0, 18, 24, 1), id = 'vStatusBar', align = ui.ALIGN_W)
        ui.TitleButton(self.win, layout = (24, 18, 4, 1), text = _('Exit'), action = 'onCancel')
        self.win.statusBar = self.win.vStatusBar
Exemple #12
0
        items=items,
        layout=(20, 13, 9, 6),
        buttonSize=(2, 2),
    )
    ui.Title(win,
             text='This is a title',
             align=ui.ALIGN_W,
             layout=(8, 12, 12, 1))
    pBar = ui.ProgressBar(win, layout=(0, 20, 10, 1))
    progBars.append(pBar)
    scrlbar = ui.Scrollbar(win, layout=(28, 0, 1, 10))
    text = ui.Text(
        win,
        layout=(20, 0, 8, 10),
        text=[
            'This is a very looooong text which will be displayed in that text widget.',
            'And one more long line to show.', 'And another one.',
            'And another one.', 'And another one.', 'And another one.',
            'And another one.'
        ])
    text.attachVScrollbar(scrlbar)
    app.setStatus('Ready.')

    win.show()

# create top bar
update()

fps = 0
frame = 0
time = pygame.time.get_ticks()