Skip to content

Commit

Permalink
Brighten the background
Browse files Browse the repository at this point in the history
  • Loading branch information
teejusb committed Jun 7, 2024
1 parent cbd7c4d commit 120ce2e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions BGAnimations/_shared background/Static.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ local file = ...

local style = ThemePrefs.Get("VisualStyle")

local function Brighten(color, intensity)
color[1] = math.min(1, color[1] * intensity)
color[2] = math.min(1, color[2] * intensity)
color[3] = math.min(1, color[3] * intensity)
return color
end

local af = Def.ActorFrame {
InitCommand=function(self)
self:diffusealpha(0)
Expand Down Expand Up @@ -34,13 +41,11 @@ local af = Def.ActorFrame {
end
self:xy(_screen.cx, _screen.cy)
:zoomto(_screen.h * 16 / 9, _screen.h)
:blend("BlendMode_Add")
:diffusealpha(0.8)
:diffuse(GetCurrentColor(true))
:diffuse(Brighten(GetCurrentColor(true), 3))
self:visible(style == "SRPG8")
end,
ColorSelectedMessageCommand=function(self)
self:diffuse(GetCurrentColor(true))
self:diffuse(Brighten(GetCurrentColor(true), 3))
end,
VisualStyleSelectedMessageCommand=function(self)
if style ~= "SRPG8" then self:Load(nil) return end
Expand All @@ -53,9 +58,7 @@ local af = Def.ActorFrame {
end
self:xy(_screen.cx, _screen.cy)
:zoomto(_screen.h * 16 / 9, _screen.h)
:blend("BlendMode_Add")
:diffusealpha(0.8)
:diffuse(GetCurrentColor(true))
:diffuse(Brighten(GetCurrentColor(true), 3))
end,
AllowThemeVideoChangedMessageCommand=function(self)
if style ~= "SRPG8" then self:Load(nil) return end
Expand All @@ -68,9 +71,7 @@ local af = Def.ActorFrame {
end
self:xy(_screen.cx, _screen.cy)
:zoomto(_screen.h * 16 / 9, _screen.h)
:blend("BlendMode_Add")
:diffusealpha(0.8)
:diffuse(GetCurrentColor(true))
:diffuse(Brighten(GetCurrentColor(true), 3))
end,
}
}
Expand Down

0 comments on commit 120ce2e

Please sign in to comment.