Skip to content

Commit

Permalink
feat: continue work on new version of the game's main menu
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 97251ec0f2bc81cf3a497956dd7016eaf8f4f288b6bc3da40a415e993ccd3a21
  • Loading branch information
thindil committed Nov 3, 2024
1 parent 81674d5 commit b5a7934
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/newui/mainmenu.nim
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,18 @@ proc showNews*(state: var GameState) {.raises: [], tags: [], contractual.} =
## * state - the current game's state
##
## Returns the modified parameter state.
setLayoutRowDynamic(height = (windowHeight - 40).float, cols = 1)
resetTooltips()
setLayoutRowDynamic(height = (windowHeight - 50).float, cols = 1)
label(str = "here")
setLayoutRowDynamic(height = 40, cols = 2)
labelButton(title = "Test"):
addTooltip(bounds = getWidgetBounds(), text = "Show all changes to the game since previous big stable version")
labelButton(title = "Show all changes"):
echo "button pressed"
state = news
addTooltip(bounds = getWidgetBounds(), text = "Back to the main menu")
labelButton(title = "Back to menu"):
state = mainMenu
return
showTooltips()

proc showMainMenu*(state: var GameState) {.raises: [], tags: [], contractual.} =
## Show the game's main menu and set the game's state
Expand Down Expand Up @@ -100,4 +106,3 @@ proc showMainMenu*(state: var GameState) {.raises: [], tags: [], contractual.} =
state = quitGame
return
showTooltips()
state = mainMenu

0 comments on commit b5a7934

Please sign in to comment.