AL-2020/venv/Lib/site-packages/pygame/docs/ref/docscomments.json

1 line
435 KiB
JSON
Raw Normal View History

2020-05-15 17:25:01 +02:00
[{"content": "How To Get ALL The Mouse Clicks.\n\nTook me hours to figure this out. Also note that button 1 and 3 pressed at the same time shows up as button 2, at least on my ubuntu computer.\n\ne=pygame.event.wait()\nif e.type == MOUSEBUTTONDOWN and e.button == 4 : do something mousey", "user_title": "Douglas Smith", "datetimeon": "2005-11-11T14:05:52", "link": "pygame.mouse.get_pressed", "id": 3}, {"content": "If you're trying to create a surface with per-pixel alphas, and\n\n my_surface = pygame.Surface((w, h), SRCALPHA)\n\ncreates a regular surface instead, try\n\n my_surface = pygame.Surface((w, h)).convert_alpha()", "user_title": "Marius Gedminas", "datetimeon": "2006-01-05T16:07:06", "link": "pygame.Surface", "id": 39}, {"content": "Interestingly, pygame.font.get_default_font() returns a font name ('freesansbold.ttf') which is not among the 189 listed by pygame.font.get_fonts().", "user_title": "Dave Burton", "datetimeon": "2011-01-03T08:47:41", "link": "pygame.font.get_fonts", "id": 3698}, {"content": "The font name is not a list! It is a single string.\n\nThe string can contain multiple font names with commas between them,\nbut if you pass a Python list (or tuple) you'll get an error.", "user_title": "Dave Burton", "datetimeon": "2011-01-03T09:13:14", "link": "pygame.font.SysFont", "id": 3699}, {"content": "Re: \"During its lifetime, the PixelArray locks the surface, thus you explicitly have to delete it once its not used anymore and the surface should perform operations in the same scope.\"\n\n1. Grammer: s/its/it's/\n\n2. s/you explicitly have to delete/you have to explicitly delete/\n\n3. I assume that to explicitly delete it you can either use \"del pxarray\"\nor else simply exit the function to which pxarray is local. Is that correct?\n\n4. What does \"and the surface should perform operations in the same scope\" mean?\nIs it saying something about the surface returned by px.make_surface(), i.e.,\nthat it should be a local variable in the same function to which pxarray is local?\nOr is it saying something about the surface that is passed to pygame.PixelArray()\nto create the pxarray object, and if so WHAT is it saying?", "user_title": "Dave Burton", "datetimeon": "2011-01-07T03:08:20", "link": "pygame.PixelArray", "id": 3703}, {"content": "On my Windows Vista machine running Python 3.1.2 and pygame 1.9.1, pgame.font.get_fonts() returns a list of 189 fonts. All the font names are lower case, and there are no special characters (like hyphens) in the names. The expected 'timesnewroman', 'arial', 'arialblack', 'couriernew', 'veranda', 'microsoftsansserif', 'symbol' and 'wingdings' are there (but not 'times' or 'roman' or 'helvetica'), but also many obscure fonts that I've never heard of.", "user_title": "Dave Burton", "datetimeon": "2011-01-03T08:43:54", "link": "pygame.font.get_fonts", "id": 3697}, {"content": "Pretty cool demo Mr. Anony", "user_title": "Robert Leachman", "datetimeon": "2010-12-10T22:09:50", "link": "pygame.key.get_pressed", "id": 3683}, {"content": "If you want to see a list of attributes, do a help(pygame) and it'll show you", "user_title": "Alex Polosky", "datetimeon": "2010-12-15T23:46:38", "link": "pygame.locals", "id": 3686}, {"content": "Works fine for me on OS X 10.6.5, though yes it does need to brought up to Quartz", "user_title": "Robert Leachman", "datetimeon": "2010-12-04T21:54:48", "link": "pygame.display.init", "id": 3675}, {"content": "See tutorials. \nAfter each line \n pygame.image.load(\"<>\")\nMake it\n pygame.image.load(\"<>\").convert()\nNo matter what, this will increase your speed by 600%!\nThanks to whoever put in that tutorial!\n -P.Z.", "user_title": "Ian Mallett", "datetimeon": "2007-03-05T00:13:41", "link": "pygame.draw", "id": 403}, {"content": "see:\nhttp://www.pygame.org/docs/tut/newbieguide.html\n#4", "user_title": "Ian Mallett", "datetimeon": "2007-03-17T13:13:59", "link": "pygame.draw", "id": 439}, {"content": "Dear readers, here is a working example of MPEG playing.\n-tgfcoder\n\n\nimport pygame, time\n\npygame.init()\n\ncin