Skip to content

Commit

Permalink
feat: added game date to in-game messages
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 4f0e29a4a76cd08bdad347a40e266236bf81d29985248b5dc9fa39bca0ca0cd5
  • Loading branch information
thindil committed Aug 7, 2023
1 parent 77d3583 commit 5582921
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nim/src/messages.nim
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ proc addMessage*(message: cstring; kind: cint; color: cint = ord(
## * color - The color used to draw the message
if messagesList.len() == gameSettings.messagesLimit:
messagesList.delete(i = 0)
messagesList.add(y = MessageData(message: $message, kind: kind.MessageType,
color: color.MessageColor))
messagesList.add(y = MessageData(message: "[" & $formattedTime(gameDate.year,
gameDate.month, gameDate.day, gameDate.hour, gameDate.minutes) & "] - " &
$message, kind: kind.MessageType, color: color.MessageColor))

proc addMessage*(message: string; mType: MessageType;
color: MessageColor = white) {.sideEffect, raises: [], tags: [].} =
Expand Down

0 comments on commit 5582921

Please sign in to comment.