Permalink
Browse files

Update Outline (thanks floris)

Add missing file
Add text outlines to healthbar percentages and text
  • Loading branch information...
1 parent 0f1a760 commit 0d4497bccb66989849fd9a13ac79a740bb65f859 @ForbodingAngel ForbodingAngel committed Feb 6, 2017
Binary file not shown.
@@ -20,7 +20,7 @@ function widget:GetInfo()
date = "Dec 06, 2007",
license = "GNU GPL, v2 or later",
layer = -10,
- enabled = true -- loaded by default?
+ enabled = false -- loaded by default?
}
end
@@ -72,6 +72,7 @@ local glUseShader = gl.UseShader
local glUniform = gl.Uniform
local glUniformInt = gl.UniformInt
+local glBlending = gl.Blending
local glClear = gl.Clear
local glTexRect = gl.TexRect
local glColor = gl.Color
@@ -305,7 +306,8 @@ local blur_v = function()
end
function widget:DrawWorldPreUnit()
- glCopyToTexture(depthtex, 0, 0, 0, 0, vsx, vsy)
+ glBlending(GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA)
+ glCopyToTexture(depthtex, 0, 0, 0, 0, vsx, vsy)
glTexture(depthtex)
if (resChanged) then
@@ -326,11 +328,12 @@ function widget:DrawWorldPreUnit()
glRenderToTexture(blurtex, blur_h)
glTexture(blurtex)
glRenderToTexture(offscreentex, blur_v)
-
+
glCallList(enter2d)
glTexture(offscreentex)
glTexRect(-1-0.5/vsx,1+0.5/vsy,1+0.5/vsx,-1-0.5/vsy)
glCallList(leave2d)
+ glBlending(false)
end
--------------------------------------------------------------------------------
@@ -948,10 +948,10 @@ do
glMyText(1)
end
glColor(1,1,1,barAlpha)
- glText(barInfo.text,barStart,yoffset-outlineSize,4,"r")
+ glText(barInfo.text,barStart,yoffset-outlineSize,4,"ro")
if (drawBarTitles and barInfo.title ~= "health") then
glColor(1,1,1,titlesAlpha)
- glText(barInfo.title,0,yoffset-outlineSize,2.35,"cd")
+ glText(barInfo.title,0,yoffset-outlineSize,2.35,"cdo")
end
if (barShader) then glMyText(0) end
end
@@ -974,7 +974,7 @@ do
end
if (drawBarTitles and barInfo.title ~= "health") then
glColor(1,1,1,featureTitlesAlpha)
- glText(barInfo.title,0,yoffset-outlineSize,2.35,"cd")
+ glText(barInfo.title,0,yoffset-outlineSize,2.35,"cdo")
end
if (barShader) then glMyText(0) end
end

0 comments on commit 0d4497b

Please sign in to comment.