Esempio n. 1
0
    def __init__(self, pDefaultContent, pRootObj):
        self.DefaultContent = pDefaultContent
        self.RootObj = pRootObj

        self.ApplicationSelector = UI.ApplicationSelector(
            pDefaultContent, Core.MAIN.ScreenWidth / 2 - 550 / 2,
            Core.MAIN.ScreenHeight / 2 - 120 / 2)
        self.NoFoldersFound = False

        self.LoadApplicationsList()

        self.BottomButtonsList = Widget.Widget_Controller(
            pDefaultContent, (5, Core.MAIN.ScreenHeight - 50 - 5,
                              Core.MAIN.ScreenWidth - 10, 50))
        self.BottomButtonsList.Append(
            Widget.Widget_Label(
                pDefaultContent, "/Ubuntu_Bold.ttf", "Taiyou Framework v" +
                Utils.FormatNumber(Core.TaiyouGeneralVersion) +
                "\nTaiyou UI/Taskbar v" + UI.TaskBar_Version, 14,
                (200, 200, 200), 5, 5, 0))

        self.ApplicationManagerBarAnimatorDisableToggle = True
        self.ApplicationManagerBarAnimator = Utils.AnimationController(2)
        self.ApplicationManagerBarAnimator.Enabled = False
        self.ApplicationManagerBar = Widget.Widget_Controller(
            pDefaultContent, (5, 650, Core.MAIN.ScreenWidth - 10, 50))
        self.ApplicationManagerBar.Append(
            Widget.Widget_Button(pDefaultContent, "Open Application", 14, 5, 5,
                                 0))
        self.ApplicationManagerEnabled = False

        self.TextsBaseX = 0
        self.DisableInput = False
Esempio n. 2
0
def Draw(DISPLAY):
    global LagIndicatorSurface
    global LagTextColor
    global LagEnabled
    global Alpha

    if not LagEnabled:
        return

    LagText = "LAG: " + Utils.FormatNumber(MAIN.clock.get_fps(), 2)
    LagTextWidth = UI.ContentManager.GetFont_width("/PressStart2P.ttf", 14,
                                                   LagText)
    LagTextHeight = UI.ContentManager.GetFont_height("/PressStart2P.ttf", 14,
                                                     LagText)

    SHAPES.Shape_Rectangle(DISPLAY, (0, 0, 0),
                           (5 - 2, 5 - 2, LagTextWidth + 4, LagTextHeight + 4),
                           0, 3)
    UI.ContentManager.FontRender(DISPLAY, "/PressStart2P.ttf", 14, LagText,
                                 LagTextColor, 5, 5)