From ccfb669c731f1fe68f6be865776485cf8962eaf9 Mon Sep 17 00:00:00 2001 From: Tomas Doran Date: Sat, 24 Dec 2022 18:00:49 +0000 Subject: [PATCH] Colors everywhere --- screen/castspell.go | 10 +++++----- screen/help.go | 16 ++++++++-------- screen/initial.go | 24 ++++++++++++------------ screen/move.go | 10 +++++----- screen/players.go | 26 +++++++++++++------------- screen/turnmenu.go | 28 ++++++++++++++-------------- screen/winner.go | 4 ++-- 7 files changed, 59 insertions(+), 59 deletions(-) diff --git a/screen/castspell.go b/screen/castspell.go index 255efe6..2d9f223 100644 --- a/screen/castspell.go +++ b/screen/castspell.go @@ -91,7 +91,7 @@ type TargetSpellScreen struct { func (screen *TargetSpellScreen) Enter(ctx screeniface.GameCtx) { win := ctx.GetWindow() ss := ctx.GetSpriteSheet() - textBottomColor("", render.ColorWhite(), ss, win) // clear bottom bar + textBottom("", render.ColorWhite(), ss, win) // clear bottom bar } func (screen *TargetSpellScreen) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -115,12 +115,12 @@ func (screen *TargetSpellScreen) Step(ctx screeniface.GameCtx) screeniface.GameS if win.JustPressed(pixelgl.KeyS) { target := screen.WithCursor.CursorPosition if spell.GetCastRange() < target.Distance(thisPlayer.BoardPosition) { - textBottomColor("Out of range", render.GetColor(0, 249, 249), ss, batch) + textBottom("Out of range", render.GetColor(0, 249, 249), ss, batch) fmt.Printf("Out of range! Spell cast range %d but distance to target is %d\n", spell.GetCastRange(), target.Distance(thisPlayer.BoardPosition)) screen.MessageShown = true } else { if spell.NeedsLineOfSight() && !grid.HaveLineOfSight(thisPlayer.BoardPosition, target) { - textBottomColor("No line of sight", render.GetColor(0, 233, 233), ss, batch) + textBottom("No line of sight", render.GetColor(0, 233, 233), ss, batch) screen.MessageShown = true } else { grid := ctx.GetGrid() @@ -215,11 +215,11 @@ func (screen *DoSpellCast) Step(ctx screeniface.GameCtx) screeniface.GameScreen if !screen.CastBefore { if (canCastMore && castsRemaining > 0) || success { fmt.Printf("Spell Succeeds\n") - textBottomColor("Spell Succeeds", render.ColorWhite(), ss, batch) + textBottom("Spell Succeeds", render.ColorWhite(), ss, batch) ctx.AdjustLawRating(spell.GetLawRating()) } else { fmt.Printf("Spell failed\n") - textBottomColor("Spell Failed", render.GetColor(255, 0, 255), ss, batch) + textBottom("Spell Failed", render.GetColor(255, 0, 255), ss, batch) } } batch.Draw(win) diff --git a/screen/help.go b/screen/help.go index 20d9d4a..afcac9f 100644 --- a/screen/help.go +++ b/screen/help.go @@ -23,7 +23,7 @@ func (screen *HelpScreenMenu) Enter(ctx screeniface.GameCtx) { td.DrawText("5. Mounts", logical.V(9, 3), render.ColorWhite(), win) td.DrawText("6. Victory", logical.V(9, 2), render.ColorWhite(), win) - textBottomColor("Press Keys 1-6 or 0 to return", render.ColorWhite(), ss, win) + textBottom("Press Keys 1-6 or 0 to return", render.ColorWhite(), ss, win) } func (screen *HelpScreenMenu) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -69,7 +69,7 @@ func (screen *HelpScreenKeys) Enter(ctx screeniface.GameCtx) { td.DrawText("1-8 - Highlight creations of", logical.V(0, 2), render.ColorWhite(), win) td.DrawText(" player # 1-8", logical.V(0, 1), render.ColorWhite(), win) td.DrawText("0 - End turn", logical.V(0, 0), render.ColorWhite(), win) - textBottomColor(" Press any key to continue", render.ColorWhite(), ss, win) + textBottom(" Press any key to continue", render.ColorWhite(), ss, win) } func (screen *HelpScreenKeys) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -96,7 +96,7 @@ func (screen *HelpScreenSpells) Enter(ctx screeniface.GameCtx) { td.DrawText("Illusions always succeed but", logical.V(0, 3), render.ColorWhite(), win) td.DrawText("can be disbelieved by others.", logical.V(0, 2), render.ColorWhite(), win) td.DrawText(" ^=law *=chaos -=neutral", logical.V(0, 0), render.ColorWhite(), win) - textBottomColor(" Press any key to continue", render.ColorWhite(), ss, win) + textBottom(" Press any key to continue", render.ColorWhite(), ss, win) } func (screen *HelpScreenSpells) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -123,7 +123,7 @@ func (screen *HelpScreenCombat) Enter(ctx screeniface.GameCtx) { td.DrawText("If adjacent next turn you may", logical.V(0, 3), render.ColorWhite(), win) td.DrawText("remain engaged or may be able", logical.V(0, 2), render.ColorWhite(), win) td.DrawText("to break away.", logical.V(0, 1), render.ColorWhite(), win) - textBottomColor(" Press any key to continue", render.ColorWhite(), ss, win) + textBottom(" Press any key to continue", render.ColorWhite(), ss, win) } func (screen *HelpScreenCombat) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -152,7 +152,7 @@ func (screen *HelpScreenCombatRanged) Enter(ctx screeniface.GameCtx) { td.DrawText("direction keys, press S to", logical.V(0, 2), render.ColorWhite(), win) td.DrawText("fire. Target must be in line", logical.V(0, 1), render.ColorWhite(), win) td.DrawText("of sight.", logical.V(0, 0), render.ColorWhite(), win) - textBottomColor(" Press any key to continue", render.ColorWhite(), ss, win) + textBottom(" Press any key to continue", render.ColorWhite(), ss, win) } func (screen *HelpScreenCombatRanged) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -179,7 +179,7 @@ func (screen *HelpScreenUndead) Enter(ctx screeniface.GameCtx) { td.DrawText("The raise dead spell will", logical.V(0, 2), render.ColorWhite(), win) td.DrawText("turn a corpse into an undead", logical.V(0, 1), render.ColorWhite(), win) td.DrawText("creature.", logical.V(0, 0), render.ColorWhite(), win) - textBottomColor(" Press any key to continue", render.ColorWhite(), ss, win) + textBottom(" Press any key to continue", render.ColorWhite(), ss, win) } func (screen *HelpScreenUndead) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -208,7 +208,7 @@ func (screen *HelpScreenMounts) Enter(ctx screeniface.GameCtx) { td.DrawText("and your wizard cannot be", logical.V(0, 2), render.ColorWhite(), win) td.DrawText("killed unless their mount is", logical.V(0, 1), render.ColorWhite(), win) td.DrawText("killed first.", logical.V(0, 0), render.ColorWhite(), win) - textBottomColor(" Press any key to continue", render.ColorWhite(), ss, win) + textBottom(" Press any key to continue", render.ColorWhite(), ss, win) } func (screen *HelpScreenMounts) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -233,7 +233,7 @@ func (screen *HelpScreenVictory) Enter(ctx screeniface.GameCtx) { td.DrawText("When a player is killed, all", logical.V(0, 4), render.ColorWhite(), win) td.DrawText("of their creations will also", logical.V(0, 3), render.ColorWhite(), win) td.DrawText("vanish.", logical.V(0, 2), render.ColorWhite(), win) - textBottomColor(" Press any key to continue", render.ColorWhite(), ss, win) + textBottom(" Press any key to continue", render.ColorWhite(), ss, win) } func (screen *HelpScreenVictory) Step(ctx screeniface.GameCtx) screeniface.GameScreen { diff --git a/screen/initial.go b/screen/initial.go index 1b0146d..51cb4b2 100644 --- a/screen/initial.go +++ b/screen/initial.go @@ -20,11 +20,11 @@ func (screen *InitialScreen) Enter(ctx screeniface.GameCtx) { ss := ctx.GetSpriteSheet() ClearScreen(ss, win) td := TextDrawer(ss) - td.DrawTextColor(" MAYHEM - Remake of Chaos", logical.V(0, 9), render.ColorWhite(), win) - td.DrawTextColor(" By bobtfish", logical.V(0, 8), render.ColorWhite(), win) - td.DrawTextColor("How many wizards?", logical.V(0, 6), render.ColorWhite(), win) - td.DrawTextColor("(Press 2 to 8)", logical.V(0, 5), render.ColorWhite(), win) - textBottomColor(" Press H for help", render.ColorWhite(), ss, win) + td.DrawText(" MAYHEM - Remake of Chaos", logical.V(0, 9), render.ColorWhite(), win) + td.DrawText(" By bobtfish", logical.V(0, 8), render.ColorWhite(), win) + td.DrawText("How many wizards?", logical.V(0, 6), render.ColorWhite(), win) + td.DrawText("(Press 2 to 8)", logical.V(0, 5), render.ColorWhite(), win) + textBottom(" Press H for help", render.ColorWhite(), ss, win) } func (screen *InitialScreen) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -37,10 +37,10 @@ func (screen *InitialScreen) Step(ctx screeniface.GameCtx) screeniface.GameScree c := captureNumKey(win) if c >= 2 && c <= 8 { td := TextDrawer(ss) - td.DrawTextColor(fmt.Sprintf("%d", c), logical.V(18, 6), render.ColorWhite(), win) - td.DrawTextColor("Level of computer wizards?", logical.V(0, 3), render.ColorWhite(), win) - td.DrawTextColor("(Press 1 to 8)", logical.V(0, 2), render.ColorWhite(), win) - textBottomColor("", render.ColorWhite(), ss, win) + td.DrawText(fmt.Sprintf("%d", c), logical.V(18, 6), render.ColorWhite(), win) + td.DrawText("Level of computer wizards?", logical.V(0, 3), render.ColorWhite(), win) + td.DrawText("(Press 1 to 8)", logical.V(0, 2), render.ColorWhite(), win) + textBottom("", render.ColorWhite(), ss, win) return &ComputerDifficultyScreen{WizardCount: c} } return screen @@ -50,8 +50,8 @@ func (screen *ComputerDifficultyScreen) Enter(ctx screeniface.GameCtx) { win := ctx.GetWindow() ss := ctx.GetSpriteSheet() td := TextDrawer(ss) - td.DrawTextColor("Level of computer wizards?", logical.V(0, 3), render.ColorWhite(), win) - td.DrawTextColor("(Press 1 to 8)", logical.V(0, 2), render.ColorWhite(), win) + td.DrawText("Level of computer wizards?", logical.V(0, 3), render.ColorWhite(), win) + td.DrawText("(Press 1 to 8)", logical.V(0, 2), render.ColorWhite(), win) } func (screen *ComputerDifficultyScreen) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -59,7 +59,7 @@ func (screen *ComputerDifficultyScreen) Step(ctx screeniface.GameCtx) screenifac win := ctx.GetWindow() c := captureNumKey(win) if c >= 1 && c <= 8 { - TextDrawer(ss).DrawTextColor(fmt.Sprintf("%d", c), logical.V(27, 3), render.ColorWhite(), win) + TextDrawer(ss).DrawText(fmt.Sprintf("%d", c), logical.V(27, 3), render.ColorWhite(), win) return &PlayerNameScreen{ PlayersScreen: PlayersScreen{ WizardCount: screen.WizardCount, diff --git a/screen/move.go b/screen/move.go index 4fc19b6..6cf0dc3 100644 --- a/screen/move.go +++ b/screen/move.go @@ -31,7 +31,7 @@ func (screen *MoveAnnounceScreen) Step(ctx screeniface.GameCtx) screeniface.Game ss := ctx.GetSpriteSheet() players := ctx.(*game.Window).GetPlayers() batch := DrawBoard(ctx) - textBottomColor(fmt.Sprintf("%s's turn", players[screen.PlayerIdx].Name), render.GetColor(241, 241, 0), ss, batch) + textBottom(fmt.Sprintf("%s's turn", players[screen.PlayerIdx].Name), render.GetColor(241, 241, 0), ss, batch) batch.Draw(win) // 0 skips movement turn @@ -162,7 +162,7 @@ func (screen *MaybeDismount) Step(ctx screeniface.GameCtx) screeniface.GameScree if screen.Character.GetMovement() == 0 { // Magic castle / dark citadel isStaticCharacter = true } else { - textBottomColor("Dismount wizard (Y or N)", render.GetColor(244, 244, 0), ss, batch) + textBottom("Dismount wizard (Y or N)", render.GetColor(244, 244, 0), ss, batch) } batch.Draw(win) @@ -260,7 +260,7 @@ func (screen *MoveGroundCharacterScreen) Step(ctx screeniface.GameCtx) screenifa return ms.NextScreen } if ms.IllegalUndeadAttack { - textBottomColor("Undead - Cannot be attacked", render.GetColor(0, 244, 244), ss, win) + textBottom("Undead - Cannot be attacked", render.GetColor(0, 244, 244), ss, win) } if ms.DidMove { if ms.MountMove { @@ -515,7 +515,7 @@ func (screen *MoveFlyingCharacterScreen) Step(ctx screeniface.GameCtx) screenifa target := screen.WithCursor.CursorPosition if target.Distance(currentLocation) > screen.Character.GetMovement() { fmt.Printf("Out of range\n") - textBottomColor("Out of range", render.GetColor(0, 249, 249), ss, batch) + textBottom("Out of range", render.GetColor(0, 249, 249), ss, batch) screen.OutOfRange = true } else { // work out what's in this square, if nothing move to it, if something attack it @@ -526,7 +526,7 @@ func (screen *MoveFlyingCharacterScreen) Step(ctx screeniface.GameCtx) screenifa if ms.IllegalUndeadAttack { screen.OutOfRange = true screen.DisplayRange = false - textBottomColor("Undead - Cannot be attacked", render.GetColor(0, 244, 244), ss, win) + textBottom("Undead - Cannot be attacked", render.GetColor(0, 244, 244), ss, win) } if ms.DidMove { fmt.Printf("Did do flying move, finish screen\n") diff --git a/screen/players.go b/screen/players.go index 8c4905c..a95275a 100644 --- a/screen/players.go +++ b/screen/players.go @@ -30,8 +30,8 @@ func (screen *PlayerNameScreen) Enter(ctx screeniface.GameCtx) { ClearScreen(ss, win) screen.CurrentPlayer = player.NewPlayer() td := TextDrawer(ss) - td.DrawTextColor(fmt.Sprintf("PLAYER %d", GetPlayerCount(ctx)+1), logical.V(0, 9), render.ColorWhite(), win) - td.DrawTextColor("Enter name (12 letters max.)", logical.V(0, 8), render.ColorWhite(), win) + td.DrawText(fmt.Sprintf("PLAYER %d", GetPlayerCount(ctx)+1), logical.V(0, 9), render.ColorWhite(), win) + td.DrawText("Enter name (12 letters max.)", logical.V(0, 8), render.ColorWhite(), win) } func (screen *PlayerNameScreen) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -50,8 +50,8 @@ func (screen *PlayerNameScreen) Step(ctx screeniface.GameCtx) screeniface.GameSc screen.CurrentPlayer.Name = screen.CurrentPlayer.Name[:12] } td := TextDrawer(ss) - td.DrawTextColor(" ", logical.V(0, 7), render.ColorWhite(), win) - td.DrawTextColor(screen.CurrentPlayer.Name, logical.V(0, 7), render.ColorWhite(), win) + td.DrawText(" ", logical.V(0, 7), render.ColorWhite(), win) + td.DrawText(screen.CurrentPlayer.Name, logical.V(0, 7), render.ColorWhite(), win) return screen } @@ -62,7 +62,7 @@ type PlayerAIScreen struct { func (screen *PlayerAIScreen) Enter(ctx screeniface.GameCtx) { win := ctx.GetWindow() ss := ctx.GetSpriteSheet() - TextDrawer(ss).DrawTextColor("Computer controlled?", logical.V(0, 5), render.ColorWhite(), win) + TextDrawer(ss).DrawText("Computer controlled?", logical.V(0, 5), render.ColorWhite(), win) } func (screen *PlayerAIScreen) Step(ctx screeniface.GameCtx) screeniface.GameScreen { @@ -71,11 +71,11 @@ func (screen *PlayerAIScreen) Step(ctx screeniface.GameCtx) screeniface.GameScre td := TextDrawer(ss) if win.JustPressed(pixelgl.KeyY) || win.JustPressed(pixelgl.KeyN) { if win.JustPressed(pixelgl.KeyY) { - td.DrawTextColor("YES", logical.V(21, 5), render.ColorWhite(), win) + td.DrawText("YES", logical.V(21, 5), render.ColorWhite(), win) } if win.JustPressed(pixelgl.KeyN) { screen.CurrentPlayer.HumanPlayer = true - td.DrawTextColor("NO", logical.V(21, 5), render.ColorWhite(), win) + td.DrawText("NO", logical.V(21, 5), render.ColorWhite(), win) } return &PlayerIconScreen{PlayersScreen: screen.PlayersScreen} } @@ -91,8 +91,8 @@ func (screen *PlayerIconScreen) Enter(ctx screeniface.GameCtx) { ss := ctx.GetSpriteSheet() td := TextDrawer(ss) sd := SpriteDrawer(ss) - td.DrawTextColor("Which character?", logical.V(0, 4), render.ColorWhite(), win) - td.DrawTextColor("1 2 3 4 5 6 7 8", logical.V(0, 3), render.ColorWhite(), win) + td.DrawText("Which character?", logical.V(0, 4), render.ColorWhite(), win) + td.DrawText("1 2 3 4 5 6 7 8", logical.V(0, 3), render.ColorWhite(), win) for x := 0; x < 8; x++ { offset := logical.V(render.CharPixels/4+render.CharPixels/2*x*3, render.CharPixels*2-render.CharPixels/2) sd.WithOffset(offset).DrawSprite(logical.V(x, 23), logical.V(1, 3), win) @@ -105,7 +105,7 @@ func (screen *PlayerIconScreen) Step(ctx screeniface.GameCtx) screeniface.GameSc c := captureNumKey(win) if c >= 1 && c <= 8 { screen.CurrentPlayer.CharacterIcon = logical.V(c-1, 23) - TextDrawer(ss).DrawTextColor(fmt.Sprintf("%d", c), logical.V(17, 4), render.ColorWhite(), win) + TextDrawer(ss).DrawText(fmt.Sprintf("%d", c), logical.V(17, 4), render.ColorWhite(), win) sd := SpriteDrawer(ss) offset := sd.WinOffsetV.Add(logical.V(render.CharPixels/4, 0)) sd.WithOffset(offset).DrawSprite(screen.CurrentPlayer.CharacterIcon, logical.V(9, 4), win) @@ -136,8 +136,8 @@ func (screen *PlayerColorScreen) Enter(ctx screeniface.GameCtx) { ss := ctx.GetSpriteSheet() td := TextDrawer(ss) sd := SpriteDrawer(ss) - td.DrawTextColor("Which color?", logical.V(0, 2), render.ColorWhite(), win) - td.DrawTextColor("1 2 3 4 5 6 7 8", logical.V(0, 1), render.ColorWhite(), win) + td.DrawText("Which color?", logical.V(0, 2), render.ColorWhite(), win) + td.DrawText("1 2 3 4 5 6 7 8", logical.V(0, 1), render.ColorWhite(), win) colors := characterColorChoices() for x := 0; x < 8; x++ { offset := logical.V(render.CharPixels/4+render.CharPixels/2*x*3, render.CharPixels*2-render.CharPixels/2) @@ -157,7 +157,7 @@ func (screen *PlayerColorScreen) Step(ctx screeniface.GameCtx) screeniface.GameS c := captureNumKey(win) if c >= 1 && c <= 8 { colors := characterColorChoices() - td.DrawTextColor(fmt.Sprintf("%d", c), logical.V(13, 2), render.ColorWhite(), win) + td.DrawText(fmt.Sprintf("%d", c), logical.V(13, 2), render.ColorWhite(), win) offset := sd.WinOffsetV.Add(logical.V(render.CharPixels/4, 0)) sd.WithOffset(offset).DrawSpriteColor(screen.CurrentPlayer.CharacterIcon, logical.V(7, 2), colors[c-1], win) screen.CurrentPlayer.Color = colors[c-1] diff --git a/screen/turnmenu.go b/screen/turnmenu.go index 8bbc677..a4ecc03 100644 --- a/screen/turnmenu.go +++ b/screen/turnmenu.go @@ -23,7 +23,7 @@ func (screen *ExamineOneSpellScreen) Enter(ctx screeniface.GameCtx) { win := ctx.GetWindow() ss := ctx.GetSpriteSheet() ClearScreen(ss, win) - textBottomColor(" Press any key to continue", render.ColorWhite(), ss, win) + textBottom(" Press any key to continue", render.ColorWhite(), ss, win) td := TextDrawer(ss) rating := screen.Spell.GetLawRating() @@ -34,10 +34,10 @@ func (screen *ExamineOneSpellScreen) Enter(ctx screeniface.GameCtx) { if rating < 0 { name = fmt.Sprintf("%s (Chaos %d)", name, -rating) } - td.DrawTextColor(name, logical.V(3, 9), render.ColorWhite(), win) + td.DrawText(name, logical.V(3, 9), render.ColorWhite(), win) desc := screen.Spell.GetDescriptionArray(ctx.GetLawRating()) for i, line := range desc { - td.DrawTextColor(line, logical.V(3, 7-i), render.ColorWhite(), win) + td.DrawText(line, logical.V(3, 7-i), render.ColorWhite(), win) } } @@ -59,16 +59,16 @@ func (screen *SpellListScreen) Enter(ctx screeniface.GameCtx) { win := ctx.GetWindow() ss := ctx.GetSpriteSheet() ClearScreen(ss, win) - textBottomColor("Press 0 to return to main menu", render.ColorWhite(), ss, win) + textBottom("Press 0 to return to main menu", render.ColorWhite(), ss, win) td := TextDrawer(ss) - td.DrawTextColor(fmt.Sprintf("%s's spells", screen.Player.Name), logical.V(0, 9), render.ColorWhite(), win) + td.DrawText(fmt.Sprintf("%s's spells", screen.Player.Name), logical.V(0, 9), render.ColorWhite(), win) for i := 0; i < len(screen.Player.Spells); i++ { mod := i % 2 if mod == 1 { mod = 14 } spell := screen.Player.Spells[i] - td.DrawTextColor( + td.DrawText( fmt.Sprintf("%s%s%s", intToChar(i), spelliface.LawRatingSymbol(spell), spell.GetName()), logical.V(mod, 8-(i/2)), spells.CastingChanceColor(spell.GetCastingChance(ctx.GetLawRating())), @@ -145,7 +145,7 @@ type IsIllusionScreen struct { func (screen *IsIllusionScreen) Enter(ctx screeniface.GameCtx) { win := ctx.GetWindow() ss := ctx.GetSpriteSheet() - textBottomColor("Illusion? (Press Y or N)", render.ColorWhite(), ss, win) + textBottom("Illusion? (Press Y or N)", render.ColorWhite(), ss, win) screen.Player.CastIllusion = false } @@ -171,14 +171,14 @@ func (screen *TurnMenuScreen) Enter(ctx screeniface.GameCtx) { ss := ctx.GetSpriteSheet() ClearScreen(ss, win) fmt.Printf("index %d\n", screen.PlayerIdx) - textBottomColor(" Press Keys 1 to 4", render.ColorWhite(), ss, win) + textBottom(" Press Keys 1 to 4", render.ColorWhite(), ss, win) td := TextDrawer(ss) - td.DrawTextColor(players[screen.PlayerIdx].Name, logical.V(3, 7), render.ColorWhite(), win) - td.DrawTextColor(lawRatingText(ctx.GetLawRating()), logical.V(3, 6), render.ColorWhite(), win) - td.DrawTextColor("1. Examine Spells", logical.V(3, 5), render.ColorWhite(), win) - td.DrawTextColor("2. Select Spell", logical.V(3, 4), render.ColorWhite(), win) - td.DrawTextColor("3. Examine Board", logical.V(3, 3), render.ColorWhite(), win) - td.DrawTextColor("4. Continue With Game", logical.V(3, 2), render.ColorWhite(), win) + td.DrawText(players[screen.PlayerIdx].Name, logical.V(3, 7), render.ColorWhite(), win) + td.DrawText(lawRatingText(ctx.GetLawRating()), logical.V(3, 6), render.ColorWhite(), win) + td.DrawText("1. Examine Spells", logical.V(3, 5), render.ColorWhite(), win) + td.DrawText("2. Select Spell", logical.V(3, 4), render.ColorWhite(), win) + td.DrawText("3. Examine Board", logical.V(3, 3), render.ColorWhite(), win) + td.DrawText("4. Continue With Game", logical.V(3, 2), render.ColorWhite(), win) } func lawRatingText(r int) string { diff --git a/screen/winner.go b/screen/winner.go index b3914e8..15ce6d8 100644 --- a/screen/winner.go +++ b/screen/winner.go @@ -20,7 +20,7 @@ func (screen *WinnerScreen) Enter(ctx screeniface.GameCtx) { ss := ctx.GetSpriteSheet() ClearScreen(ss, win) td := TextDrawer(ss) - td.DrawTextColor(" WE HAVE A WINNER", logical.V(0, 9), render.ColorWhite(), win) + td.DrawText(" WE HAVE A WINNER", logical.V(0, 9), render.ColorWhite(), win) var winner *player.Player for i := 0; i < len(screen.Players); i++ { @@ -30,7 +30,7 @@ func (screen *WinnerScreen) Enter(ctx screeniface.GameCtx) { } } spaceLen := 16 - len(winner.Name)/2 - td.DrawTextColor(fmt.Sprintf("%s%s", strings.Repeat(" ", spaceLen), winner.Name), logical.V(0, 8), render.ColorWhite(), win) + td.DrawText(fmt.Sprintf("%s%s", strings.Repeat(" ", spaceLen), winner.Name), logical.V(0, 8), render.ColorWhite(), win) } func (screen *WinnerScreen) Step(ctx screeniface.GameCtx) screeniface.GameScreen {