Skip to content

Commit

Permalink
refactor: use Nim code to add commands related to various actions in …
Browse files Browse the repository at this point in the history
…bases

FossilOrigin-Name: 9be9889f6539eb8877b6c4b3acaca45f7ac287f198ae25cd0d0266d2db774b64
  • Loading branch information
thindil committed Sep 29, 2024
1 parent 64af693 commit 992aeeb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
9 changes: 4 additions & 5 deletions nim/src/ui/basesui.nim
Original file line number Diff line number Diff line change
Expand Up @@ -607,10 +607,9 @@ proc sortBaseItemsCommand(clientData: cint; interp: PInterp; argc: cint;
proc addCommands*() {.sideEffect, raises: [], tags: [WriteIOEffect, TimeEffect].} =
## Adds Tcl commands related to the trades UI
try:
discard
# addCommand("ShowBaseUI", showBaseUiCommand)
# addCommand("BaseAction", baseActionCommand)
# addCommand("SearchRecipes", searchRecipesCommand)
# addCommand("ShowBaseMenu", showBaseMenuCommand)
addCommand("ShowBaseUI", showBaseUiCommand)
addCommand("BaseAction", baseActionCommand)
addCommand("SearchRecipes", searchRecipesCommand)
addCommand("ShowBaseMenu", showBaseMenuCommand)
except:
showError(message = "Can't add a Tcl command.")
2 changes: 1 addition & 1 deletion nim/src/ui/mapsui.nim
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ proc createGameUi*() {.sideEffect, raises: [], tags: [WriteIOEffect, TimeEffect,
# tradesui.addCommands()
basesschoolui.addCommands()
basesrecruitui.addCommands()
# basesui.addCommands()
basesui.addCommands()
basesshipyardui.addCommands()
baseslootui.addCommands()
# knowledge.addCommands()
Expand Down
3 changes: 0 additions & 3 deletions src/ui/maps-ui.adb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ with Tcl.Tk.Ada.Widgets.TtkButton;
with Tcl.Tk.Ada.Widgets.TtkFrame;
with Tcl.Tk.Ada.Widgets.TtkPanedWindow;
with Tcl.Tk.Ada.Winfo;
with Bases;
with Bases.UI;
with Crafts.UI;
with CoreUI;
with DebugUI;
Expand Down Expand Up @@ -100,7 +98,6 @@ package body Maps.UI is
Messages.UI.Add_Commands;
GameOptions.Add_Commands;
Trades.UI.Add_Commands;
Bases.UI.Add_Commands;
Knowledge.Add_Commands;
Missions.UI.Add_Commands;
Statistics.UI.Add_Commands;
Expand Down

0 comments on commit 992aeeb

Please sign in to comment.