[cocos2d] how to use the second display - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: [cocos2d] how to use the second display (/thread-8527.html) |
[cocos2d] how to use the second display - largecat - Feb-24-2018 I'm now using cocos2d to make some animation, and have two monitors, I want to use the second monitor to display, but the code cannot work, firstly get the screen list, screens =pyglet.window.get_platform().get_default_display().get_screens()secondly, set the second monitor to display with fullscreen mode. (first monitor 0, second 1) cocos.director.window.Window(screen=screens[1], fullscreen=True)now show the animation, here layer test() just for example, cocos.director.director.init() scene=cocos.scene.Scene(test()) cocos.director.director.run(scene)above code cannot work, how to correct it, thanks. |