Skip to content

Commit

Permalink
add two color theme (Musical & Yohane)
Browse files Browse the repository at this point in the history
  • Loading branch information
MKN-Makuno committed Aug 2, 2024
1 parent 3b07711 commit 6706be4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: build
on: [pull_request]
on: [push, pull_request]

jobs:
linux-build:
Expand Down
27 changes: 22 additions & 5 deletions game/color_theme.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,68 @@

local color = require("color")
local ColorTheme = {
[1] = {
[1] = { -- µ's
-- ff4fae
currentColor = {0xff, 0x4f, 0xae, color.hexFF4FAE},
-- ef46a1
currentColorDark = {0xef, 0x46, 0xa1, color.hexEF46A1},
-- c31c76
currentColorDarker = {0xc3, 0x1c, 0x76, color.hexC31C76}
},
[2] = {
[2] = { -- Aqours
-- 46baff
currentColor = {0x46, 0xba, 0xff, color.hex46BAFF},
-- 3bacf0
currentColorDark = {0x3b, 0xac, 0xf0, color.hex3BACF0},
-- 007ec6
currentColorDarker = {0x00, 0x7e, 0xc6, color.hex007EC6}
},
[3] = {
[3] = { -- NijiGaku
-- ffc22e
currentColor = {0xff, 0xc2, 0x2e, color.hexFFC22E},
-- e8b126
currentColorDark = {0xe8, 0xb1, 0x26, color.hexE8B126},
-- ac7b0a
currentColorDarker = {0xac, 0x7b, 0x0a, color.hexAC7B0A}
},
[4] = {
[4] = { -- Liella
-- d991d8
currentColor = {0xd9, 0x91, 0xd8, color.hexD991D8},
-- cc6bcb
currentColorDark = {0xcc, 0x6b, 0xcb, color.hexCC6BCB},
-- bf45bd
currentColorDarker = {0xbf, 0x45, 0xbd, color.hexBF45BD}
},
[5] = {
[5] = { -- Hasunosora
-- fb9ba9
currentColor = {0xfb, 0x9b, 0xa9, color.hexFB9BA9},
-- fb8a9b
currentColorDark = {0xfb, 0x8a, 0x9b, color.hexFB8A9B},
-- fb7085
currentColorDarker = {0xfb, 0x70, 0x85, color.hexFB7085}
},
[6] = { -- (School Idol) Musical
-- f70042
currentColor = {0xf7, 0x09, 0x42, color.hexF70042},
-- de003b
currentColorDark = {0xde, 0x00, 0x3b, color.hexDE003B},
-- c40035
currentColorDarker = {0xc4, 0x00, 0x35, color.hexC40035}
},
[7] = { -- Yohane (the Parhelion)
-- 23a2b0
currentColor = {0x23, 0xa2, 0xb0, color.hex23A2B0},
-- 1e8a96
currentColorDark = {0x1e, 0x8a, 0x96, color.hex1E8A96},
-- 19737d
currentColorDarker = {0x19, 0x73, 0x7d, color.hex19737D}
}
}

local currentColor, currentColorDark, currentColorDarker

-- colid: 1 = μ's, 2 = Aqours, 3 = NijiGaku, 4 = Liella, 5 = Hasunosora
-- 6 = Musical, 7 = Yohane
function ColorTheme.init(colid)
if currentColor then return end
return ColorTheme.set(colid)
Expand Down
4 changes: 2 additions & 2 deletions game/states/beatmap_select.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ do
love.graphics.setColor(self.selected and ColorTheme.get() or color.hex434242)
love.graphics.rectangle("fill", x, y, self.width, self.height)
love.graphics.setShader(Util.drawText.workaroundShader)
love.graphics.setColor(color.black)
love.graphics.setColor(color.white)
love.graphics.draw(self.name, x + 110, y + 20)
love.graphics.draw(self.format, x + 110, y + 60)

Expand Down Expand Up @@ -226,7 +226,7 @@ do
love.graphics.setColor(color.hexFFDF35)
love.graphics.rectangle("fill", x, y, self.width, self.height, 20, 20)
love.graphics.rectangle("line", x, y, self.width, self.height, 20, 20)
love.graphics.setColor(color.white)
love.graphics.setColor(color.black)
love.graphics.draw(self.image, x + 12, y + 7, 0, 0.32)
Util.drawText(self.text, x + 37, y + 12)

Expand Down
2 changes: 1 addition & 1 deletion game/states/gamesetting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function gameSetting:load()
-- General settings
if self.persist.generalSetting == nil then
local frame = newSettingFrame()
local themeDisplay = {"μ's", "Aqours", "NijiGaku", "Liella", "Hasunosora"}
local themeDisplay = {"μ's", "Aqours", "NijiGaku", "Liella", "Hasunosora", "Musical", "Yohane"}
local tapSoundDisplay = {}
for i = 1, #tapSound do
tapSoundDisplay[i] = tapSound[i].name
Expand Down

0 comments on commit 6706be4

Please sign in to comment.