JubeatPlus 3.9.11
Loading...
Searching...
No Matches
ScratchMusicDetailView Class Reference

The scratch-mode music-detail card over a ChallengeStatus scratch panel. More...

#include <ScratchMusicDetailView.h>

Inheritance diagram for ScratchMusicDetailView:
Collaboration diagram for ScratchMusicDetailView:

Instance Methods

(instancetype) - initWithFrame:
 Designated initialiser; builds the background, the three difficulty buttons, the ranking button and list digits, the start-play button, the music-bar dots, the high-score board, the rating and combo views, the hold marks, and the store button, laid out for the pad or phone idiom.
(nullable UIButton *) - diffButton:
 Builds a difficulty button from a resource image, targeting -selectDiff:.
(void) - loadImages
 Loads the rating, level, high-score, music-bar, full-combo, and excellent image atlases.
(void) - loadContentFromDictionary:
 Populates the artwork, reflection, name plate, and music-bar data from a content dictionary, then applies the persisted difficulty.
(void) - loadContentFromPath:orData:
 Populates the artwork, reflection, name plate, and music-bar data from an encrypted tune archive at a path or in memory, then applies the persisted difficulty.
(void) - loadExtendMusicBar:
 Applies the persisted difficulty when an extend music-bar archive is present at a path.
(void) - setRankingNumberImage:
 Sets the six ranking-number digit views from the number's decimal digits, blanking leading zero positions when the value is not positive.
(void) - setInfo:score:
 Chains to the base class then sets the three per-difficulty level digit views from the tune's clamped levels, resets the score, and reloads the artwork.
(void) - infoChange:
 Refreshes the board for one difficulty: the ranking number, the score board, the music-bar dots, and the three hold marks from the current hold flags.
(void) - clearInfo
 Clears the artwork, reflection, and name-plate images.
(nullable NSString *) - soundName:
 The theme-prefixed sound name for a base name ("SD_RPL_" , "SD_KNT_" , or "SD_" ).
(void) - selectDiff:
 Difficulty-button action: enables the two other buttons, disables the tapped one, plays the difficulty's confirm sound, persists the choice, and animates the board over.
(void) - setScoreBoard:fullcombo:
 Sets the seven high-score digit views, the rating view, and the combo view from a score and full-combo flag.
(void) - changeDifficulty:
 Selects a difficulty: fades and scales the three difficulty buttons and the fourth-slot level view, then refreshes the board through -infoChange:.
(void) - setMusicBarDot:mbarRes:
 Sets the 120 music-bar dot views from a bar-dot buffer and a colour-resource buffer.
(nullable UIImage *) - getStartImage
 The start-play button background image.
(CGPoint) - getDifficultyPos:
 The on-screen position of a difficulty button, in the scroll view's coordinate space.
(void) - setDetailInfo:
 Loads the full board for a scratch panel: stores the item slot, music id, difficulty, and pack id, wires the start-play and store buttons, reads the per-difficulty score/rank/combo from the panel's ChallengeMusicInfo, decrypts the tune archive into a TuneInfo and music-bar data, and sets the three level digits.
(void) - pushButtonStartPlay:
 Start-play button action: when enabled, plays the confirm sound and tells the delegate to start the challenge tune.
(void) - tapRanking:
 Ranking button action: plays the menu sound and tells the delegate to open the ranking.
(void) - closeRanking
 Removes and releases the ranking list view.
(void) - tapStoreMove
 Store button action: plays the menu sound and tells the delegate to open the store on the tune's pack.
(void) - showDetail
 Removes and releases the ranking list view when one is shown.
(void) - refreshDetail
 Re-reads the three per-difficulty ranks from the panel's ChallengeMusicInfo.
(void) - timerUpdate
 Empty in this build.
Instance Methods inherited from MusicDetailView
(void) - setExtendInfo:score:
 Stores the extend-chart tune; the score argument is ignored.
(void) - show:
 Empty in this build.
(void) - hostShareCancelled
 Empty in this build.
(void) - showDataProgress:animated:
 Empty in this build.
(void) - activateAnim:
 Empty in this build.
(void) - pushLink:
 Opens the tune's iTunes URL in the browser, when it has one.
(void) - pushRecommend:
 Starts the recommend flow: picks the social network from the sender's tag, dims the card, installs the pack-search sheet, and animates it in.
(void) - packIDSearchEnd:
 Pack-search delegate: the search resolved; fades the sheet out and posts the share text.
(void) - packIDSearchCancel:
 Pack-search delegate: the search was cancelled; fades the sheet and scrim out.
(nullable NSString *) - getRecommendString
 The recommend string from the pack-search view, or nil when none is installed.
(void) - searchViewDealloc
 Removes the pack-search view and the dimming cover, then releases both.
(void) - socialSend:sendText:
 Presents an SLComposeViewController for the given service, seeded with the text.
(void) - sendTwitter:
 Presents the Twitter composer with the given text.
(void) - resetScore
 Resets every base and extend score to -1, clears full-combo flags, and drops music bars.
(void) - putScore:
 Populates the base-chart score, full-combo flags, and music bars from a score record.
(void) - putExtendScore:
 Populates the extend-chart score, full-combo flags, and music bars from a score record.
(void) - closePopWindow
 Dismisses the edit popover or jcf download page and closes the detail view.
(void) - close
 Asks the controller to close the detail view.
(nullable NSDictionary *) - infoDictForShare
 Builds the share dictionary by decrypting the tune's packed assets over its base dict.
(void) - loadEditFile
 Loads the tune's last edit file into the shared edit data manager, or clears it.
(void) - saveEditFile
 Saves the shared edit data back to the tune's last edit file, when one exists.
(void) - editModalViewDelegateSaveEditFile
 Edit-modal delegate: forwards to -saveEditFile.
(BOOL) - checkEnableInfoChange
 Whether the tune's info may be changed (no host share, a local last-edit file, iPad).
(BOOL) - checkEnableUpload
 Whether the tune may be uploaded (as -checkEnableInfoChange plus a non-empty note count).
(BOOL) - checkEnableEdit
 Whether the tune's chart may be edited (no host share, a local last-edit file, iPad).
(void) - downloadEnd:
 Jcf download-end delegate: on non-iPad, reloads the manage list from the tune's files.
(void) - moveStore:packID:
 Dismisses the presented controller and turns the parent to the pack-purchase store page.
(void) - setStartButtonEnable
 Empty in this build.
(void) - dtpGesture:
 Double-tap gesture on the artwork: asks the controller to select a random tune.
(void) - refreshStartButton
 Empty in this build.
(void) - lpGesture:
 Long-press gesture on the artwork: toggles the app's random flag on the began state.
(void) - changeExtendMode
 Empty in this build.
(void) - refreshInfo
 Empty in this build.
Instance Methods inherited from <EditFileListViewDelegate>
(void) - editFileListViewSelectItem:
 Sent when a chart is chosen.
Instance Methods inherited from <SearchPackIDViewDelegate>
(void) - packIDSearchFailed:
 Sent when the lookup completed but no pack contains the tune.

Class Methods

(Class) + layerClass
 The card's backing layer class: a CAGradientLayer.

Properties

id< ScratchMusicDetailViewDelegate > aDelegate
 The delegate told about play, ranking, and store actions.
unsigned int musicID
 The tune's music identifier.
int difficulty
 The selected difficulty index.
TuneInfo * tuneInfo
 The tune's decrypted info.
Properties inherited from MusicDetailView
TuneInfo * info
 The base-chart tune.
UIView * coverView
 The full-card dimming cover.
UIImageView * artworkView
 The artwork image.
UIImageView * reflectionArtworkView
 The mirrored-artwork reflection.
UIImageView * tuneNameView
 The tune-name plate.
UIButton * buttonStartPlay
 The start-play button.
UIButton * buttonHostSharePlay
 The host-share-play button.
UILabel * labelShareMessage
 The share-status message label.
UIProgressView * shareDataProgress
 The share-data progress bar.
UIButton * buttonLink
 The link-to-store button.
UIImageView * randView
 The random-select marker.
UIButton * btnRecommendTwitter
 The Twitter recommend button.
UIButton * btnRecommendFacebook
 The Facebook recommend button.
BOOL isShared
 Whether the card is in host-share mode.
UIScrollView * scrollView
 The edit-file list scroll view.
EditFileListViewDeleteController * pFileListView
 The edit-file delete list controller.
UIPopoverController * pLoadList
 The edit-file list popover.
BOOL isFirstSelect
 Whether this is the first selection.
EditModalView * pEditModalView
 The edit modal.
int editPage
 The current edit page index.
JcfDownloadPageNavController * jcfDownloadPage
 The jcf download navigation controller.
JcfManageNavController * jcfMan
 The jcf manage navigation controller.
NSString * customIndex
 The share index string.
BOOL isEditInfoOpen
 Whether the edit-info modal is open.
char levelBas
 The base-chart basic level.
char levelAdv
 The base-chart advanced level.
char levelExt
 The base-chart extreme level.
int scoreBas
 The base-chart basic score.
int scoreAdv
 The base-chart advanced score.
int scoreExt
 The base-chart extreme score.
BOOL fullComboBas
 The base-chart basic full-combo flag.
BOOL fullComboAdv
 The base-chart advanced full-combo flag.
BOOL fullComboExt
 The base-chart extreme full-combo flag.
NSData * mbarBas
 The base-chart basic music bar.
NSData * mbarAdv
 The base-chart advanced music bar.
NSData * mbarExt
 The base-chart extreme music bar.
BOOL isPad
 Whether the device is an iPad.
BOOL isRetina
 Whether the device is a retina phone.
BOOL isStarted
 Whether play has started.
BOOL isSharedStartable
 Whether the host share is startable.
TuneInfo * extendInfo
 The extend-chart tune.
char extendLevelBas
 The extend-chart basic level.
char extendLevelAdv
 The extend-chart advanced level.
char extendLevelExt
 The extend-chart extreme level.
int extendScoreBas
 The extend-chart basic score.
int extendScoreAdv
 The extend-chart advanced score.
int extendScoreExt
 The extend-chart extreme score.
BOOL extendFullComboBas
 The extend-chart basic full-combo flag.
BOOL extendFullComboAdv
 The extend-chart advanced full-combo flag.
BOOL extendFullComboExt
 The extend-chart extreme full-combo flag.
NSData * extendMbarBas
 The extend-chart basic music bar.
NSData * extendMbarAdv
 The extend-chart advanced music bar.
NSData * extendMbarExt
 The extend-chart extreme music bar.
MusicSelectViewController * controller
 The owning music-select controller.
SearchPackIDView * searchPackView
 The pack-id search sheet.
NSString * socialType
 The selected social service type.
UIView * topcover
 The recommend dimming cover.

Detailed Description

The scratch-mode music-detail card over a ChallengeStatus scratch panel.

Method Documentation

◆ changeDifficulty:

- (void) changeDifficulty: (int) difficulty

Selects a difficulty: fades and scales the three difficulty buttons and the fourth-slot level view, then refreshes the board through -infoChange:.

Parameters
difficultyThe difficulty index (0 basic, 1 advanced, 2 extreme).
Ghidra address:
0x162cb4
Ghidra address:
0x162cb4

◆ clearInfo

- (void) clearInfo

Clears the artwork, reflection, and name-plate images.

Ghidra address:
0x1622b8

Reimplemented from MusicDetailView.

◆ closeRanking

- (void) closeRanking

Removes and releases the ranking list view.

Ghidra address:
0x163eac

◆ diffButton:

- (nullable UIButton *) diffButton: (nullable NSString *) imageName

Builds a difficulty button from a resource image, targeting -selectDiff:.

Parameters
imageNameThe button's resource name.
Returns
The configured button.
Ghidra address:
0x160b00

◆ getDifficultyPos:

- (CGPoint) getDifficultyPos: (int) difficulty

The on-screen position of a difficulty button, in the scroll view's coordinate space.

Parameters
difficultyThe difficulty index (clamped to 0 when above 2).
Returns
The button's origin corrected by the scroll-view frame.
Ghidra address:
0x1630d8
Ghidra address:
0x1630d8

Reimplemented from MusicDetailView.

◆ getStartImage

- (UIImage *) getStartImage

The start-play button background image.

Returns
The "menu_button_start_ch" image.
Ghidra address:
0x163074
Ghidra address:
0x163074

◆ infoChange:

- (void) infoChange: (int) difficulty

Refreshes the board for one difficulty: the ranking number, the score board, the music-bar dots, and the three hold marks from the current hold flags.

Parameters
difficultyThe difficulty index (0 basic, 1 advanced, 2 extreme).
Ghidra address:
0x161f30
Ghidra address:
0x161f30

Reimplemented from MusicDetailView.

◆ initWithFrame:

- (instancetype) initWithFrame: (CGRect) frame

Designated initialiser; builds the background, the three difficulty buttons, the ranking button and list digits, the start-play button, the music-bar dots, the high-score board, the rating and combo views, the hold marks, and the store button, laid out for the pad or phone idiom.

Parameters
frameThe card's frame.
Returns
The initialised card, or nil.
Ghidra address:
0x15f658
Ghidra address:
0x15f658

Reimplemented from MusicDetailView.

◆ layerClass

+ (Class) layerClass

The card's backing layer class: a CAGradientLayer.

Returns
The CAGradientLayer class.
Ghidra address:
0x15f644
Ghidra address:
0x15f644

◆ loadContentFromDictionary:

- (void) loadContentFromDictionary: (nullable NSDictionary *) dict

Populates the artwork, reflection, name plate, and music-bar data from a content dictionary, then applies the persisted difficulty.

Parameters
dictThe content dictionary.
Ghidra address:
0x161194

Reimplemented from MusicDetailView.

◆ loadContentFromPath:orData:

- (void) loadContentFromPath: (nullable NSString *) path
orData: (nullable NSData *) data 

Populates the artwork, reflection, name plate, and music-bar data from an encrypted tune archive at a path or in memory, then applies the persisted difficulty.

Parameters
pathA tune-archive file path.
dataAn in-memory tune archive.
Ghidra address:
0x161528

Reimplemented from MusicDetailView.

◆ loadExtendMusicBar:

- (void) loadExtendMusicBar: (nullable NSString *) path

Applies the persisted difficulty when an extend music-bar archive is present at a path.

Parameters
pathA tune-archive file path.
Ghidra address:
0x161a64

◆ loadImages

- (void) loadImages

Loads the rating, level, high-score, music-bar, full-combo, and excellent image atlases.

Ghidra address:
0x160c28

◆ pushButtonStartPlay:

- (void) pushButtonStartPlay: (nullable id) sender

Start-play button action: when enabled, plays the confirm sound and tells the delegate to start the challenge tune.

Parameters
senderThe start-play button.
Ghidra address:
0x163d50

◆ refreshDetail

- (void) refreshDetail

Re-reads the three per-difficulty ranks from the panel's ChallengeMusicInfo.

Ghidra address:
0x163fc8

◆ selectDiff:

- (void) selectDiff: (nullable id) sender

Difficulty-button action: enables the two other buttons, disables the tapped one, plays the difficulty's confirm sound, persists the choice, and animates the board over.

Parameters
senderThe tapped difficulty button.
Ghidra address:
0x16245c

◆ setDetailInfo:

- (void) setDetailInfo: (int) slot

Loads the full board for a scratch panel: stores the item slot, music id, difficulty, and pack id, wires the start-play and store buttons, reads the per-difficulty score/rank/combo from the panel's ChallengeMusicInfo, decrypts the tune archive into a TuneInfo and music-bar data, and sets the three level digits.

Parameters
slotThe scratch panel index.
Ghidra address:
0x1631c8
Ghidra address:
0x1631c8

◆ setInfo:score:

- (void) setInfo: (nullable TuneInfo *) info
score: (nullable id) score 

Chains to the base class then sets the three per-difficulty level digit views from the tune's clamped levels, resets the score, and reloads the artwork.

Parameters
infoThe tune.
scoreThe score record (forwarded to the base class).
Ghidra address:
0x161c40

Reimplemented from MusicDetailView.

◆ setMusicBarDot:mbarRes:

- (void) setMusicBarDot: (nullable char *) mbar
mbarRes: (nullable char *) mbarRes 

Sets the 120 music-bar dot views from a bar-dot buffer and a colour-resource buffer.

Parameters
mbarThe per-dot symbol buffer (nibble-packed), or nullptr to blank every dot.
mbarResThe per-dot colour buffer (2-bit-packed), or nullptr for colour 0.
Ghidra address:
0x162f18

◆ setRankingNumberImage:

- (void) setRankingNumberImage: (int) number

Sets the six ranking-number digit views from the number's decimal digits, blanking leading zero positions when the value is not positive.

Parameters
numberThe rank to display.
Ghidra address:
0x161b84
Ghidra address:
0x161b84

◆ setScoreBoard:fullcombo:

- (void) setScoreBoard: (int) scoreValue
fullcombo: (BOOL) fullcombo 

Sets the seven high-score digit views, the rating view, and the combo view from a score and full-combo flag.

A negative score blanks everything; a score of 1,000,000 or more shows the excellent mark instead of a rating.

Parameters
scoreValueThe score value.
fullcomboWhether the chart was full-comboed.
Ghidra address:
0x162920
Ghidra address:
0x162920

◆ showDetail

- (void) showDetail

Removes and releases the ranking list view when one is shown.

Ghidra address:
0x163f7c

◆ soundName:

- (nullable NSString *) soundName: (nullable NSString *) name

The theme-prefixed sound name for a base name ("SD_RPL_" , "SD_KNT_" , or "SD_" ).

Parameters
nameThe base sound name.
Returns
The theme-prefixed sound name.
Ghidra address:
0x16236c

◆ tapRanking:

- (void) tapRanking: (nullable id) sender

Ranking button action: plays the menu sound and tells the delegate to open the ranking.

Parameters
senderThe ranking button.
Ghidra address:
0x163e24

◆ tapStoreMove

- (void) tapStoreMove

Store button action: plays the menu sound and tells the delegate to open the store on the tune's pack.

Ghidra address:
0x163ee8

◆ timerUpdate

- (void) timerUpdate

Empty in this build.

Ghidra address:
0x1640ac

Property Documentation

◆ aDelegate

- (id<ScratchMusicDetailViewDelegate>) aDelegate
readwritenonatomicweak

The delegate told about play, ranking, and store actions.

Weak, per the W metadata.

Ghidra address:
0x1640b0 (getter), 0x1640d0 (setter)

◆ difficulty

- (int) difficulty
readnonatomicassign

The selected difficulty index.

Encodes as i .

Ghidra address:
0x1640f4

◆ musicID

- (unsigned int) musicID
readnonatomicassign

The tune's music identifier.

Encodes as I .

Ghidra address:
0x1640e4

◆ tuneInfo

- (TuneInfo*) tuneInfo
readnonatomicstrong

The tune's decrypted info.

Ghidra address:
0x164104

The documentation for this class was generated from the following files: