Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
This Package adds UI Elements to PyGame.
pip install pygametext
import pygametext
pgt = pygametext.PGT(screen)
pgt.button(x,y,width,height,buttonColor,"Text",textColor,onClickFunction,onClickArguments,layer)
-> Returns True
pgt.switch(x,y,width,height,buttonColor,"Text",textColor,activeFunction,activeArguments,layer)
-> Returns True
pgt.checkbox(x,y,scale,color,activeFunction,activeArguments,layer)
-> Returns True
pgt.text(x,y,"Text",textColor,textSize,layer)
-> Returns True
pgt.square(x,y,width,height,color,layer)
-> Returns True
pgt.textbox(x,y,width,height,textColor,layer)
-> Returns True
This function needs to be called if you want that the elements on specified layer to be interactive.
pgt.update(layer)
This function needs to be called if you want that the elements on specified layer to be drawn.
pgt.draw(layer)
pgt.getLayer(layer)
-> Returns list of PGT Objects on specified Layer
pgt.clear(id,layer)
-> Returns True or False
pgt.rebuild(layer)
-> Returns True
import pygame
import pygametext
running = True
pygame.init()
screen = pygame.display.set_mode((640, 360))
clock = pygame.time.Clock()
pgt = pygametext.PGT(screen) # Define pygametext object.
pgt.button(10,10,100,50,(255,0,0),"Hello!",(0,0,0),print,"Hello World!",0) # Add pgt Button
pgt.button(120,10,100,50,(255,255,0),"Bye bye",(0,0,0),print,"Goodbye World!",0) # Add pgt Button
pgt.text(10,70,"Simple pygametext example.",(0,120,0),20,0) # Add pgt Text
def update(): # Update & Eventd
events = pygame.event.get()
pgt.update(events, 0) # Update all pgt elements from layer 0. Takes events arg to process some elements.
for event in events:
if event.type == pygame.QUIT:
running = False
pygame.quit()
quit()
def draw():
screen.fill((255,255,255)) # Clear screen
pgt.draw() # Draw all pgt elements from layer 0
pygame.display.flip()
while running:
update()
draw()
clock.tick(60)
FAQs
This Package adds UI Elements like Buttons and Textboxes to PyGame.
We found that pygametext demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.