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

A campaign item's detail card. More...

#include <CampaignItemDetailView.h>

Inheritance diagram for CampaignItemDetailView:
Collaboration diagram for CampaignItemDetailView:

Instance Methods

(instancetype) - initWithFrame:
 Builds the card: the pack background, the item icon, the four labels, the two text views, the download and link buttons, the sample button, and the sample activity indicator.
(nullable UIColor *) - getButtonColor:
 Maps a button state to its fill colour.
(nullable NSString *) - getButtonName:
 Maps a button state to its title.
(void) - setCampaignInfo:
 Sets the item to display without any side effects.
(void) - updateCampaignState:
 Replaces the item and refreshes the download button.
(void) - loadInfo
 Populates the labels, icon, and buttons from the current item, and subscribes to the BGM finish notification.
(void) - dlButtonUpdate
 Refreshes the download button's colour, titles, and enabled state from the item.
(BOOL) - hasItem
 Whether the device already holds the current item's data.
(void) - removeCampaignInfo
 Clears the item and returns every subview to its empty state, and unsubscribes from the BGM finish notification.
(void) - cancelLoading
 Cancels the in-flight info download, if any.
(void) - stopSample
 Stops the sample tune: fades out the BGM, drops the sample downloader, and resets the sample UI and state.
(void) - doPurchase:
 Download-button tap: forwards to the owning controller's item download.
(void) - handleLink:
 Link-button tap: forwards to the owning controller's external link.
(void) - handleSample:
 Sample-button tap: starts the sample download when idle, otherwise stops playback.
(void) - finishBgm:
 BGM-finish notification handler: marks the sample stopped and resets the sample UI.
(void) - sampleStop
 Puts the sample button into its stopped artwork.
(void) - sampleDownloading
 Puts the sample button into its downloading artwork and starts the indicator.
(void) - samplePlaying
 Puts the sample button into its playing artwork and stops the indicator.
(void) - downloaderFinished:
 Downloader completion: on the sample download, loads and plays the sample BGM.
(void) - downloaderError:
 Downloader failure: raises a network-error alert for the info or sample download.
(void) - downloaderProceed:
 Downloader progress.
(void) - alertClose:
 Alert-dismiss delegate: on the info-error alert, tells the owning controller to close.
(void) - alertSelect:
 Alert-button delegate: on the info-error alert, tells the owning controller to close.
(void) - detailClose
 Closes any presented alert.

Properties

id delegate
 The card's delegate.
StoreCampaignViewController * viewController
 The store campaign controller that owns this card.

Detailed Description

A campaign item's detail card.

Method Documentation

◆ alertClose:

- (void) alertClose: (nonnull NSDictionary *) info

Alert-dismiss delegate: on the info-error alert, tells the owning controller to close.

Parameters
infoThe alert result dictionary.
Ghidra address:
0x1740f4

Reimplemented from <AlertViewManagerDelegate>.

◆ alertSelect:

- (void) alertSelect: (nonnull NSDictionary *) info

Alert-button delegate: on the info-error alert, tells the owning controller to close.

Parameters
infoThe alert result dictionary.
Ghidra address:
0x1741f0

Reimplemented from <AlertViewManagerDelegate>.

◆ cancelLoading

- (void) cancelLoading

Cancels the in-flight info download, if any.

Ghidra address:
0x173060

◆ detailClose

- (void) detailClose

Closes any presented alert.

Ghidra address:
0x1742ec

◆ dlButtonUpdate

- (void) dlButtonUpdate

Refreshes the download button's colour, titles, and enabled state from the item.

Ghidra address:
0x173138

◆ doPurchase:

- (void) doPurchase: (nullable id) sender

Download-button tap: forwards to the owning controller's item download.

Parameters
senderThe download button.
Ghidra address:
0x17384c

◆ downloaderError:

- (void) downloaderError: (id) downloader

Downloader failure: raises a network-error alert for the info or sample download.

Parameters
downloaderThe failed request.
Ghidra address:
0x173b2c
Ghidra address:
0x173b2c

Reimplemented from <DownloaderDelegate>.

◆ downloaderFinished:

- (void) downloaderFinished: (id) downloader

Downloader completion: on the sample download, loads and plays the sample BGM.

Parameters
downloaderThe finished request.
Ghidra address:
0x173a14
Ghidra address:
0x173a14

Reimplemented from <DownloaderDelegate>.

◆ downloaderProceed:

- (void) downloaderProceed: (id) downloader

Downloader progress.

The shipped body is empty.

Parameters
downloaderThe request.
Ghidra address:
0x173eec
Ghidra address:
0x173eec

Reimplemented from <DownloaderDelegate>.

◆ finishBgm:

- (void) finishBgm: (nullable NSNotification *) notification

BGM-finish notification handler: marks the sample stopped and resets the sample UI.

Parameters
notificationThe notification.
Ghidra address:
0x1739f8

◆ getButtonColor:

- (UIColor *) getButtonColor: (int) buttonType

Maps a button state to its fill colour.

Parameters
buttonTypeThe button state.
Returns
The fill colour.
Ghidra address:
0x171ca0
Ghidra address:
0x171ca0

◆ getButtonName:

- (NSString *) getButtonName: (int) buttonType

Maps a button state to its title.

Parameters
buttonTypeThe button state.
Returns
The title, or nil for an out-of-range state.
Ghidra address:
0x171de0
Ghidra address:
0x171de0

◆ handleLink:

- (void) handleLink: (nullable id) sender

Link-button tap: forwards to the owning controller's external link.

Parameters
senderThe link button.
Ghidra address:
0x17388c

◆ handleSample:

- (void) handleSample: (nullable id) sender

Sample-button tap: starts the sample download when idle, otherwise stops playback.

Parameters
senderThe sample button.
Ghidra address:
0x1738cc

◆ hasItem

- (BOOL) hasItem

Whether the device already holds the current item's data.

Returns
YES when the item is present.
Ghidra address:
0x1732dc
Ghidra address:
0x1732dc

◆ initWithFrame:

- (instancetype) initWithFrame: (CGRect) frame

Builds the card: the pack background, the item icon, the four labels, the two text views, the download and link buttons, the sample button, and the sample activity indicator.

Parameters
frameThe card's frame.
Returns
The initialised card.
Ghidra address:
0x171e6c
Ghidra address:
0x171e6c

◆ loadInfo

- (void) loadInfo

Populates the labels, icon, and buttons from the current item, and subscribes to the BGM finish notification.

Ghidra address:
0x173488

◆ removeCampaignInfo

- (void) removeCampaignInfo

Clears the item and returns every subview to its empty state, and unsubscribes from the BGM finish notification.

Ghidra address:
0x172e34

◆ sampleDownloading

- (void) sampleDownloading

Puts the sample button into its downloading artwork and starts the indicator.

Ghidra address:
0x173f9c

◆ samplePlaying

- (void) samplePlaying

Puts the sample button into its playing artwork and stops the indicator.

Ghidra address:
0x174048

◆ sampleStop

- (void) sampleStop

Puts the sample button into its stopped artwork.

Ghidra address:
0x173ef0

◆ setCampaignInfo:

- (void) setCampaignInfo: (nullable CampaignItemInfo *) campaignInfo

Sets the item to display without any side effects.

The class has no campaignInfo property; this stores the itemInfo ivar directly.

Parameters
campaignInfoThe campaign item.
Ghidra address:
0x173474

◆ stopSample

- (void) stopSample

Stops the sample tune: fades out the BGM, drops the sample downloader, and resets the sample UI and state.

Ghidra address:
0x1730ac

◆ updateCampaignState:

- (void) updateCampaignState: (nullable CampaignItemInfo *) campaignInfo

Replaces the item and refreshes the download button.

Parameters
campaignInfoThe new campaign item.
Ghidra address:
0x173288

Property Documentation

◆ delegate

- (id) delegate
readwritenonatomicweak

The card's delegate.

Held weakly.

Ghidra address:
0x1743ec (getter)
Ghidra address:
0x17440c (setter)

◆ viewController

- (StoreCampaignViewController*) viewController
readwritenonatomicweak

The store campaign controller that owns this card.

Held weakly.

Ghidra address:
0x174420 (getter)
Ghidra address:
0x174440 (setter)

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