Skip to content

Commit

Permalink
Updated docs, jumps to relevant section per tool. (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerelictDrone authored Aug 15, 2024
1 parent e041c35 commit a664318
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lua/wire/cpulib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,12 @@ if CLIENT or TESTING then
------------------------------------------------------------------------------
-- Show ZCPU/ZGPU documentation
CPULib.HandbookWindow = nil

function CPULib.ShowDocumentation(platform)
-- Platform bookmarks, it'll automatically jump to this section when opening.
local bookmarks = {
ZGPU="#zgpu",
ZSPU="#zspu"
}
function CPULib.ShowDocumentation(bookmark)
local w = ScrW() * 2/3
local h = ScrH() * 2/3
local browserWindow = vgui.Create("DFrame")
Expand All @@ -448,7 +452,7 @@ if CLIENT or TESTING then
browser:SetPos(10, 25)
browser:SetSize(w - 20, h - 35)

browser:OpenURL("http://wiki.wiremod.com/wiki/Category:ZCPU_Handbook")
browser:OpenURL("https://wiremod.github.io/Miscellaneous/zcpudoc.html"..bookmarks[bookmark] or "")
end
end

Expand Down

0 comments on commit a664318

Please sign in to comment.