Skip to content

Commit 5538033

Browse files
RegisleNightbladeQuickStick123LocalIdentityLocalIdentity
authored
Add a Help section (#4629)
* add toggle on about page for a help file * add more sections * add more shortcuts, and a method to filter lines to dev branch only * add slider hotkeys * Add basic indent support to help (removed github link in help text since it wasn't clickable or selectable) * Update help.txt Co-authored-by: QuickStick <31533893+QuickStick123@users.noreply.github.com> * Update help.txt * Formatting --------- Co-authored-by: Nightblade <Nightblade@users.noreply.github.com> Co-authored-by: QuickStick <31533893+QuickStick123@users.noreply.github.com> Co-authored-by: LocalIdentity <31035929+LocalIdentity@users.noreply.github.com> Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 2a6456a commit 5538033

File tree

2 files changed

+110
-2
lines changed

2 files changed

+110
-2
lines changed

help.txt

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---[Help File][1]
2+
3+
This file contains a list of shortcuts, and other misc things PoB has
4+
5+
---[Contents][2]
6+
7+
1. Intro
8+
2. Contents
9+
3. FAQ
10+
4. Hotkeys
11+
5. Other
12+
6. Timeless Jewels
13+
14+
---[FAQ][3]
15+
16+
---[Hotkeys][4]
17+
18+
General Shortcuts:
19+
20+
Ctrl + 1 Jump to tree tab
21+
Ctrl + 2 Jump to skills tab
22+
Ctrl + 3 Jump to items tab
23+
Ctrl + 4 Jump to calcs tab
24+
Ctrl + 5 Jump to config tab
25+
Ctrl + 6 Jump to notes tab
26+
Ctrl + I Jump to import tab
27+
Ctrl + A Select all
28+
Ctrl + C Copy
29+
Ctrl + F Show find / search box (e.g. unique item / tree)
30+
Ctrl + N New build (in build selection menu)
31+
Ctrl + S Save build to file
32+
Ctrl + U Check for update
33+
Ctrl + V or RMB Paste
34+
Ctrl + W or Mouse 4 Close Build (gives save prompt if unsaved)
35+
Ctrl + X Cut
36+
Ctrl + Y Redo
37+
Ctrl + Z Undo
38+
Ctrl + BSP / DEL Faster text delete
39+
Ctrl + + /-/0 Zoom in / Out / Reset
40+
F1 Open item/gem/etc in poewiki.net
41+
F2 Rename item, set, etc.
42+
E On an equipped item will open it on the edit menu on the right.
43+
Ctrl + LMB Enable / disable gems
44+
Ctrl + RMB Enable / disable gems from Full DPS
45+
Mouse 4/5 Undo / Redo path respectively (in build selection menu)
46+
Shift While scrolling on a slider makes it 5 times faster
47+
Ctrl While scrolling on a slider makes it 5 times slower
48+
49+
When creating an item either through item creator or adding an item pressing ctrl will add it to the first slot and ctrl+shift will add it to the second slot e.g. offhand for a weapon.
50+
51+
Passive Tree Shortcuts:
52+
53+
Ctrl Hide tooltips while held
54+
P Toggle node power
55+
Ctrl + D Toggle stat diff display
56+
PgUp/PgDn/MWheel Zoom in / out (hold with shift to increase amount of zoom x 3)
57+
Ctrl + LMB Zoom in on mouse cursor position
58+
Hold Shift Enable "path trace mode" (nodes highlighted will be added to a path which will be allocated when the final node is clicked on the tree)
59+
60+
Developer Use
61+
62+
General Shortcuts:
63+
64+
Ctrl + ` Toggle console (console supports most standard editing shortcuts)
65+
Pause Toggle profiling
66+
DEV[ ]
67+
DEV[Developer Mode Shortcuts:]
68+
DEV[ ]
69+
DEV[Ctrl Rebuild mod cache (hold key during reload / refresh)]
70+
DEV[Ctrl + Shift Allow tree download]
71+
DEV[Alt Show advanced mod breakdown / passing]
72+
DEV[F5 Restart]
73+
DEV[F6 Run garbage collector]
74+
DEV[Shift Copy export xml to clipboard (hold key during export)]
75+
76+
---[Other Notable Things][5]
77+
78+
Adding ^ and then a number or hex code before text will change the colour of the text, eg ^^77 will make all text white
79+
80+
---[Timeless Jewels][6]
81+

src/Modules/Main.lua

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,28 @@ function main:OpenAboutPopup()
918918
end
919919
end
920920
end
921+
local helpList = { }
922+
local helpName = launch.devMode and "../help.txt" or "help.txt"
923+
local helpFile = io.open(helpName, "r")
924+
if helpFile then
925+
helpFile:close()
926+
for line in io.lines(helpName) do
927+
local title, titleIndex = line:match("^---%[(.+)%]%[(.+)%]$")
928+
if title then
929+
if #helpList > 0 then
930+
t_insert(helpList, { height = 10 })
931+
end
932+
t_insert(helpList, { height = 18, "^7"..title.." ("..titleIndex..")" })
933+
else
934+
local dev = line:match("^DEV%[(.+)%]$")
935+
if not ( dev and not launch.devMode ) then
936+
line = (dev or line)
937+
local outdent, indent = line:match("(.*)\t+(.*)")
938+
t_insert(helpList, { height = 12, "^7"..(outdent or line), "^7"..(indent or "") })
939+
end
940+
end
941+
end
942+
end
921943
local controls = { }
922944
controls.close = new("ButtonControl", {"TOPRIGHT",nil,"TOPRIGHT"}, -10, 10, 50, 20, "Close", function()
923945
self:ClosePopup()
@@ -927,8 +949,13 @@ function main:OpenAboutPopup()
927949
controls.github = new("ButtonControl", nil, 0, 62, 438, 18, "^7GitHub page: ^x4040FFhttps://github.com/PathOfBuildingCommunity/PathOfBuilding", function(control)
928950
OpenURL("https://github.com/PathOfBuildingCommunity/PathOfBuilding")
929951
end)
930-
controls.verLabel = new("LabelControl", { "TOPLEFT", nil, "TOPLEFT" }, 10, 82, 0, 18, "^7Version history:")
931-
controls.changelog = new("TextListControl", nil, 0, 100, 630, 390, nil, changeList)
952+
controls.verLabel = new("ButtonControl", { "TOPLEFT", nil, "TOPLEFT" }, 10, 85, 100, 18, "^7Version history:", function()
953+
controls.changelog.list = changeList
954+
end)
955+
controls.helpLabel = new("ButtonControl", { "TOPLEFT", nil, "TOPLEFT" }, 600, 85, 40, 18, "^7Help:", function()
956+
controls.changelog.list = helpList
957+
end)
958+
controls.changelog = new("TextListControl", nil, 0, 103, 630, 387, {{ x = 1, align = "LEFT" }, { x = 110, align = "LEFT" }}, changeList)
932959
self:OpenPopup(650, 500, "About", controls)
933960
end
934961

0 commit comments

Comments
 (0)