Skip to content

Commit

Permalink
Add Unique color scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
shioyadan committed Aug 17, 2019
1 parent a02113f commit 209e3c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions konata_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ class KonataRenderer{
getStageColor_(lane, stage, isBegin){
let self = this;

if (self.colorScheme_ == "Auto") {
if (self.colorScheme_ == "Auto" || self.colorScheme_ == "Unique") {
if (stage == "f" || stage == "stl") {
return this.style_.pipelinePane.stallBackgroundColor;
}
let level = self.konata_.stageLevelMap[stage].unique;
let stageLevel = self.konata_.stageLevelMap[stage];
let level = self.colorScheme_ == "Auto" ? stageLevel.appearance : stageLevel.unique;
let color = this.style_.pipelinePane.stageBackgroundColor;
if (isBegin) {
let h = ((250-level*color.hRateBegin)%360);
Expand Down Expand Up @@ -900,7 +901,7 @@ class KonataRenderer{
}
else{
// 十分小さい場合は簡略化モード
if (self.colorScheme_ != "Auto" && self.colorScheme_ != "Onikiri") {
if (self.colorScheme_ != "Auto" && self.colorScheme_ != "Unique" && self.colorScheme_ != "Onikiri") {
ctx.fillStyle = self.colorScheme_;
}
else{
Expand Down
4 changes: 2 additions & 2 deletions menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function installMainMenu(store, dispatcher){
},
{
label: "Pipeline color scheme",
submenu: ["Auto", "Orange", "RoyalBlue"/*, "Onikiri"*/].map(function(color){
submenu: ["Auto", "Unique", "Orange", "RoyalBlue"/*, "Onikiri"*/].map(function(color){
return {
label: color,
type: "checkbox",
Expand Down Expand Up @@ -334,7 +334,7 @@ function makePopupTabMenuTemplate(store, dispatcher, tabID){
},
{
label: "Pipeline color scheme",
submenu: ["Auto", "Orange", "RoyalBlue"/*, "Onikiri"*/].map(function(color){
submenu: ["Auto", "Unique", "Orange", "RoyalBlue"/*, "Onikiri"*/].map(function(color){
return {
label: color,
type: "checkbox",
Expand Down

0 comments on commit 209e3c3

Please sign in to comment.