Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
EmanuelNorsk authored Jan 15, 2025
1 parent 62af723 commit 33ba38d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,35 @@ Functions added to the current version:
### Creates a screen to draw on with the width and height of your choice. Current flags that work are: sdlg.RESIZABLE
sdlg.display.set_mode(Tuple(width, height), flags) -> Display

# Fills the window with a color. Color values are between 0 - 255
### Fills the window with a color. Color values are between 0 - 255
Display.fill((red, green, blue, alpha))

# Both does the same thing, updates the Display
### Both does the same thing, updates the Display
Display.flip()
Display.update()

# Makes (0, 0) be in the center of the screen and centers each elements drawn to the screen.
### Makes (0, 0) be in the center of the screen and centers each elements drawn to the screen.
Display.cartesian_coordinate_system(Bool)

# Adds the feature to scale the window to match the new resolution to keep everything looking the same and changing at the right pace
### Adds the feature to scale the window to match the new resolution to keep everything looking the same and changing at the right pace
Display.scaleWindow(Bool)

# Sets the inner size to what you want. This impacts how things scale and if you want things to scale based on a window size not running at the moment of launching Display.scaleWindow(True)
### Sets the inner size to what you want. This impacts how things scale and if you want things to scale based on a window size not running at the moment of launching Display.scaleWindow(True)
Display.setInnerSize(Tuple(width, height))

# Draws a rectangle to the screen with the properties given. Border might not work just yet, and it does not support scaling yet.
### Draws a rectangle to the screen with the properties given. Border might not work just yet, and it does not support scaling yet.
sdlg.draw.rect(Display, (red, green, blue, alpha), (x, y, width, height), borderWidth = 0)

# Generates a list of events. Use this in a for loop and ask for the current event's type. So [event.type for event in sdlg.event.get()] to get a list of events.
### Generates a list of events. Use this in a for loop and ask for the current event's type. So [event.type for event in sdlg.event.get()] to get a list of events.
sdlg.event.get()

# Gives a list with the keyboard state
### Gives a list with the keyboard state
sdlg.key.get_pressed()

# Starts up the library
### Starts up the library
sdlg.init()

# Closes the library
### Closes the library
sdlg.quit()

Every constant are exactly the same as pygame.
Expand Down

0 comments on commit 33ba38d

Please sign in to comment.