Skip to content

Commit

Permalink
Add blend mode
Browse files Browse the repository at this point in the history
  • Loading branch information
semyon422 committed Feb 10, 2020
1 parent 0383a65 commit 5661389
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sphere/screen/gameplay/AccuracyGraph.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ AccuracyGraph.loadGui = function(self)
self.layer = self.data.layer
self.lineColor = self.data.lineColor
self.color = self.data.color
self.blendMode = self.data.blendMode
self.blendAlphaMode = self.data.blendAlphaMode

self.score = self.gui.score
self.container = self.gui.container
Expand Down Expand Up @@ -60,6 +62,8 @@ AccuracyGraph.load = function(self)
x = 0, y = 0,
cs = self.allcs,
layer = self.layer,
blendMode = self.blendMode,
blendAlphaMode = self.blendAlphaMode,
image = self.canvas
})
self.image:reload()
Expand Down
3 changes: 3 additions & 0 deletions sphere/screen/gameplay/CloudburstEngine/NoteSkin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ NoteSkin.loadContainers = function(self)
for _, imageData in pairs(self.noteSkinData.images) do
local container = SpriteBatch:new(nil, self.images[imageData.name], 1000)
container.layer = imageData.layer
container.blendMode = imageData.blendMode
container.blendAlphaMode = imageData.blendAlphaMode

self.containers[imageData.name] = container
table.insert(self.containerList, container)
end
Expand Down
4 changes: 4 additions & 0 deletions sphere/screen/gameplay/InputImage.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ InputImage.loadGui = function(self)
self.released = self.data.released
self.inputType = self.data.inputType
self.inputIndex = self.data.inputIndex
self.blendMode = self.data.blendMode
self.blendAlphaMode = self.data.blendAlphaMode

self.container = self.gui.container
self.engine = self.gui.engine
Expand All @@ -33,6 +35,8 @@ InputImage.load = function(self)
y = self.y,
sx = 1,
sy = 1,
blendMode = self.blendMode,
blendAlphaMode = self.blendAlphaMode,
color = {255, 255, 255, 255}
})
self.drawable:reload()
Expand Down
4 changes: 4 additions & 0 deletions sphere/screen/gameplay/ProgressBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ ProgressBar.loadGui = function(self)
self.color = self.data.color
self.mode = self.data.mode
self.direction = self.data.direction
self.blendMode = self.data.blendMode
self.blendAlphaMode = self.data.blendAlphaMode

self.score = self.gui.score
self.container = self.gui.container
Expand All @@ -35,6 +37,8 @@ ProgressBar.load = function(self)
cs = self.cs,
color = self.color,
mode = "fill",
blendMode = self.blendMode,
blendAlphaMode = self.blendAlphaMode,
layer = self.layer
})
self.progressRectangle:reload()
Expand Down
4 changes: 4 additions & 0 deletions sphere/screen/gameplay/StaticObject.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ StaticObject.loadGui = function(self)
self.h = self.data.h
self.layer = self.data.layer
self.image = self.data.image
self.blendMode = self.data.blendMode
self.blendAlphaMode = self.data.blendAlphaMode

self.container = self.gui.container

Expand All @@ -28,6 +30,8 @@ StaticObject.load = function(self)
y = self.y,
sx = 1,
sy = 1,
blendMode = self.blendMode,
blendAlphaMode = self.blendAlphaMode,
color = {255, 255, 255, 255}
})
self.drawable:reload()
Expand Down
4 changes: 4 additions & 0 deletions sphere/screen/gameplay/TextDisplay.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ TextDisplay.loadGui = function(self)
self.size = self.data.size
self.format = self.data.format
self.field = self.data.field
self.blendMode = self.data.blendMode
self.blendAlphaMode = self.data.blendAlphaMode

self.score = self.gui.score
self.container = self.gui.container
Expand All @@ -38,6 +40,8 @@ TextDisplay.load = function(self)
limit = self.w,
align = self.align,
color = self.color,
blendMode = self.blendMode,
blendAlphaMode = self.blendAlphaMode,
font = aquafonts.getFont(self.font, self.size)
})
self.textFrame:reload()
Expand Down

0 comments on commit 5661389

Please sign in to comment.