Esempio n. 1
0
    def process(self):

        if self.scene.action.get('exit'):
            sys.exit()

        if self.scene.action.get('save_and_exit'):
            self.scene.manager.save_game()
            sys.exit()

        if self.scene.action.get('fullscreen'):
            tcod.console_set_fullscreen(not tcod.console_is_fullscreen())
            self.scene.message.append(('toggle fullscreen', tcod.blue))

        if self.scene.action.get('screenshot'):
            tcod.sys_save_screenshot()
            self.scene.message.append(('save screenshot', tcod.blue))

        if self.scene.action.get('randomize_scene'):
            self.scene.manager.next_level()
Esempio n. 2
0
def test_sys_screenshot(console, tmpdir):
    libtcodpy.sys_save_screenshot(tmpdir.join('test.png').strpath)
Esempio n. 3
0
def test_sys_screenshot(console, tmpdir):
    libtcodpy.sys_save_screenshot(tmpdir.join('test.png').strpath)
Esempio n. 4
0
 def save_screenshot(self):
     n = f'River-{self.seed}-{self.screenshot_number:04}.png'
     self.screenshot_number += 1
     tcod.sys_save_screenshot(n)
     return n