Skip to content

Commit 193db9e

Browse files
committed
v2.1.0: added Open prefs file option in the about modal
1 parent 3f1dd80 commit 193db9e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

main.nim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@ proc drawAboutModal(app: App) =
5757
5858
igText(cstring app.config.version)
5959
60+
if app.prefs.path.len > 0:
61+
igSameLine()
62+
63+
igSetCursorPosX(igGetCurrentWindow().size.x - igCalcFrameSize("Open prefs file").x - igGetStyle().windowPadding.x)
64+
65+
if igButton("Open prefs file"):
66+
openURL(app.prefs.path)
67+
68+
if igIsItemHovered():
69+
igSetTooltip(cstring app.prefs.path & " " & FA_FileTextO)
70+
6071
igEndPopup()
6172
6273
proc drawMainMenuBar(app: var App) =

src/configtype.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type
1717
Config* = object
1818
name* = "ImExample"
1919
comment* = "ImExample is a simple Dear ImGui application example"
20-
version* = "2.0.0"
20+
version* = "2.1.0"
2121
website* = "https://github.com/Patitotective/ImTemplate"
2222
authors* = [
2323
(name: "Patitotective", url: "https://github.com/Patitotective"),

0 commit comments

Comments
 (0)