Skip to content

Commit

Permalink
Add randomselectbar option
Browse files Browse the repository at this point in the history
  • Loading branch information
Shimi9999 committed Sep 6, 2019
1 parent 450d30a commit e76403f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/bms/player/beatoraja/skin/SkinProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ public class SkinProperty {
public static final int OPTION_GRADEBAR_LN = 1015;
public static final int OPTION_GRADEBAR_CN = 1016;
public static final int OPTION_GRADEBAR_HCN = 1017;
public static final int OPTION_RANDOMSELECTBAR = 1030;

public static final int OPTION_PLAYABLEBAR = 5;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@
import bms.player.beatoraja.result.CourseResult;
import bms.player.beatoraja.result.MusicResult;
import bms.player.beatoraja.select.MusicSelector;
import bms.player.beatoraja.select.bar.Bar;
import bms.player.beatoraja.select.bar.DirectoryBar;
import bms.player.beatoraja.select.bar.GradeBar;
import bms.player.beatoraja.select.bar.SelectableBar;
import bms.player.beatoraja.select.bar.SongBar;
import bms.player.beatoraja.select.bar.*;
import bms.player.beatoraja.skin.SkinObject;
import bms.player.beatoraja.song.SongData;

Expand Down Expand Up @@ -483,13 +479,17 @@ public boolean get(MainState state) {
case OPTION_GRADEBAR:
return new DrawProperty(DrawProperty.TYPE_NO_STATIC,
(state) -> ((state instanceof MusicSelector) ? ((MusicSelector) state).getSelectedBar() instanceof GradeBar : false));
case OPTION_RANDOMSELECTBAR:
return new DrawProperty(DrawProperty.TYPE_NO_STATIC,
(state) -> ((state instanceof MusicSelector) ? ((MusicSelector) state).getSelectedBar() instanceof ExecutableBar : false));
case OPTION_PLAYABLEBAR:
return new DrawProperty(DrawProperty.TYPE_NO_STATIC,
(state) -> {
if(state instanceof MusicSelector) {
Bar selected = ((MusicSelector) state).getSelectedBar();
return ((selected instanceof SongBar) && ((SongBar)selected).getSongData().getPath() != null) ||
((selected instanceof GradeBar) && ((GradeBar)selected).existsAllSongs());
((selected instanceof GradeBar) && ((GradeBar)selected).existsAllSongs()) ||
(selected instanceof ExecutableBar);
}
return false;
});
Expand Down

0 comments on commit e76403f

Please sign in to comment.