Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion fidget.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ requires "typography >= 0.7.8"
requires "pixie >= 1.1.2"
requires "print >= 0.1.0"
requires "opengl >= 1.2.3"
requires "html5_canvas >= 1.3"
requires "staticglfw >= 4.1.2"
requires "cligen >= 1.0.0"
requires "supersnappy >= 1.0.0"
requires "bumpy >= 1.0.0"
requires "jsutils >= 0.1.4"
13 changes: 13 additions & 0 deletions src/fidget.nim
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ template onRightClick*(inner: untyped) =
if buttonPress[MOUSE_RIGHT] and mouseOverlapLogic():
inner

template onMiddleClick*(inner: untyped) =
## On right click event handler.
if buttonPress[MOUSE_MIDDLE] and mouseOverlapLogic():
inner

template onMouseDown*(inner: untyped) =
## On when mouse is down and overlapping the element.
if buttonDown[MOUSE_LEFT] and mouseOverlapLogic():
Expand Down Expand Up @@ -262,6 +267,14 @@ proc characters*(text: string) =
if current.text != text:
current.text = text

when defined(js):
proc asHtml*(asHtml: bool) =
## asHTML
current.asHtml = asHtml

template tooltip*(text: string) =
current.tooltip = text

proc image*(imageName: string) =
## Sets image fill.
current.imageName = imageName
Expand Down
318 changes: 0 additions & 318 deletions src/fidget/_cairo.nim

This file was deleted.

Loading