nanos-world / issues

Issue Tracker for nanos world
9 stars 1 forks source link

Canvas `clear_color` bug with transparent color #1000

Closed Timmy-the-nobody closed 4 months ago

Timmy-the-nobody commented 5 months ago

Prerequisites

Your Environment

Description

When spawning a Canvas with Color.TRANSPARENT as clear_color in the class constructor it makes the background color of the canvas white instead of transparent

Steps to reproduce the behavior

Run this snippet

Canvas(true, Color.TRANSPARENT, 0)

Expected behavior

The background color should be transparent

Actual behavior

The background color is white

Timmy-the-nobody commented 5 months ago

Btw this makes the first tutorial from the docs look broken since it's using a Canvas with a transparent background color https://docs.nanos.world/docs/next/getting-started/tutorials-and-examples/basic-hud-canvas

Timmy-the-nobody commented 5 months ago

After checking again it seems like all Canvas instances have a white background, no matter the background color you set in the constructor

gtnardy commented 4 months ago

fixed it, thanks for reporting