Python Forum
[cocos2d] how to use the second display
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[cocos2d] how to use the second display
#1
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to display <IPython.core.display.HTML object>? pythopen 3 45,698 May-06-2023, 08:14 AM
Last Post: pramod08728
Information Unable to display joystick's value from Python onto display box MelfoyGray 2 2,172 Nov-11-2020, 02:23 AM
Last Post: MelfoyGray

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020