1#include "Game/Screen/IconAButton.hpp"
2#include "Game/Util.hpp"
5IconAButton::IconAButton(
bool connectToScene,
bool connectToPause) :
LayoutActor(
"Aボタンアイコン", true) {
8 mFollowActor =
nullptr;
12 MR::connectToSceneLayoutOnPause(
this);
15 MR::connectToSceneTalkLayout(
this);
23 initLayoutManager(
"IconAButton", 1);
24 initNerve(&NrvIconAButton::IconAButtonNrvOpen::sInstance);
25 MR::startAnim(
this,
"Appear", 0);
26 MR::setAnimFrameAndStop(
this, 0.0f, 0);
30void IconAButton::setFollowActorPane(
LayoutActor *pActor,
const char *pName) {
31 mFollowActor = pActor;
32 snprintf(mFollowPane,
sizeof(mFollowPane),
"%s", pName);
33 MR::setFollowPos(mFollowPos,
this,
nullptr);
36bool IconAButton::isOpen() {
37 return MR::isDead(
this) ==
false;
40bool IconAButton::isWait() {
41 return isNerve(&NrvIconAButton::IconAButtonNrvWait::sInstance);
44void IconAButton::openWithTalk() {
47 MR::showPane(
this,
"PicPlate");
48 setNerve(&NrvIconAButton::IconAButtonNrvOpen::sInstance);
49 MR::setTextBoxLayoutMessageRecursive(
this,
"IconAButton",
"Layout_SystemTalk");
52void IconAButton::openWithRead() {
55 MR::showPane(
this,
"PicPlate");
56 setNerve(&NrvIconAButton::IconAButtonNrvOpen::sInstance);
57 MR::setTextBoxLayoutMessageRecursive(
this,
"IconAButton",
"Layout_SystemRead");
60void IconAButton::openWithTurn() {
63 MR::showPane(
this,
"PicPlate");
64 setNerve(&NrvIconAButton::IconAButtonNrvOpen::sInstance);
65 MR::setTextBoxLayoutMessageRecursive(
this,
"IconAButton",
"Layout_SystemTurn");
68void IconAButton::openWithoutMessage() {
71 MR::showPane(
this,
"PicPlate");
72 setNerve(&NrvIconAButton::IconAButtonNrvOpen::sInstance);
73 MR::hidePane(
this,
"PicPlate");
74 MR::clearTextBoxMessageRecursive(
this,
"IconAButton");
79void IconAButton::exeOpen() {
80 if (MR::isFirstStep(
this)) {
81 MR::startAnim(
this,
"Appear", 0);
84 if (MR::isAnimStopped(
this, 0)) {
85 setNerve(&NrvIconAButton::IconAButtonNrvWait::sInstance);
89void IconAButton::exeTerm() {
90 if (MR::isFirstStep(
this)) {
91 MR::startAnim(
this,
"End", 0);
94 if (MR::isAnimStopped(
this, 0)) {
99void IconAButton::control() {
103void IconAButton::updateFollowPos() {
104 if (mFollowActor !=
nullptr) {
105 MR::copyPaneTrans(&mFollowPos, mFollowActor, mFollowPane);
109IconAButton::~IconAButton() {
113namespace NrvIconAButton {
114 INIT_NERVE(IconAButtonNrvOpen);
115 INIT_NERVE(IconAButtonNrvWait);
116 INIT_NERVE(IconAButtonNrvTerm);