2016-07-05 13 views
2

pygletを使って画面の値heightとを変数に取り込む方法はありますか?私はそれを印刷できますが、これらの値は抽出できません。スクリーンの変数へのpyglet解像度

import pyglet 

platform = pyglet.window.get_platform() 
display = platform.get_default_display() 
screen = display.get_screens() 

- >

>>> screen 
[XlibScreen(display=<pyglet.canvas.xlib.XlibDisplay object at 0x7f4644cf0990>, x=0, y=0, width=1366, height=768, xinerama=0)] 
>>> 

任意のアイデア?前もって感謝します。

答えて

2

それは、このような単純なする必要があります:

platform = pyglet.window.get_platform() 
display = platform.get_default_display()  
screen = display.get_default_screen() 
screen_width = screen.width 
screen_height = screen.height 
+0

はい、今私が参照してください。ありがとう!! –

関連する問題