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

A tappable banner that slides in to announce a completed mission and auto-dismisses. More...

#include <MissionAchievementMessage.h>

Inheritance diagram for MissionAchievementMessage:
Collaboration diagram for MissionAchievementMessage:

Instance Methods

(instancetype) - initWithTitle:
 Builds the banner for a mission title and its achievement state.
(void) - enterAnimationStart
 Runs the four-stage entry animation and plays the completion sound.
(void) - outerAnimationStart
 Runs the exit animation that slides the banner back off-screen.
(void) - transReset
 Parks the balloon and message view off-screen and hides the banner, ready for entry.
(void) - dispEnd:
 The auto-dismiss timer callback: clears the timer and starts the exit animation.
(void) - messageEnd
 Tells the delegate the banner has closed, if it responds.
(void) - createMassageBg:
 Builds the balloon background sized to size and adds it to the message view.
(int) - messageHeight:
 Measures the height the achievement text needs for a title.
(void) - setAchieveTitle:
 Replaces the banner's text with a new title and re-lays out the balloon.
(nullable NSAttributedString *) - createAchiveText:
 Builds the attributed achievement text for a title.

Class Methods

(nullable NSArray *) + createTitleArray:achieve:
 Builds the array of reward-title lines for the mission sheets and their achievement state.

Properties

id< MissionAchievementMessageDelegate > aDelegate
 The object told when the banner dismisses.

Detailed Description

A tappable banner that slides in to announce a completed mission and auto-dismisses.

Method Documentation

◆ createAchiveText:

- (nullable NSAttributedString *) createAchiveText: (nullable id) title

Builds the attributed achievement text for a title.

The title is an array of lines of segments; segment zero of each line is the sheet name in white and the rest are achieved sub-titles in orange, one per line, closed with a white flourish.

Parameters
titleThe mission title payload.
Returns
The attributed string.
Ghidra address:
0x4fcf0

◆ createMassageBg:

- (void) createMassageBg: (CGSize) size

Builds the balloon background sized to size and adds it to the message view.

Parameters
sizeThe balloon's content size.
Ghidra address:
0x4f81c
Ghidra address:
0x4f81c

◆ createTitleArray:achieve:

+ (nullable NSArray *) createTitleArray: (nullable NSArray *) title
achieve: (nullable NSDictionary *) achieve 

Builds the array of reward-title lines for the mission sheets and their achievement state.

For every sheet, opens a line group with the sheet name, then for each of the sheet's mission terms whose id matches an achievement record renders a "title" or "title(progress/target)" entry; a group is kept only when it gained at least one entry beyond its name.

Parameters
titleThe array of ChallengeMissionSheet mission sheets.
achieveThe achievement records, keyed by mission id.
Returns
The array of line groups, each an array of strings.
Ghidra address:
0x4d790

◆ dispEnd:

- (void) dispEnd: (nullable NSTimer *) timer

The auto-dismiss timer callback: clears the timer and starts the exit animation.

Parameters
timerThe fired timer.
Ghidra address:
0x4f730

◆ enterAnimationStart

- (void) enterAnimationStart

Runs the four-stage entry animation and plays the completion sound.

Clears the tap flag, plays SD_MISSION_GAUGE , and fades the banner in over 0.2s; the completion blocks start the icon spinning, slide the message view down, settle the balloon, and finally arm the 6s auto-dismiss timer.

Ghidra address:
0x4ea44
Ghidra address:
0x4ea44
Ghidra address:
0x4eba8
Ghidra address:
0x4ebf4
Ghidra address:
0x4ed34
Ghidra address:
0x4edb8
Ghidra address:
0x4eedc
Ghidra address:
0x4efa4

◆ initWithTitle:

- (instancetype) initWithTitle: (nullable id) title

Builds the banner for a mission title and its achievement state.

Fills the whole screen with a dimming background, lays out the spinning completion icon, the balloon message background, and the achievement text, then parks everything off-screen with -transReset ready for -enterAnimationStart .

Parameters
titleThe mission title payload.
Returns
The initialised banner.
Ghidra address:
0x4e0c8

◆ messageEnd

- (void) messageEnd

Tells the delegate the banner has closed, if it responds.

Ghidra address:
0x4f76c

◆ messageHeight:

- (int) messageHeight: (nullable id) title

Measures the height the achievement text needs for a title.

With no title the base line height (40 on a pad, 20 otherwise) is returned; otherwise the text is measured in a throwaway label and the height grows by one line per achieved entry.

Parameters
titleThe mission title payload.
Returns
The text height in points.
Ghidra address:
0x4e6fc

◆ outerAnimationStart

- (void) outerAnimationStart

Runs the exit animation that slides the banner back off-screen.

Ghidra address:
0x4f058
Ghidra address:
0x4f318
Ghidra address:
0x4f418
Ghidra address:
0x4f50c
Ghidra address:
0x4f558

◆ setAchieveTitle:

- (void) setAchieveTitle: (nullable id) title

Replaces the banner's text with a new title and re-lays out the balloon.

Tears down the old balloon and text, re-lays the text inside the balloon content box, sizes a new balloon to fit, and recentres the completion icon over it.

Parameters
titleThe mission title payload.
Ghidra address:
0x4fa3c

◆ transReset

- (void) transReset

Parks the balloon and message view off-screen and hides the banner, ready for entry.

Collapses the balloon toward its arrow with a zero scale and pushes the message view up by its own height, then sets the banner's alpha to zero.

Ghidra address:
0x4f5cc
Ghidra address:
0x4f5cc

Property Documentation

◆ aDelegate

- (id<MissionAchievementMessageDelegate>) aDelegate
readwritenonatomicweak

The object told when the banner dismisses.

Held weakly.

Ghidra address:
0x349c78

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