How To Use!



0. Install pygame:

write:

pip install pygame

in the terminal



1. In Your Main.py File Write:



from issgraph import *

import sys



2. Write:

Utils.init()



window = Graphics(800, 600)



3. And For The Loop:

while True:
    for event in window.game():
        if event.type == window.shouldClose(): sys.exit()
    window.paint(0, 0, 0)
    window.update()

4. and to create Sprites:

while True:
    for event in window.game():
        if event.type == window.shouldClose(): sys.exit()
    window.paint(0, 0, 0)
    window.image(Img.img("z.png"), x_pos, y_pos)
    window.update()

5. Keyboard Input:

while True:
    for event in window.game():
        if event.type == window.shouldClose(): sys.exit()
    window.paint(0, 0, 0)
    window.image(Img.img("z.png"), x_pos, y_pos)
    if Utils.keys(Utils.KEYS["right"]):
        print("right")
    window.update()

6. Scaling
scaled_image = Img.scale(Img.img("file.png"), width, height)

7. Mouse
Mouse.get_pos()
Mouse.get_pressed()

8. Collision
Utils.collide(x1, y1, x2, y2, width, height)

9. Sound
sound = Utils.sound()
sound.music.load("n.wav")
sound.music.play()
