Stash bunch of broken generated test with shitty broken mocking

This commit is contained in:
2025-01-22 00:40:31 +01:00
parent 84d63ba4c1
commit 75eff6c5ad
13 changed files with 927 additions and 14 deletions
+5 -3
View File
@@ -22,6 +22,7 @@ type Game struct {
QuitChan chan struct{} // Channel to signal shutdown
loginScreen *LoginScreen
isLoggedIn bool
input InputHandler
}
func New() *Game {
@@ -38,6 +39,7 @@ func New() *Game {
Chat: NewChat(),
QuitChan: make(chan struct{}),
loginScreen: NewLoginScreen(),
input: &RaylibInput{},
}
game.Chat.userData = game
return game
@@ -86,7 +88,7 @@ func (g *Game) Update(deltaTime float32) {
}
// Handle ESC for menu
if rl.IsKeyPressed(rl.KeyEscape) {
if g.input.IsKeyPressed(rl.KeyEscape) {
g.MenuOpen = !g.MenuOpen
return
}
@@ -325,13 +327,13 @@ func (g *Game) DrawMenu() {
}
// Check mouse hover
mousePoint := rl.GetMousePosition()
mousePoint := g.input.GetMousePosition()
mouseHover := rl.CheckCollisionPointRec(mousePoint, buttonRect)
// Draw button
if mouseHover {
rl.DrawRectangleRec(buttonRect, rl.ColorAlpha(rl.White, 0.3))
if rl.IsMouseButtonPressed(rl.MouseLeftButton) {
if g.input.IsMouseButtonPressed(toInt32(rl.MouseLeftButton)) {
switch item {
case "Resume":
g.MenuOpen = false