New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Song Selection and Song Item #100
Conversation
Psycast
commented
Jun 22, 2020
- Changes the SongItem appearance, moves difficulty to the left of the song name.
- Renames paneItems to songItems, uses Vector instead of Array.
- Removes SongItemLocked.as, condensed into SongItem
- Removes 200ms off loading the entire [All] genre compared to Noctowl Editon (1200ms -> 1000ms)
- Removes old removeEventListener unused calls.
- Simplifies keyboard logic to use new isLocked.
- Improves Legacy Filter Logic, only run when filter is enabled instead of always.
- Changes the SongItem appearence. - Renames paneItems to songItems, uses Vector instead of Array. - Removes SongItemLocked.as, condensed into SongItem - Removes 200ms off loading the entire All genre compared to Noctowl Editon (1200ms -> 1000ms) - Removes old removeEventListener unused calls. - Improves Legacy Filter Logic, only run when filter is enabled instead of always.
src/menu/SongItem.as
Outdated
switch (songData["access"]) | ||
{ | ||
case GlobalVariables.SONG_ACCESS_CREDITS: | ||
return sprintf(_lang.string("song_selection_banned_credits"), {more_needed: NumberUtil.numberFormat(songData.credits - _gvars.activeUser.credits), user_credits: NumberUtil.numberFormat(_gvars.activeUser.credits), song_price: NumberUtil.numberFormat(songData.credits)}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make this line less huge thank
src/menu/SongItem.as
Outdated
if (box != null) | ||
this.graphics.clear(); | ||
this.graphics.lineStyle(1, 0xFFFFFF, (highlight ? 0.8 : 0.55)); | ||
this.graphics.beginGradientFill(GradientType.LINEAR, [0xFFFFFF, 0xFFFFFF], (highlight ? [0.35, 0.1225] : [0.2, 0.04]), [0, 255], Constant.GRADIENT_MATRIX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines should not run off the page, please separate highlight tertiary to separate line.
|
||
// Scroll when doScroll is set. | ||
if (doScroll && scrollbar.draggerVisibility) | ||
{ | ||
var scrollVal:Number = (((paneItems[index].y / pane.content.height) > 0.5) ? ((paneItems[index].y + paneItems[index].height) / pane.content.height) : ((paneItems[index].y) / pane.content.height)); | ||
var scrollVal:Number = (((songItems[index].y / pane.content.height) > 0.5) ? ((songItems[index].y + songItems[index].height) / pane.content.height) : ((songItems[index].y) / pane.content.height)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shinky
src/menu/MenuSongSelection.as
Outdated
else | ||
{ // Song Details | ||
{ | ||
infoRanks = _gvars.activeUser.getLevelRank(songDetails) || {}; | ||
var infoDisplay:Array = [[_lang.string("song_selection_song_panel_song"), songDetails['name']], [_lang.string("song_selection_song_panel_author"), songDetails['author']], [_lang.string("song_selection_song_panel_stepfile"), songDetails['stepauthor']], [_lang.string("song_selection_song_panel_length"), songDetails['time']], [_lang.string("song_selection_song_panel_style"), songDetails['style']], [_lang.string("song_selection_song_panel_best"), (infoRanks.score > 0 ? "\n" + NumberUtil.numberFormat(infoRanks.score) + "\n" + infoRanks.results : _lang.string("song_selection_song_panel_unplayed"))]]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls
Unable to make suggested changes due to formatting rules. |
I mean, the tertiary expansion could be done. |
Multi-line some lines from suggestions.