Skip to content

Commit

Permalink
Fixed themes bugging charter and added new theme
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadowMario committed Oct 14, 2024
1 parent fcfb023 commit d95164a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
22 changes: 17 additions & 5 deletions source/states/editors/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ enum abstract UndoAction(String)
enum abstract ChartingTheme(String)
{
var LIGHT = 'light';
var DEFAULT = 'default';
var DARK = 'dark';
var DEFAULT = 'default';
var VSLICE = 'vslice';
}

enum abstract WaveformTarget(String)
Expand Down Expand Up @@ -542,6 +543,10 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
bg.color = 0xFF222222;
gridColors = [0xFF3F3F3F, 0xFF2F2F2F];
gridColorsOther = [0xFF1F1F1F, 0xFF111111];
case VSLICE:
bg.color = 0xFF673AB7;
gridColors = [0xFFD0D0D0, 0xFFAFAFAF];
gridColorsOther = [0xFF595959, 0xFF464646];
default:
bg.color = 0xFF303030;
gridColors = [0xFFDFDFDF, 0xFFBFBFBF];
Expand Down Expand Up @@ -4327,7 +4332,7 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
upperBox.isMinimized = true;
upperBox.bg.visible = false;

openSubState(new BasePrompt('Chart Editor Theme',
openSubState(new BasePrompt(500, 160, 'Chart Editor Theme',
function(state:BasePrompt)
{
var btn:PsychUIButton = new PsychUIButton(state.bg.x + state.bg.width - 40, state.bg.y, 'X', state.close, 40);
Expand All @@ -4337,18 +4342,25 @@ class ChartingState extends MusicBeatState implements PsychUIEventHandler.PsychU
var btnY = 390;
var btn:PsychUIButton = new PsychUIButton(0, btnY, 'Light', changeTheme.bind(LIGHT));
btn.screenCenter(X);
btn.x -= 125;
btn.x -= 180;
btn.cameras = state.cameras;
state.add(btn);

var btn:PsychUIButton = new PsychUIButton(0, btnY, 'Dark', changeTheme.bind(DARK));
btn.screenCenter(X);
btn.x -= 60;
btn.cameras = state.cameras;
state.add(btn);

var btn:PsychUIButton = new PsychUIButton(0, btnY, 'Default', changeTheme.bind(DEFAULT));
btn.screenCenter(X);
btn.cameras = state.cameras;
btn.x += 60;
state.add(btn);

var btn:PsychUIButton = new PsychUIButton(0, btnY, 'Dark', changeTheme.bind(DARK));
var btn:PsychUIButton = new PsychUIButton(0, btnY, 'V-Slice', changeTheme.bind(VSLICE));
btn.screenCenter(X);
btn.x += 125;
btn.x += 180;
btn.cameras = state.cameras;
state.add(btn);
}
Expand Down
1 change: 1 addition & 0 deletions source/states/editors/content/ChartingGridSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class ChartingGridSprite extends FlxSprite
animation.add('odd', [0], false);
animation.add('even', [1], false);
animation.play('even', true);
updateHitbox();
recalcHeight();
}

Expand Down

0 comments on commit d95164a

Please sign in to comment.