So one issue with the code box that comes with the editor, is if you dont put it in source mode before pasting code you can lose your indentation. So i guess based on that it should go?
import pygame as pg screen = pg.display.set_mode((800,600)) screen_rect = screen.get_rect() done = False cursor_img = 'curs.jpg' cursor = pg.image.load(cursor_img).convert() cursor_rect = cursor.get_rect() is_cursor = False while not done: screen.fill((255,0,0)) for event in pg.event.get(): if event.type == pg.QUIT: done = True elif event.type == pg.MOUSEBUTTONDOWN: pg.mouse.set_visible(False) is_cursor = True cursor_rect.center = pg.mouse.get_pos() if is_cursor: screen.blit(cursor, cursor_rect) pg.display.update()whereas if you type code tags
import pygame as pg screen = pg.display.set_mode((800,600)) screen_rect = screen.get_rect() done = False cursor_img = 'curs.jpg' cursor = pg.image.load(cursor_img).convert() cursor_rect = cursor.get_rect() is_cursor = False while not done: screen.fill((255,0,0)) for event in pg.event.get(): if event.type == pg.QUIT: done = True elif event.type == pg.MOUSEBUTTONDOWN: pg.mouse.set_visible(False) is_cursor = True cursor_rect.center = pg.mouse.get_pos() if is_cursor: screen.blit(cursor, cursor_rect) pg.display.update()or use python button
import pygame as pg screen = pg.display.set_mode((800,600)) screen_rect = screen.get_rect() done = False cursor_img = 'curs.jpg' cursor = pg.image.load(cursor_img).convert() cursor_rect = cursor.get_rect() is_cursor = False while not done: screen.fill((255,0,0)) for event in pg.event.get(): if event.type == pg.QUIT: done = True elif event.type == pg.MOUSEBUTTONDOWN: pg.mouse.set_visible(False) is_cursor = True cursor_rect.center = pg.mouse.get_pos() if is_cursor: screen.blit(cursor, cursor_rect) pg.display.update()that does not happen
Recommended Tutorials: