コード例 #1
0
    def hide(self):
        TIME = 40
        t = Transition()

        t.addChild(self.itemWnd,
                   endRect=(self.itemWnd.left,
                            ika.Video.yres + self.itemWnd.height),
                   time=TIME)

        t.addChild(self.descWnd,
                   endRect=(ika.Video.xres + self.descWnd.width,
                            self.descWnd.top),
                   time=TIME)

        t.addChild(self.moneyWnd,
                   endRect=(ika.Video.xres + self.moneyWnd.width,
                            self.moneyWnd.top),
                   time=TIME)

        for i in range(TIME - 1, -1, -1):
            t.update(1)
            o = i * 255 / TIME  # menu opacity for this frame
            engine.raw_draw()
            ika.Video.DrawRect(0, 0, ika.Video.xres, ika.Video.yres,
                               ika.RGB(0, 0, 0, o / 2), True)
            self.draw(o)
            ika.Video.ShowPage()
            ika.Input.Update()
コード例 #2
0
    def show(self):
        TIME = 35
        self.refresh()

        t = Transition()

        t.addChild(self.itemWnd,
                   startRect=(-self.itemWnd.right, self.itemWnd.top),
                   time=TIME)

        t.addChild(self.descWnd,
                   startRect=(self.descWnd.left, -self.descWnd.bottom),
                   time=TIME)

        t.addChild(self.moneyWnd,
                   startRect=(self.moneyWnd.left,
                              self.moneyWnd.bottom + self.moneyWnd.height),
                   time=TIME)

        for i in range(TIME):
            t.update(1)
            o = i * 128 / TIME  # tint intensity for this frame
            engine.raw_draw()
            ika.Video.DrawRect(0, 0, ika.Video.xres, ika.Video.yres,
                               ika.RGB(0, 0, 0, o), True)
            self.draw()
            ika.Video.ShowPage()
            ika.Input.Update()
コード例 #3
0
ファイル: subscreen.py プロジェクト: Hatchet2k4/Winter
 def hide(self):
     TIME = 40
     self.update()
     t = Transition()
     t.addChild(self.control_menu,
                endRect=(self.control_menu.Left,
                         240 + self.control_menu.Top),
                time=TIME - 5)
     t.addChild(self.header, endRect=(self.header.Left, -40), time=TIME - 5)
     for i in range(TIME):
         t.update(1)
         self.draw()
         ika.Video.ShowPage()
         ika.Input.Update()
コード例 #4
0
ファイル: subscreen.py プロジェクト: Hatchet2k4/Winter
    def show(self, usebackground=False):
        # assume the backbuffer is already filled
        if not usebackground:
            self.images = effects.createBlurImages()
        TIME = 40

        self.update()

        t = Transition()
        t.addChild(self.statWnd,
                   startRect=(-self.statWnd.Right, self.statWnd.Top),
                   time=TIME - 5)
        t.addChild(self.attribWnd,
                   startRect=(-self.attribWnd.Right, self.attribWnd.Top),
                   time=TIME - 5)
        t.addChild(self.magWnd,
                   startRect=(ika.Video.xres, self.magWnd.Top),
                   time=TIME - 5)
        t.addChild(self.menu,
                   startRect=(ika.Video.xres, self.menu.Top),
                   time=TIME - 5)
        #t.addChild(self.inv, startRect=(ika.Video.xres, self.inv.Top), time=TIME - 5)
        t.addChild(self.timer,
                   startRect=(-self.timer.Right, self.timer.Top),
                   time=TIME - 5)
        t.addChild(self.mapname,
                   startRect=(ika.Video.xres, self.mapname.Top),
                   time=TIME - 5)
        for i in range(TIME):
            t.update(1)
            o = i * 128 / TIME  # tint intensity for this frame
            f = i * len(self.images) / TIME  # blur image to draw

            if not usebackground:
                ika.Video.ScaleBlit(self.images[f], 0, 0, ika.Video.xres,
                                    ika.Video.yres, ika.Opaque)
                ika.Video.DrawRect(0, 0, ika.Video.xres, ika.Video.yres,
                                   ika.RGB(0, 0, 0, o), True)
            else:
                ika.Video.ScaleBlit(self.background, 0, 0, ika.Video.xres,
                                    ika.Video.yres, ika.Opaque)
                ika.Video.DrawRect(0, 0, ika.Video.xres, ika.Video.yres,
                                   ika.RGB(0, 0, 0, 128), True)

            self.draw()
            ika.Video.ShowPage()
            ika.Input.Update()

        self.background = self.images[-1]
コード例 #5
0
ファイル: subscreen.py プロジェクト: Hatchet2k4/Winter
    def hide(self, usebackground=False):
        TIME = 40
        t = Transition()
        t.addChild(self.statWnd,
                   endRect=(-self.statWnd.Right, self.statWnd.Top),
                   time=TIME - 5)
        t.addChild(self.attribWnd,
                   endRect=(-self.attribWnd.Right, self.attribWnd.Top),
                   time=TIME - 5)
        t.addChild(self.magWnd,
                   endRect=(ika.Video.xres, self.magWnd.Top),
                   time=TIME - 5)
        t.addChild(self.menu,
                   endRect=(ika.Video.xres, self.menu.Top),
                   time=TIME - 5)
        #t.addChild(self.inv, endRect=(ika.Video.xres, self.inv.Top), time=TIME - 5)
        t.addChild(self.timer,
                   endRect=(-self.timer.Right, self.timer.Top),
                   time=TIME - 5)
        t.addChild(self.mapname,
                   endRect=(ika.Video.xres, self.mapname.Top),
                   time=TIME - 5)

        for i in range(TIME - 1, -1, -1):
            t.update(1)
            o = i * 255 / TIME  # menu opacity for this frame
            f = i * len(self.images) / TIME  # blur image to draw
            if not usebackground:
                ika.Video.ScaleBlit(self.images[f], 0, 0, ika.Video.xres,
                                    ika.Video.yres, ika.Opaque)
                ika.Video.DrawRect(0, 0, ika.Video.xres, ika.Video.yres,
                                   ika.RGB(0, 0, 0, o / 2), True)
                self.draw(o)
            else:
                ika.Video.ScaleBlit(self.background, 0, 0, ika.Video.xres,
                                    ika.Video.yres, ika.Opaque)
                ika.Video.DrawRect(0, 0, ika.Video.xres, ika.Video.yres,
                                   ika.RGB(0, 0, 0, 128), True)
                self.draw(255)

            ika.Video.ShowPage()
            ika.Input.Update()