17 static const char *AnmNameTbl[ANIM_COUNT] = {
18 "select_cursor_04_loopCursor.brlan"
21 static const char *GROUP_NAME_DT[ANIM_COUNT] = {
25 static const int ANIME_INDEX_TBL[ANIM_COUNT] = {
29 static const char *PPANE_TABLE[P_COUNT] = {
36 static const char *NPANE_TABLE[N_COUNT] = {
49 if (!
mResLoader.request(
"Layout/select_cursor/select_cursor.arc")) {
53 for (
int i = 0; i < LAYOUT_COUNT; i++) {
57 for (
int i = 0; i < LAYOUT_COUNT; i++) {
58 mLayouts[i].mBase.build(
"select_cursor_04.brlyt",
nullptr);
59 mLayouts[i].mBase.AnimeResRegister(AnmNameTbl, ANIM_COUNT);
60 mLayouts[i].mBase.GroupRegister(GROUP_NAME_DT, ANIME_INDEX_TBL, ANIM_COUNT);
62 mLayouts[i].mBase.PPaneRegister(PPANE_TABLE,
mLayouts[i].mpPicturePanes, P_COUNT);
63 mLayouts[i].mBase.NPaneRegister(NPANE_TABLE,
mLayouts[i].mpNullPanes, N_COUNT);
64 mLayouts[i].mpRootPane->SetVisible(
false);
73 mLayouts[i].mBase.LoopAnimeStartSetup(ANIM_CURSOR);
118 mLayouts[layoutId].mpRootPane->SetVisible(
true);
121 float paneHalfWidth, paneHalfHeight, paneScaleX, paneScaleY;
123 paneScaleX =
mLayouts[layoutId].mPaneGlbMtxScale.x;
124 paneScaleY =
mLayouts[layoutId].mPaneGlbMtxScale.y;
126 paneHalfWidth =
mLayouts[layoutId].mPaneSize.width / 2.0f;
127 paneHalfHeight =
mLayouts[layoutId].mPaneSize.height / 2.0f;
129 panePos.x =
mLayouts[layoutId].mPaneGlbMtxTrans.x +
mLayouts[layoutId].mRootPaneOffset.x;
130 if (
mLayouts[layoutId].mPaneBasePosH == nw4r::lyt::HORIZONTALPOSITION_LEFT) {
131 panePos.x += paneHalfWidth * paneScaleX;
132 }
else if (
mLayouts[layoutId].mPaneBasePosH == nw4r::lyt::HORIZONTALPOSITION_RIGHT) {
133 panePos.x -= paneHalfWidth * paneScaleX;
136 panePos.y =
mLayouts[layoutId].mPaneGlbMtxTrans.y +
mLayouts[layoutId].mRootPaneOffset.y;
137 if (
mLayouts[layoutId].mPaneBasePosV == nw4r::lyt::VERTICALPOSITION_TOP) {
138 panePos.y -= paneHalfHeight * paneScaleY;
139 }
else if (
mLayouts[layoutId].mPaneBasePosV == nw4r::lyt::VERTICALPOSITION_BOTTOM) {
140 panePos.y += paneHalfHeight * paneScaleY;
144 float hOffset =
mLayouts[layoutId].mPaneOffset.width;
145 float vOffset =
mLayouts[layoutId].mPaneOffset.height;
147 for (
int cornerPane = N_LU_00; cornerPane < N_COUNT; cornerPane++) {
149 if (cornerPane == N_LU_00 || cornerPane == N_LD_00) {
150 cornerPos.x = paneHalfWidth * paneScaleX;
151 cornerPos.x = -cornerPos.x;
152 cornerPos.x -= hOffset;
154 cornerPos.x = paneHalfWidth * paneScaleX;
155 cornerPos.x += hOffset;
158 if (cornerPane == N_LU_00 || cornerPane == N_RU_00) {
159 cornerPos.y = paneHalfHeight * paneScaleY;
160 cornerPos.y += vOffset;
162 cornerPos.y = paneHalfHeight * paneScaleY;
163 cornerPos.y = -cornerPos.y;
164 cornerPos.y -= vOffset;
168 mLayouts[layoutId].mpNullPanes[cornerPane]->SetTranslate(cornerPos);
172 mLayouts[layoutId].mPaneAlpha -= (255 / 10) + 1;
173 mLayouts[layoutId].mpNullPanes[N_cursor_00]->SetAlpha(
mLayouts[layoutId].mPaneAlpha);
175 if (
mLayouts[layoutId].mPaneAlpha < 0) {
192 mLayouts[layoutId].mIsActive =
true;
194 strcpy(
mLayouts[layoutId].mPaneName, pane->GetName());
195 mLayouts[layoutId].mPaneSize.width = pane->GetSize().width;
196 mLayouts[layoutId].mPaneSize.height = pane->GetSize().height;
199 mLayouts[layoutId].mPaneGlbMtxTrans.x = mtx._03;
200 mLayouts[layoutId].mPaneGlbMtxTrans.y = mtx._13;
201 mLayouts[layoutId].mPaneGlbMtxScale.x = mtx._00;
202 mLayouts[layoutId].mPaneGlbMtxScale.y = mtx._11;
204 mLayouts[layoutId].mPaneBasePosH = pane->GetBasePositionH();
205 mLayouts[layoutId].mPaneBasePosV = pane->GetBasePositionV();
207 mLayouts[layoutId].mPaneOffset.width = 0.0f;
208 mLayouts[layoutId].mPaneOffset.height = 0.0f;
209 mLayouts[layoutId].mRootPaneOffset.x = 0.0f;
210 mLayouts[layoutId].mRootPaneOffset.y = 0.0f;
212 mLayouts[layoutId].mPaneAlpha = 0xff;
215 if (forceTopDrawOrder) {
216 mLayouts[layoutId].mBase.mDrawOrder = 152;
218 for (
int i = 0; i < LAYOUT_COUNT; i++) {
#define ACTOR_PROFILE(profName, className, properties)
Creates an actor profile, using the profile number as the execute and draw order value.