| 1 | #include "Layout/FooterParts.h" |
| 2 | |
| 3 | #include "Library/Layout/LayoutActionFunction.h" |
| 4 | #include "Library/Layout/LayoutActorUtil.h" |
| 5 | #include "Library/Layout/LayoutInitInfo.h" |
| 6 | #include "Library/Nerve/NerveSetupUtil.h" |
| 7 | #include "Library/Nerve/NerveUtil.h" |
| 8 | |
| 9 | namespace { |
| 10 | NERVE_IMPL(FooterParts, Wait); |
| 11 | NERVE_IMPL(FooterParts, FadeOut); |
| 12 | NERVE_IMPL(FooterParts, FadeIn); |
| 13 | |
| 14 | NERVES_MAKE_NOSTRUCT(FooterParts, Wait, FadeOut, FadeIn); |
| 15 | } // namespace |
| 16 | |
| 17 | FooterParts::(al::LayoutActor* parentLayout, const al::LayoutInitInfo& info, |
| 18 | const char16* , const char* textPane, const char* partPane) |
| 19 | : al::LayoutActor("フッターパーツ" ), mTextPane(textPane), mText(footerText) { |
| 20 | al::initLayoutPartsActor(this, parentLayout, info, partPane, nullptr); |
| 21 | |
| 22 | al::setPaneString(this, mTextPane, mText, 0); |
| 23 | initNerve(&Wait, 0); |
| 24 | } |
| 25 | |
| 26 | void FooterParts::(const char16* text) { |
| 27 | mText = text; |
| 28 | al::setPaneString(this, mTextPane, text, 0); |
| 29 | } |
| 30 | |
| 31 | void FooterParts::(const char16* text) { |
| 32 | mText = text; |
| 33 | al::setNerve(user: this, nerve: &FadeIn); |
| 34 | } |
| 35 | |
| 36 | bool FooterParts::(const char16* text) { |
| 37 | if (mText == text) |
| 38 | return false; |
| 39 | changeTextFade(text); |
| 40 | return true; |
| 41 | } |
| 42 | |
| 43 | void FooterParts::() { |
| 44 | if (al::isFirstStep(user: this)) |
| 45 | al::startAction(layout: this, actionName: "Wait" , paneName: 0); |
| 46 | } |
| 47 | |
| 48 | void FooterParts::() {} |
| 49 | |
| 50 | void FooterParts::() { |
| 51 | if (al::isFirstStep(user: this)) { |
| 52 | al::setPaneString(this, mTextPane, mText, 0); |
| 53 | al::startAction(layout: this, actionName: "FadeIn" , paneName: 0); |
| 54 | } |
| 55 | if (al::isActionEnd(layout: this, paneName: nullptr)) |
| 56 | al::setNerve(user: this, nerve: &Wait); |
| 57 | } |
| 58 | |