Skip to content

Commit

Permalink
exp: add menu items to adjust polygon offset factor and units
Browse files Browse the repository at this point in the history
fix #373
  • Loading branch information
alexey-lysiuk committed Dec 1, 2024
1 parent 7a0aed2 commit 7c2e05e
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Misc/qs_pak/scripts/expmode_engine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ local imWindowNoSavedSettings <const> = ImGui.WindowFlags.NoSavedSettings

local defaultTableFlags <const> = imTableFlags.Borders | imTableFlags.Resizable | imTableFlags.RowBg | imTableFlags.ScrollY

local PolyOffsetFactor <const> = render.polyoffset.factor
local PolyOffsetUnits <const> = render.polyoffset.units

local resetsearch <const> = expmode.resetsearch
local searchbar <const> = expmode.searchbar
local updatesearch <const> = expmode.updatesearch
Expand Down Expand Up @@ -535,6 +538,28 @@ expmode.addaction(function ()

imSeparator()

if imBeginMenu('Polygon Offset') then
local changed, value

value = PolyOffsetFactor()
changed, value = imSliderFloat('Factor', value, -16, 16)

if changed then
PolyOffsetFactor(value)
end

value = PolyOffsetUnits()
changed, value = imSliderFloat('Units', value, -16, 16)

if changed then
PolyOffsetUnits(value)
end

imEndMenu()
end

imSeparator()

if imMenuItem('Sounds\u{85}') then
expmode.engine.sounds()
end
Expand Down

0 comments on commit 7c2e05e

Please sign in to comment.