Skip to content

Commit

Permalink
refactor: moved executeCurrentRowCommand to Nim
Browse files Browse the repository at this point in the history
FossilOrigin-Name: c7fb869e5fee7dbd016e04f5c649da886a615b2288cb9b2fa94df77480414158
  • Loading branch information
thindil committed Nov 13, 2023
1 parent 48ae64a commit 56ee9a4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nim/src/ui/table.nim
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,15 @@ proc updateCurrentRowCommand(clientData: cint; interp: PInterp; argc: cint;
except:
return tclError

proc executeCurrentRowCommand(clientData: cint; interp: PInterp; argc: cint;
argv: openArray[cstring]): TclResults =
let canvas = $argv[1]
return tclEval(script = canvas & " bind row$currentrow <Button-1" & (
if gameSettings.rightButton: "3" else: "1") & ">")

proc addCommands*() =
addCommand("UpdateCurrentRow", updateCurrentRowCommand)
addCommand("ExecuteCurrentRow", executeCurrentRowCommand)

# Temporary code for interfacing with Ada

Expand Down

0 comments on commit 56ee9a4

Please sign in to comment.