JubeatPlus 3.9.11
Loading...
Searching...
No Matches
CampaignItemDetailView.h
Go to the documentation of this file.
1
15
16#import <UIKit/UIKit.h>
17
18#import "AlertViewManager.h"
19#import "Downloader.h"
20
21@class CampaignItemInfo;
22@class StoreImageView;
24// StoreCampaignViewController owns this card and is only messaged, never sized, here; it is not yet
25// reconstructed, so declare the selectors this class sends to it.
27
28NS_ASSUME_NONNULL_BEGIN
29
43
56
61
67@property(nonatomic, weak, nullable) id delegate;
68
74@property(nonatomic, weak, nullable) StoreCampaignViewController *viewController;
75
83- (instancetype)initWithFrame:(CGRect)frame;
84
91- (nullable UIColor *)getButtonColor:(int)buttonType;
92
99- (nullable NSString *)getButtonName:(int)buttonType;
100
107- (void)setCampaignInfo:(nullable CampaignItemInfo *)campaignInfo;
108
114- (void)updateCampaignState:(nullable CampaignItemInfo *)campaignInfo;
115
121- (void)loadInfo;
122
127- (void)dlButtonUpdate;
128
134- (BOOL)hasItem;
135
141- (void)removeCampaignInfo;
142
147- (void)cancelLoading;
148
154- (void)stopSample;
155
161- (void)doPurchase:(nullable id)sender;
162
168- (void)handleLink:(nullable id)sender;
169
175- (void)handleSample:(nullable id)sender;
176
182- (void)finishBgm:(nullable NSNotification *)notification;
183
188- (void)sampleStop;
189
194- (void)sampleDownloading;
195
200- (void)samplePlaying;
201
207- (void)downloaderFinished:(id)downloader;
208
214- (void)downloaderError:(id)downloader;
215
221- (void)downloaderProceed:(id)downloader;
222
228- (void)alertClose:(nonnull NSDictionary *)info;
229
235- (void)alertSelect:(nonnull NSDictionary *)info;
236
241- (void)detailClose;
242
243@end
244
245NS_ASSUME_NONNULL_END
246
247// code: language=Objective-C
248// kate: hl Objective-C;
249// vim: set ft=objc :
A shared alert presenter that hides the UIAlertController/UIAlertView split behind one API.
CampaignItemDetailButtonType
Which artwork and title the download button should carry.
Definition CampaignItemDetailView.h:36
@ CampaignItemDetailButtonTypeUpdate
A green "update" button.
Definition CampaignItemDetailView.h:41
@ CampaignItemDetailButtonTypeLocked
A near-white button titled "download".
Definition CampaignItemDetailView.h:39
@ CampaignItemDetailButtonTypeDownloaded
A near-white "downloaded" button, disabled.
Definition CampaignItemDetailView.h:38
@ CampaignItemDetailButtonTypeDownload
A blue "download" button.
Definition CampaignItemDetailView.h:37
@ CampaignItemDetailButtonTypeSerial
A blue "serial input" button.
Definition CampaignItemDetailView.h:40
CampaignItemSampleState
The sample-tune playback state.
Definition CampaignItemDetailView.h:51
@ CampaignItemSampleStateDownloading
The sample tune is downloading.
Definition CampaignItemDetailView.h:53
@ CampaignItemSampleStatePlaying
The sample tune is playing.
Definition CampaignItemDetailView.h:52
@ CampaignItemSampleStateStopped
No sample tune is active.
Definition CampaignItemDetailView.h:54
The HTTP client.
A campaign item's detail card.
Definition CampaignItemDetailView.h:60
void cancelLoading()
Cancels the in-flight info download, if any.
Definition CampaignItemDetailView.m:434
void sampleDownloading()
Puts the sample button into its downloading artwork and starts the indicator.
Definition CampaignItemDetailView.m:492
StoreCampaignViewController * viewController
The store campaign controller that owns this card.
Definition CampaignItemDetailView.h:74
void samplePlaying()
Puts the sample button into its playing artwork and stops the indicator.
Definition CampaignItemDetailView.m:499
void removeCampaignInfo()
Clears the item and returns every subview to its empty state, and unsubscribes from the BGM finish no...
Definition CampaignItemDetailView.m:413
void sampleStop()
Puts the sample button into its stopped artwork.
Definition CampaignItemDetailView.m:485
BOOL hasItem()
Whether the device already holds the current item's data.
Definition CampaignItemDetailView.m:396
void stopSample()
Stops the sample tune: fades out the BGM, drops the sample downloader, and resets the sample UI and s...
Definition CampaignItemDetailView.m:471
void detailClose()
Closes any presented alert.
Definition CampaignItemDetailView.m:580
void loadInfo()
Populates the labels, icon, and buttons from the current item, and subscribes to the BGM finish notif...
Definition CampaignItemDetailView.m:361
id delegate
The card's delegate.
Definition CampaignItemDetailView.h:67
void dlButtonUpdate()
Refreshes the download button's colour, titles, and enabled state from the item.
Definition CampaignItemDetailView.m:339
A campaign item: an unlockable tune or marker with a rule for earning it.
Definition CampaignItemInfo.h:32
Lists downloadable campaign items and drives their unlock, download, and detail display.
Definition StoreCampaignViewController.h:42
An image view that loads itself from imageURL on demand.
Definition StoreImageView.h:24
A UITextView that refuses first-responder status.
Definition UnselectableTextView.h:27
The optional delegate of AlertViewManager.
Definition AlertViewManager.h:18
Performs a single HTTP request.
Definition Downloader.h:30