JubeatPlus 3.9.11
Loading...
Searching...
No Matches
ScratchView.h
Go to the documentation of this file.
1
9
10#import <UIKit/UIKit.h>
11
12#import "Downloader.h"
13#import "ScratchInfo.h"
14
15@class StoreDialogView;
16
17NS_ASSUME_NONNULL_BEGIN
18
31
40@protocol ScratchViewDelegate <NSObject>
41@required
51- (void)scratchEnable:(BOOL)enable;
61- (void)showModalDialog:(id)sender;
64@optional
69- (void)selectScratch:(id)sender;
74- (void)scratchStart:(id)sender;
79- (void)scratchEnd:(id)sender;
80@end
81
86@interface ScratchView : UIView <DownloaderDelegate>
87
92@property(nonatomic, weak, nullable) id<ScratchViewDelegate> aDelegate;
93
100- (instancetype)initWithFrame:(CGRect)frame;
101
107- (void)refreshScratchImage:(nullable ScratchInfo *)info;
108
114- (void)updateView:(BOOL)animated;
115
121- (void)tapScratchView:(nullable id)sender;
122
128- (void)touchEndScratch:(nullable id)sender;
129
135- (void)touchBeganScratch:(nullable id)sender;
136
141- (void)startIndicator;
142
148- (void)moveScratchView:(nullable id)sender;
149
155- (void)scratchEffect:(BOOL)show;
156
162- (BOOL)scratchContinue;
163
168- (void)scratchCancel;
169
175- (void)scratchOpen:(BOOL)animated;
176
183
188- (void)imageSet;
189
195- (void)downloaderFinished:(nullable Downloader *)downloader;
196
202- (void)downloaderError:(nullable Downloader *)downloader;
203
209- (void)downloaderProceed:(nullable Downloader *)downloader;
210
215- (void)timerUpdate;
216
222- (void)setButtonEnable:(BOOL)enable;
223
224@end
225
226NS_ASSUME_NONNULL_END
227
228// code: language=Objective-C
229// kate: hl Objective-C;
230// vim: set ft=objc :
The HTTP client.
One scratch track's identity and the player's per-difficulty results.
ScratchViewState
The three discrete states -getState reports.
Definition ScratchView.h:25
@ ScratchViewStateScratching
The card is mid-scratch (step in the open animation range).
Definition ScratchView.h:28
@ ScratchViewStateOpen
The card has been fully revealed.
Definition ScratchView.h:27
@ ScratchViewStateClosed
The card is closed and unscratched.
Definition ScratchView.h:26
A one-shot HTTP request that reports its result to a delegate.
Definition Downloader.h:52
A scratch track resolved from the challenge line-up, with the player's score, rank,...
Definition ScratchInfo.h:18
One scratch card: a jacket image under five stacked cover layers, with a rub gesture,...
Definition ScratchView.h:86
void imageSet()
A placeholder image-installation hook (empty in the binary).
Definition ScratchView.m:226
BOOL scratchContinue()
Continues a paused scratch: opens the card early, or resumes and refreshes.
Definition ScratchView.m:354
id< ScratchViewDelegate > aDelegate
The scratch delegate.
Definition ScratchView.h:92
ScratchViewState getState()
The current scratch state.
Definition ScratchView.m:411
void startIndicator()
Starts the download indicator spinner.
Definition ScratchView.m:275
void scratchCancel()
Cancels a paused scratch, restoring the covers and stopping the spinner.
Definition ScratchView.m:371
void timerUpdate()
A per-frame timer hook (empty in the binary).
Definition ScratchView.m:419
A rounded panel with a spinner, a one-line message, a progress bar and an abort button.
Definition StoreDialogView.h:37
Performs a single HTTP request.
Definition Downloader.h:30
nullable StoreDialogView * modalDialog()
The host's modal download dialog, or nil before it has been built.
BOOL isScratchEnable()
Whether the card may currently be scratched.
void hideModalDialog()
Hides the modal download dialog.