style: format code with Gofumpt

This commit fixes the style issues introduced in d72e443 according to the output
from Gofumpt.

Details: None
This commit is contained in:
deepsource-autofix[bot] 2024-01-26 11:31:36 +00:00 committed by GitHub
parent d72e443f93
commit b7701e600a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 11 deletions

View file

@ -26,7 +26,7 @@ func (c *Canvas) Update() {
c.Target = raylib.LoadRenderTexture(int32(c.Size.X), int32(c.Size.Y))
raylib.BeginTextureMode(c.Target)
//raylib.ClearBackground(raylib.White)
// raylib.ClearBackground(raylib.White)
raylib.DrawTexturePro(
c.Background,
raylib.NewRectangle(0, 0, c.Size.X, -c.Size.Y),

16
main.go
View file

@ -30,9 +30,7 @@ const (
StateFileMenu
)
var (
canvas *Canvas
)
var canvas *Canvas
func checkDirs() {
if _, err := os.Stat(DirAssets); os.IsNotExist(err) {
@ -49,15 +47,15 @@ func main() {
checkDirs() // Make sure all the directories exist
raylib.SetConfigFlags(raylib.FlagWindowResizable)
//raylib.SetTraceLogLevel(raylib.LogTrace)
//raylib.SetConfigFlags(raylib.FlagMsaa4xHint)
//raylib.SetConfigFlags(raylib.FlagVsyncHint)
//raylib.SetConfigFlags(raylib.FlagFullscreenMode)
// raylib.SetTraceLogLevel(raylib.LogTrace)
// raylib.SetConfigFlags(raylib.FlagMsaa4xHint)
// raylib.SetConfigFlags(raylib.FlagVsyncHint)
// raylib.SetConfigFlags(raylib.FlagFullscreenMode)
raylib.InitWindow(WindowWidth, WindowHeight, WindowTitle)
raylib.SetWindowMinSize(int(WindowMinWidth), int(WindowMinHeight))
raylib.SetTargetFPS(int32(raylib.GetMonitorRefreshRate(raylib.GetCurrentMonitor())))
//raylib.SetExitKey(0) // disable exit key
// raylib.SetExitKey(0) // disable exit key
var (
camera = raylib.NewCamera2D(raylib.NewVector2(0, 0), raylib.NewVector2(0, 0), 0, 1)
@ -66,7 +64,7 @@ func main() {
sidePanelWidth = float32(350)
sidePanelRelativeX = WindowWidth - int32(sidePanelWidth)
//sidePanelPos = sidePanelRelativeX
// sidePanelPos = sidePanelRelativeX
colourPickerVal = raylib.Orange
colourPickerHeight = float32(250)

View file

@ -45,7 +45,7 @@ func DrawToasts() {
raylib.BeginScissorMode(0, 0, WindowWidth, int32(toastHeight))
raylib.DrawRectangle(0, 0, WindowWidth, WindowHeight, raylib.Fade(raylib.Black, 0.5))
for i := 0; i < len(toasts); i++ {
//text := fmt.Sprintf("%s (%s)", toasts[i].Text, time.Since(toasts[i].Age).Round(time.Second))
// text := fmt.Sprintf("%s (%s)", toasts[i].Text, time.Since(toasts[i].Age).Round(time.Second))
text := toasts[i].Text
raylib.DrawText(text, 10, int32(20*i)+10, 10, raylib.White)
}