Effect Radar Implementation v1 #46
|
@ -1078,23 +1078,30 @@ end
|
|||
|
||||
---This function is basically a workaround for the ForceRender call
|
||||
local function drawRadar()
|
||||
gfx.FontSize(28)
|
||||
gfx.Translate(500, 500)
|
||||
local x, y = 375, 650
|
||||
local scale = 0.666
|
||||
|
||||
local strokeColor = ColorRGBA.new(255, 255, 255, 255)
|
||||
gfx.FontSize(28)
|
||||
gfx.Translate(x, y)
|
||||
gfx.Scale(scale, scale)
|
||||
|
||||
local strokeColor = ColorRGBA.new(255, 255, 255, 128)
|
||||
local fillColor = ColorRGBA.new(0, 0, 0, 191)
|
||||
|
||||
gfx.ResetScissor()
|
||||
radar:drawBackground(fillColor)
|
||||
radar:drawOutline(3, strokeColor)
|
||||
|
||||
--NOTE: Bug: forcerender resets every transformation, need to re-setup view transform afterwards
|
||||
--Bug: ForceRender resets every transformation, need to re-setup view transform afterwards
|
||||
--ForceRender also resets gfx stack, USC will crash if you try to call gfx.Restore(),
|
||||
--make sure the gfx stack is clean before calling radar:drawRadarMesh()
|
||||
radar:drawRadarMesh()
|
||||
|
||||
Dim.transformToScreenSpace()
|
||||
|
||||
gfx.Save()
|
||||
gfx.Translate(500,500)
|
||||
gfx.Translate(x, y)
|
||||
gfx.Scale(scale, scale)
|
||||
radar:drawRadialTicks(strokeColor)
|
||||
radar:drawAttributes()
|
||||
gfx.Restore()
|
||||
|
|
Loading…
Reference in New Issue