JubeatPlus 3.9.11
Loading...
Searching...
No Matches
EditViewController.h
Go to the documentation of this file.
1
15
16#import <QuartzCore/QuartzCore.h>
17#import <UIKit/UIKit.h>
18
19#import "AlertViewManager.h"
22#import "EditModalView.h"
23
24@class EAGLView;
25@class EditNoteRenderer;
26@class EditSequence;
27@class TuneInfo;
28
29NS_ASSUME_NONNULL_BEGIN
30
34@interface EditViewController : UIViewController <UIPopoverPresentationControllerDelegate,
39
46- (instancetype)init;
47
54- (nullable NSString *)getDirectoryPath:(unsigned int)tuneID;
55
60- (void)loadNotesData;
61
68- (void)importNotesData:(nullable NSString *)fileName;
69
75- (void)autoSave:(BOOL)force;
76
81- (void)saveNotesData;
82
87- (void)resetEditMember;
88
96- (void)setGridButton:(nullable UIButton *)button type:(int)type pos:(CGPoint)pos;
97
102- (void)loadView;
103
108- (void)loadResources;
109
114- (void)releaseResources;
115
120- (void)saveScore;
121
126- (void)startAnimation;
127
132- (void)stopAnimation;
133
139- (void)finishMusic:(nullable NSNotification *)notification;
140
146- (void)addNote:(BOOL)isSwitch;
147
152- (void)deleteNote;
153
158- (void)stopMusic;
159
164- (void)controllMusic;
165
171- (void)loop:(nullable CADisplayLink *)displayLink;
172
177- (void)exeClap;
178
183- (void)startGame;
184
190- (void)pushBtnPause:(nullable id)sender;
191
196- (void)deletePasteBtn;
197
203- (void)changeModeImage:(nullable NSString *)imageName;
204
210- (void)pushBtnAdd:(nullable id)sender;
211
217- (void)pushBtnDelete:(nullable id)sender;
218
224- (void)pushBtnMode:(nullable id)sender;
225
231- (void)longPressBtnMode:(nullable UILongPressGestureRecognizer *)gesture;
232
238- (void)pinchGesture:(nullable UIPinchGestureRecognizer *)gesture;
239
245- (void)pushBtnUndo:(nullable id)sender;
246
252- (void)pushBtnRedo:(nullable id)sender;
253
259- (void)pushbtnSysMenu:(nullable id)sender;
260
266- (void)pushBtnGridChange:(nullable id)sender;
267
273- (void)selectGridType:(int)type;
274
280- (void)longPressEnable:(BOOL)enable;
281
286- (void)ReleaseSelectArea;
287
293- (void)pushAreaCopy:(nullable id)sender;
294
300- (void)pushAreaDelete:(nullable id)sender;
301
307- (void)pushAreaPaste:(nullable id)sender;
308
314- (void)pushAreaPaste2:(nullable id)sender;
315
321- (void)pushClap:(nullable id)sender;
322
328- (void)pushHelp:(nullable id)sender;
329
335- (void)pushRewind:(nullable id)sender;
336
341- (void)createTimeLineView;
342
348- (void)handleSwipe:(nullable UISwipeGestureRecognizer *)gesture;
349
354- (void)resetPaste;
355
360- (void)resetLongPress;
361
366- (void)resetGesture;
367
373- (void)longPressGesture:(nullable UILongPressGestureRecognizer *)gesture;
374
380- (void)tapGesture:(nullable UITapGestureRecognizer *)gesture;
381
387- (void)dpGesture:(nullable UITapGestureRecognizer *)gesture;
388
393- (void)resumeInPauseView;
394
399- (void)endInPauseView;
400
405- (void)end;
406
411- (void)suspend;
412
417- (void)resume;
418
423- (void)terminate;
424
429- (void)templateRelease;
430
436- (void)selectLoadSlot:(nullable NSNumber *)slot;
437
442- (void)selectExit;
443
448- (void)selectSave;
449
455
461- (void)editFileListViewDecideItem:(int)index;
462
468- (void)popoverPresentationControllerDidDismissPopover:
469 (nullable UIPopoverPresentationController *)popoverPresentationController;
470
477- (void)editBtnSelect:(nullable EditButtonViewController *)controller
478 tag:(nullable NSDictionary *)info;
479
485- (void)alertSelect:(nullable NSDictionary *)info;
486
492- (void)editModalViewClose:(nullable EditModalView *)view;
493
499
506- (float)adjustTime:(float)time;
507
514- (float)reverseAdjustTime:(float)time;
515
517@property(nonatomic, strong, nullable) TuneInfo *currentTune;
519@property(nonatomic, strong, nullable) NSString *jcfName;
521@property(nonatomic) unsigned int currentDiff;
523@property(nonatomic, strong, nullable) NSString *currentMarker;
525@property(nonatomic, strong, nullable) NSData *musicData;
527@property(nonatomic, strong, nullable) EAGLView *glView;
529@property(nonatomic, strong, nullable) EditNoteRenderer *mainGameRenderer;
531@property(nonatomic, strong, nullable) CADisplayLink *displayLink;
533@property(nonatomic, strong, nullable) EditSequence *sequence;
535@property(nonatomic, strong, nullable) UIButton *btnPause;
537@property(nonatomic, strong, nullable) UIButton *btnMode;
539@property(nonatomic, strong, nullable) UIButton *btnSysMenu;
541@property(nonatomic, strong, nullable) UIButton *btnClap;
543@property(nonatomic, strong, nullable) UIImageView *clapBtnView;
545@property(nonatomic, strong, nullable) UIButton *btnRewind;
547@property(nonatomic, strong, nullable) UIButton *btnHelp;
549@property(nonatomic, strong, nullable) UIButton *btnSelGrid;
551@property(nonatomic, strong, nullable) UIButton *btnAreaCpy;
553@property(nonatomic, strong, nullable) UIButton *btnAreaDel;
555@property(nonatomic, strong, nullable) UIButton *btnAreaPst;
557@property(nonatomic, strong, nullable) UIButton *btnUndo;
559@property(nonatomic, strong, nullable) UIButton *btnRedo;
561@property(nonatomic, strong, nullable) NSArray *editData;
563@property(nonatomic, strong, nullable) NSMutableDictionary *editorInfo;
565@property(nonatomic, strong, nullable) NSMutableDictionary *editSimpleData;
567@property(nonatomic, strong, nullable) UIView *timeLineView;
568
569@end
570
571NS_ASSUME_NONNULL_END
572
573// code: language=Objective-C
574// kate: hl Objective-C;
575// vim: set ft=objc :
A shared alert presenter that hides the UIAlertController/UIAlertView split behind one API.
The popover of editor buttons.
A popover listing the player's saved edit charts.
The edit-mode modal form for a custom sequence's metadata.
The OpenGL ES 1.1 rendering view backing the game.
Definition EAGLView.h:19
A row of image buttons built from a list of artwork names.
Definition EditButtonViewController.h:53
A modal navigation controller that edits a custom sequence's metadata.
Definition EditModalView.h:56
The edit-mode note renderer.
Definition EditNoteRenderer.h:41
The chart-editor data model.
Definition EditSequence.h:65
The chart-editor top-level view controller.
Definition EditViewController.h:38
EAGLView * glView
The OpenGL view.
Definition EditViewController.h:527
NSString * jcfName
The saved chart file name.
Definition EditViewController.h:519
void startGame()
Starts play mode: re-reads the adjust offset, resets the sequence, and applies prefs.
Definition EditViewController.m:1298
void editModalViewDelegateSaveEditFile()
Saves the edited metadata after the modal reports a save.
Definition EditViewController.m:2014
void releaseResources()
Tears down the renderer, sequence, framebuffer, and audio resources.
Definition EditViewController.m:1048
void templateRelease()
Releases the system-menu popover reference.
Definition EditViewController.m:1876
CADisplayLink * displayLink
The per-frame display link driving loop: .
Definition EditViewController.h:531
NSMutableDictionary * editorInfo
The editor metadata dictionary.
Definition EditViewController.h:563
NSString * currentMarker
The current marker resource name.
Definition EditViewController.h:523
void deletePasteBtn()
Hides the paste button.
Definition EditViewController.m:1340
EditNoteRenderer * mainGameRenderer
The edit-mode note renderer.
Definition EditViewController.h:529
void resetEditMember()
Resets the editor's per-session state to its defaults.
Definition EditViewController.m:704
void resetLongPress()
Resets the long-press area selection.
Definition EditViewController.m:1710
UIButton * btnUndo
The undo button.
Definition EditViewController.h:557
void end()
Dismisses the editor and ends the session.
Definition EditViewController.m:1798
void exeClap()
Plays the clap sound effect when the sequence passes a clap point.
Definition EditViewController.m:1281
NSData * musicData
The compressed music data for the current chart.
Definition EditViewController.h:525
void terminate()
Fully resets the editor to a clean state, releasing per-chart resources.
Definition EditViewController.m:1831
void resumeInPauseView()
Resumes animation and BGM when returning from a paused popover.
Definition EditViewController.m:1778
void resetGesture()
Resets both the paste and long-press selections.
Definition EditViewController.m:1719
void startAnimation()
Starts the per-frame display link that drives loop: .
Definition EditViewController.m:1197
void deleteNote()
Deletes notes from the sequence at every held panel.
Definition EditViewController.m:1246
void stopAnimation()
Stops the per-frame display link.
Definition EditViewController.m:1208
void selectExit()
The system-menu exit selection callback.
Definition EditViewController.m:1908
UIImageView * clapBtnView
The clap button's decorative image view.
Definition EditViewController.h:543
UIButton * btnAreaDel
The area-delete button.
Definition EditViewController.h:553
void editFileListViewCancel()
The file-list cancel callback (no-op).
Definition EditViewController.m:1941
void saveScore()
Discarded persistence stub kept for the interface.
Definition EditViewController.m:1059
NSArray * editData
The loaded sequence table for the current chart.
Definition EditViewController.h:561
TuneInfo * currentTune
The tune being edited.
Definition EditViewController.h:517
UIButton * btnRedo
The redo button.
Definition EditViewController.h:559
EditSequence * sequence
The editable note sequence.
Definition EditViewController.h:533
NSMutableDictionary * editSimpleData
The summary metadata dictionary.
Definition EditViewController.h:565
void loadNotesData()
Loads the note data for the current tune from EditDataManager into the editor state.
Definition EditViewController.m:1089
void loadResources()
Loads the button images, renderer, sequence, audio, and artwork for the current chart.
Definition EditViewController.m:838
void resume()
Resumes the editor's animation.
Definition EditViewController.m:1826
void selectSave()
Presents the save-confirmation alert, warning about conflicting markers.
Definition EditViewController.m:1914
void loadView()
Builds and lays out the editor's OpenGL view and button bar.
Definition EditViewController.m:740
void saveNotesData()
Persists the current chart, its editor info, and its summary data to disk.
Definition EditViewController.m:1155
UIButton * btnRewind
The rewind button.
Definition EditViewController.h:545
instancetype init()
Initialises the editor: reads the saved adjust-sector offset, resolves the device idiom,...
Definition EditViewController.m:680
UIButton * btnSelGrid
The grid-division button.
Definition EditViewController.h:549
void resetPaste()
Resets the paste selection.
Definition EditViewController.m:1702
UIButton * btnAreaPst
The area-paste button.
Definition EditViewController.h:555
UIView * timeLineView
The timeline scrubbing view.
Definition EditViewController.h:567
void controllMusic()
Clamps playback to the sequence duration and stops music when it runs past the end.
Definition EditViewController.m:1267
UIButton * btnPause
The pause / play button.
Definition EditViewController.h:535
void suspend()
Suspends the editor when backgrounded, saving if playing.
Definition EditViewController.m:1804
UIButton * btnClap
The clap-toggle button.
Definition EditViewController.h:541
UIButton * btnAreaCpy
The area-copy button.
Definition EditViewController.h:551
void endInPauseView()
Ends the edit session and returns to the root controller from a paused popover.
Definition EditViewController.m:1788
UIButton * btnHelp
The help button.
Definition EditViewController.h:547
UIButton * btnSysMenu
The system-menu button.
Definition EditViewController.h:539
void ReleaseSelectArea()
Clears the current area selection.
Definition EditViewController.m:1553
UIButton * btnMode
The add/delete mode button.
Definition EditViewController.h:537
unsigned int currentDiff
The current difficulty.
Definition EditViewController.h:521
void createTimeLineView()
Builds the timeline scrubbing view and its gesture recognisers.
Definition EditViewController.m:1666
void stopMusic()
Stops BGM playback and restores the play button image.
Definition EditViewController.m:1256
A tune, its three difficulty levels, and how it sorts.
Definition TuneInfo.h:20
The optional delegate of AlertViewManager.
Definition AlertViewManager.h:18
What an EditButtonViewController tells its owner.
Definition EditButtonViewController.h:31
What an EditFileListViewController tells its owner.
Definition EditFileListViewController.h:26
What an EditModalView tells its owner.
Definition EditModalView.h:27