Skip to content
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

Merged
merged 4 commits into from Jun 23, 2020
Merged

Conversation

Psycast
Copy link
Member

@Psycast 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.
@Psycast Psycast requested a review from a team as a code owner June 22, 2020 19:01
@Psycast Psycast requested review from dave936 and G-flat June 22, 2020 19:01
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)});
Copy link
Member

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

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);
Copy link
Member

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));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shinky

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"))]];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pls

src/Constant.as Show resolved Hide resolved
src/menu/SongItem.as Show resolved Hide resolved
@Psycast
Copy link
Member Author

Psycast commented Jun 23, 2020

Unable to make suggested changes due to formatting rules.

@Zageron
Copy link
Member

Zageron commented Jun 23, 2020

Unable to make suggested changes due to formatting rules.

I mean, the tertiary expansion could be done.

@Zageron Zageron self-requested a review June 23, 2020 00:46
@Zageron Zageron added the enhancement New feature or request label Jun 23, 2020
@Zageron Zageron merged commit 6c0c8be into main Jun 23, 2020
@Zageron Zageron deleted the feat/refactor-song-selection branch June 23, 2020 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants