@@ -14,8 +14,7 @@ cvars.AddChangeCallback("starfall_toolscreen_fps", function(_, _, value)
14
14
end )
15
15
16
16
-- Tuning vars
17
- local color_background = Color (33 , 33 , 40 , 30 ) -- Background color, alpha controls how fast the stars fade out
18
- local color_background_solid = ColorAlpha (color_background , 255 ) -- Solid version of the background color for the Linux fix
17
+ local color_background = Color (41 , 38 , 52 ) -- Background color
19
18
local color_text = Color (240 , 240 , 253 , 255 ) -- Text color for subtitle and scrolling text
20
19
local color_text_outline = ColorAlpha (color_background , 80 ) -- Outline text color for subtitle and scrolling text
21
20
local star_count = 8 -- Amount of stars to render
@@ -117,7 +116,8 @@ local star_canvas, star_canvas_material
117
116
hook .Add (" PreRender" , " StarfallToolscreenPrepare" , function ()
118
117
star_canvas = GetRenderTarget (" starfall_tool_canvas" , 256 , 256 )
119
118
star_canvas_material = CreateMaterial (" starfall_tool_material" , " UnlitGeneric" , { [" $basetexture" ] = star_canvas :GetName () })
120
- star_canvas_material :SetInt (" $flags" , 0x8000 + 0x0020 + 0x0010 )
119
+ star_canvas_material :SetInt (" $flags" , 0x8000 + 0x0010 )
120
+ render .ClearRenderTarget (star_canvas , color_background )
121
121
hook .Remove (" PreRender" , " StarfallToolscreenPrepare" )
122
122
end )
123
123
130
130
131
131
---- ---------------------------------------
132
132
133
- local is_linux = system .IsLinux ()
134
133
local ply_eye_ang_prev = Angle ()
135
134
function SF .DrawToolgunScreen (w , h , title , scroll_text )
136
135
curtime = RealTime ()
@@ -153,9 +152,8 @@ function SF.DrawToolgunScreen(w, h, title, scroll_text)
153
152
local blur = math_clamp (8 + 600 * dt , 12 , 30 )
154
153
render .BlurRenderTarget (star_canvas , blur , blur , 1 )
155
154
156
- surface .SetMaterial (star_canvas_material )
157
- surface .SetDrawColor (color_background .r , color_background .g , color_background .b , math_clamp (3000 * dt + 20 , 40 , 120 ))
158
- surface .DrawTexturedRect (0 , 0 , w , h )
155
+ surface .SetDrawColor (color_background .r , color_background .g , color_background .b , math_clamp (2500 * dt + 20 , 30 , 100 ))
156
+ surface .DrawRect (0 , 0 , w , h )
159
157
160
158
surface .SetMaterial (star_material )
161
159
for _ , star in ipairs (stars ) do
@@ -164,11 +162,6 @@ function SF.DrawToolgunScreen(w, h, title, scroll_text)
164
162
render .PopRenderTarget ()
165
163
end
166
164
167
- if is_linux then -- On Linux the original tool background is still visible
168
- surface .SetDrawColor (color_background_solid )
169
- surface .DrawRect (0 , 0 , w , h )
170
- end
171
-
172
165
surface .SetDrawColor (255 , 255 , 255 , 255 )
173
166
surface .SetMaterial (star_canvas_material )
174
167
surface .DrawTexturedRect (0 , 0 , w , h )
0 commit comments