Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
filemenu_createfile.c File Reference

Go to the source code of this file.

Macros

#define WINDOW_1_Y   (10)
 
#define WINDOW_2_Y   (67)
 
#define WINDOW_2_HEIGHT   (113)
 
#define ROWS   (6)
 
#define KEYBOARD_ROW_HEIGHT   17
 
#define FILEMENU_C9_OFFSET   5
 
#define KEYBOARD_COL_WIDTH   19
 

Functions

void filemenu_update_change_layout (s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
 
void filemenu_draw_contents_file_create_header (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
s32 msg_get_print_char_width (s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u8 flags)
 
void filemenu_draw_contents_choose_name (MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
 
void filemenu_choose_name_init (MenuPanel *menu)
 
void filemenu_choose_name_handle_input (MenuPanel *menu)
 
void filemenu_choose_name_update (MenuPanel *menu)
 
void filemenu_choose_name_cleanup (MenuPanel *menu)
 

Variables

HudScript HES_FilenameCaret
 
HudScript HES_FilenameSpace
 
HudScript HES_134F60_135120
 
HudScriptfilemenu_createfile_hudElemScripts []
 
s32 D_8024A18C = -4
 
MenuWindowBP filemenu_createfile_windowBPs []
 
MenuPanel filemenu_createfile_menuBP
 

Macro Definition Documentation

◆ WINDOW_1_Y

#define WINDOW_1_Y   (10)

Definition at line 23 of file filemenu_createfile.c.

◆ WINDOW_2_Y

#define WINDOW_2_Y   (67)

Definition at line 24 of file filemenu_createfile.c.

◆ WINDOW_2_HEIGHT

#define WINDOW_2_HEIGHT   (113)

Definition at line 25 of file filemenu_createfile.c.

◆ ROWS

#define ROWS   (6)

Definition at line 26 of file filemenu_createfile.c.

◆ KEYBOARD_ROW_HEIGHT

#define KEYBOARD_ROW_HEIGHT   17

Definition at line 168 of file filemenu_createfile.c.

Referenced by filemenu_draw_contents_choose_name().

◆ FILEMENU_C9_OFFSET

#define FILEMENU_C9_OFFSET   5

Definition at line 169 of file filemenu_createfile.c.

Referenced by filemenu_draw_contents_choose_name().

◆ KEYBOARD_COL_WIDTH

#define KEYBOARD_COL_WIDTH   19

Definition at line 171 of file filemenu_createfile.c.

Referenced by filemenu_draw_contents_choose_name().

Function Documentation

◆ filemenu_update_change_layout()

void filemenu_update_change_layout ( s32 windowIdx,
s32 * flags,
s32 * posX,
s32 * posY,
s32 * posZ,
f32 * scaleX,
f32 * scaleY,
f32 * rotX,
f32 * rotY,
f32 * rotZ,
s32 * darkening,
s32 * opacity )

Definition at line 76 of file filemenu_createfile.c.

84 {
85 Window* window = &gWindows[windowIdx];
86
87 if (window->updateCounter == 8) {
88 window->flags &= ~WINDOW_FLAG_INITIAL_ANIMATION;
90 }
91}
@ WINDOW_UPDATE_SHOW
Definition enums.h:5311
void set_window_update(s32 panelID, s32)
Definition windows.c:434
Window gWindows[64]
Definition windows.c:23

Referenced by filemenu_choose_name_handle_input(), and filemenu_draw_contents_choose_name().

◆ filemenu_draw_contents_file_create_header()

void filemenu_draw_contents_file_create_header ( MenuPanel * menu,
s32 baseX,
s32 baseY,
s32 width,
s32 height,
s32 opacity,
s32 darkening )

Definition at line 93 of file filemenu_createfile.c.

98 {
99#if VERSION_PAL
100 s32 temp_s2 = D_filemenu_8025095C[gCurrentLanguage]; // 36
101 s32 yOffset;
102 s32 xOffset;
103 s32 i;
104
106 filemenu_draw_file_name(filemenu_filename, 8, baseX + temp_s2 + 2, baseY + 22, 255, 0, 0, 11);
107 yOffset = 41;
108
109 for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
110 xOffset = temp_s2 + 6 + i * 11;
111 hud_element_set_render_pos(filemenu_createfile_hudElems[1], baseX + xOffset, baseY + yOffset);
112 if (i == 0) {
114 } else {
116 }
117 }
118
120 if (filemenu_filename_pos == 8) {
121 xOffset = temp_s2 + 86;
122 } else {
123 xOffset = temp_s2 + 9 + filemenu_filename_pos * 11;
124 }
125 yOffset = 45;
126 hud_element_set_render_pos(filemenu_createfile_hudElems[0], baseX + xOffset, baseY + yOffset);
128 }
129#else
130 s32 xOffset;
131 s32 yOffset;
132 s32 i;
133
135 filemenu_draw_file_name(filemenu_filename, 8, baseX + 36, baseY + 22, 255, 0, 0, 11);
136 xOffset = 41;
137
138 for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
139 hud_element_set_render_pos(filemenu_createfile_hudElems[1], baseX + 42 + (i * 11), baseY + xOffset);
140 if (i == 0) {
142 } else {
144 }
145 }
146
148 s32 phi_v0 = 122;
149
150 if (filemenu_filename_pos != 8) {
151 phi_v0 = (filemenu_filename_pos * 11) + 45;
152 }
153 hud_element_set_render_pos(filemenu_createfile_hudElems[0], baseX + phi_v0, baseY + 45);
155 }
156#endif
157}
@ FILE_MESSAGE_ENTER_A_FILE_NAME
Definition enums.h:5375
void filemenu_draw_file_name(u8 *, s32, s32, s32, s32, s32, s32, s32)
s8 filemenu_currentMenu
void filemenu_draw_message(u8 *, s32, s32, s32, s32, u32)
s32 filemenu_createfile_hudElems[4]
u8 filemenu_filename[8]
@ FILE_MENU_INPUT_NAME
Definition filemenu.h:20
s8 filemenu_filename_pos
u8 * filemenu_get_menu_message(s32 idx)
void hud_element_draw_without_clipping(s32 id)
void hud_element_draw_next(s32 id)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
#define ARRAY_COUNT(arr)
Definition macros.h:40
#define gCurrentLanguage
Definition variables.h:115

◆ msg_get_print_char_width()

s32 msg_get_print_char_width ( s32 character,
s32 charset,
s32 variation,
f32 msgScale,
s32 overrideCharWidth,
u8 flags )

Definition at line 1578 of file msg.c.

1578 {
1579 f32 charWidth;
1580
1581 if (character >= MSG_CONTROL_CHAR
1582 && (character != MSG_CHAR_READ_SPACE
1583 && character != MSG_CHAR_READ_FULL_SPACE
1584 && character != MSG_CHAR_READ_HALF_SPACE)) {
1585 return 0;
1586 }
1587
1588#if VERSION_IQUE
1589 if (character >= MSG_CHAR_MULTIBYTE_FIRST && character <= MSG_CHAR_MULTIBYTE_LAST) {
1590 charWidth = 16.0;
1591 return charWidth * msgScale;
1592 }
1593#endif
1594
1595 if (overrideCharWidth != 0) {
1596 charWidth = overrideCharWidth;
1597 } else if (flags != 0) {
1598 u8* charWidthTable = MsgCharsets[charset]->rasters[variation].charWidthTable;
1599
1600 if (charWidthTable != NULL
1601 && character != MSG_CHAR_READ_SPACE
1602 && character != MSG_CHAR_READ_FULL_SPACE
1603 && character != MSG_CHAR_READ_HALF_SPACE) {
1604 charWidth = charWidthTable[character];
1605 } else {
1606 charWidth = MsgCharsets[charset]->rasters[variation].monospaceWidth;
1607 }
1608 } else {
1609 charWidth = MsgCharsets[charset]->rasters[variation].monospaceWidth;
1610 }
1611
1612 if (character == MSG_CHAR_READ_SPACE) {
1613 return charWidth * msgScale * CHAR_SPACE_MULTIPLIER;
1614 }
1615 if (character == MSG_CHAR_READ_FULL_SPACE) {
1616 f64 retWidth = charWidth * msgScale;
1617 return retWidth;
1618 }
1619 if (character == MSG_CHAR_READ_HALF_SPACE) {
1620 return charWidth * msgScale * 0.5;
1621 }
1622 if (character >= MSG_CONTROL_CHAR) {
1623 return 0;
1624 }
1625 return charWidth * msgScale;
1626}
MessageCharData * rasters
s8 flags
Definition demo_api.c:15
@ MSG_CHAR_READ_HALF_SPACE
Definition enums.h:6052
@ MSG_CHAR_READ_SPACE
Definition enums.h:6050
@ MSG_CHAR_READ_FULL_SPACE
Definition enums.h:6051
@ MSG_CONTROL_CHAR
Definition enums.h:6061
MessageCharset * MsgCharsets[5]
Definition msg_data.c:865
#define CHAR_SPACE_MULTIPLIER
Definition msg.c:1575

Referenced by filemenu_draw_contents_choose_name().

◆ filemenu_draw_contents_choose_name()

void filemenu_draw_contents_choose_name ( MenuPanel * menu,
s32 baseX,
s32 baseY,
s32 width,
s32 height,
s32 opacity,
s32 darkening )

Definition at line 173 of file filemenu_createfile.c.

178 {
179 s32 changeLayoutOffset;
180 s32 currentPage;
181 s32 previousPage;
182 s32 page;
183 s32 row, col;
184 s32 xOffset, yOffset;
185 s32 c, specialChar;
186 s32 layer;
187 s32 flags;
188 s32 color;
189 s32 xNudge;
191
193 changeLayoutOffset = window->updateCounter * 2;
194 currentPage = menu->state;
195 previousPage = menu->state != 1;
196 if (changeLayoutOffset > 16) {
197 changeLayoutOffset = 16;
198 }
199
200 for (row = 0; row < menu->numRows; row++) {
201 for (layer = 0; layer < 2; layer++) {
202 yOffset = 15 * row + 4;
203 if (layer == 0) {
204 page = currentPage;
205 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE,
206 baseX,
207 baseY + yOffset,
208 baseX + width,
209 baseY + yOffset + changeLayoutOffset);
210 } else {
211 page = previousPage;
212 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE,
213 baseX,
214 baseY + yOffset + changeLayoutOffset,
215 baseX + width,
216 baseY + yOffset + 16);
217 }
218
219 for (col = 0; col < menu->numCols; col++) {
220 c = menu->gridData[page * menu->numCols * menu->numRows + menu->numCols * row + col];
221 if (c != MSG_CHAR_MENU_SPACE) {
222 if (col == menu->col && row == menu->row) {
223 flags = 8;
224 color = 0;
225 } else {
226 flags = 0;
227 color = 10;
228 }
229 xOffset = KEYBOARD_COL_WIDTH * col + 12;
230 yOffset = KEYBOARD_ROW_HEIGHT * row + 5;
231#if VERSION_PAL
232 xNudge = msg_get_print_char_width(c, 0, 0, 1.0f, 0, 1);
233#endif
234 specialChar = c;
235 if (c >= 0xA2 && c < 0xF0) {
236 if (c >= MSG_CHAR_MENU_SPACE) {
237 hud_element_set_render_pos(filemenu_createfile_hudElems[2], baseX + xOffset + 22, baseY + yOffset + 8);
239 flags = 0;
240 }
241 }
242 if (specialChar == MSG_CHAR_MENU_SPACE) {
243 xOffset -= 1;
244 }
245 if (specialChar == MSG_CHAR_MENU_BACK) {
246#if VERSION_PAL
247 xOffset += 16;
248#else
249 xOffset += 5;
250#endif
251 }
252 if (specialChar == MSG_CHAR_MENU_END) {
253#if VERSION_PAL
255 xOffset += 4;
256 } else {
257 xOffset += 8;
258 }
259#else
260 xOffset += 8;
261#endif
262 }
263 if (specialChar == MSG_CHAR_MENU_SPACE || specialChar == MSG_CHAR_MENU_BACK || specialChar == MSG_CHAR_MENU_END) {
264 yOffset -= 1;
265 xNudge = 9;
266 }
267#if VERSION_PAL
268 filemenu_draw_message((u8*)c, baseX + xOffset + ((8 - xNudge) / 2), baseY + yOffset, 255, color, flags);
269#else
270 filemenu_draw_message((u8*)c, baseX + xOffset, baseY + yOffset, 255, color, flags);
271#endif
272 }
273 }
274 }
275 }
276 gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, baseX, baseY, baseX + width, baseY + height);
277 } else {
278 for (col = 0; col < menu->numCols; col++) {
279 for (row = 0; row < menu->numRows; row++) {
280 c = menu->gridData[menu->state * menu->numCols * menu->numRows + menu->numCols * row + col];
281 if (c != MSG_CHAR_MENU_SPACE) {
282 if (col == menu->col && row == menu->row) {
283 flags = 8;
284 color = 0;
285 } else {
286 flags = 0;
287 color = 10;
288 }
289 xOffset = col * KEYBOARD_COL_WIDTH + 12;
290 yOffset = row * KEYBOARD_ROW_HEIGHT + 5;
291#if VERSION_PAL
292 xNudge = msg_get_print_char_width(c, 0, 0, 1.0f, 0, 1);
293#endif
294 specialChar = c;
295 if (c >= 0xA2 && c < 0xF0) {
296 if (c >= MSG_CHAR_MENU_SPACE) {
297 hud_element_set_render_pos(filemenu_createfile_hudElems[2], baseX + xOffset + 22, baseY + yOffset + 8);
299 flags = 0;
300 }
301 }
302 if (specialChar == MSG_CHAR_MENU_SPACE) {
303 xOffset -= 1;
304 }
305 if (specialChar == MSG_CHAR_MENU_BACK) {
306 xOffset += FILEMENU_C9_OFFSET;
307 }
308 if (specialChar == MSG_CHAR_MENU_END) {
309#if VERSION_PAL
311 xOffset += 4;
312 } else {
313 xOffset += 8;
314 }
315#else
316 xOffset += 8;
317#endif
318 }
319 if (specialChar == MSG_CHAR_MENU_SPACE || specialChar == MSG_CHAR_MENU_BACK || specialChar == MSG_CHAR_MENU_END) {
320 yOffset -= 1;
321 xNudge = 9;
322 }
323#if VERSION_PAL
324 filemenu_draw_message((u8*)c, baseX + xOffset + ((8 - xNudge) / 2), baseY + yOffset, 255, color, flags);
325#else
326 filemenu_draw_message((u8*)c, baseX + xOffset, baseY + yOffset, 255, color, flags);
327#endif
328 }
329 }
330 }
331 }
332
335 D_8024A18C = -4;
336 }
337 D_8024A18C++;
339 baseX + 2 + menu->col * KEYBOARD_COL_WIDTH,
340 baseY + 13 + menu->row * KEYBOARD_ROW_HEIGHT);
341 }
342}
@ BUTTON_STICK_UP
Definition enums.h:2791
@ BUTTON_STICK_DOWN
Definition enums.h:2792
@ BUTTON_STICK_LEFT
Definition enums.h:2793
@ BUTTON_STICK_RIGHT
Definition enums.h:2794
@ LANGUAGE_DE
Definition enums.h:6401
@ WINDOW_FLAG_INITIAL_ANIMATION
Definition enums.h:4996
@ MSG_CHAR_MENU_SPACE
Definition enums.h:6036
@ MSG_CHAR_MENU_BACK
Definition enums.h:6039
@ MSG_CHAR_MENU_END
Definition enums.h:6040
@ WIN_FILES_INPUT_KEYBOARD
Definition enums.h:5293
s32 filemenu_heldButtons
#define KEYBOARD_ROW_HEIGHT
s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u8 flags)
Definition msg.c:1578
#define FILEMENU_C9_OFFSET
void filemenu_update_change_layout(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
#define KEYBOARD_COL_WIDTH
s32 D_8024A18C
void filemenu_set_cursor_goal_pos(s32 windowIndex, s32 posX, s32 posY)
WindowUpdateFunc fpUpdate
void(* func)(s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
Gfx * gMainGfxPos
Definition cam_main.c:15

◆ filemenu_choose_name_init()

void filemenu_choose_name_init ( MenuPanel * menu)

Definition at line 345 of file filemenu_createfile.c.

345 {
346 s32 width;
347 s32 i;
348
349 for (i = 0; i < ARRAY_COUNT(filemenu_createfile_hudElemScripts); i++) {
352 }
353
354 for (i = 0; i < ARRAY_COUNT(filemenu_createfile_windowBPs); i++) {
356 }
357
359
362
363 menu->initialized = TRUE;
364}
@ WIN_FILES_INPUT_FIELD
Definition enums.h:5292
#define CENTER_WINDOW_X(id)
Definition filemenu.h:6
HudScript * filemenu_createfile_hudElemScripts[]
MenuWindowBP filemenu_createfile_windowBPs[]
void setup_pause_menu_tab(MenuWindowBP *bpArray, s32 arraySize)
Definition windows.c:461
s32 hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
void hud_element_set_flags(s32 id, s32 flags)
Turns on the given flags.
@ HUD_ELEMENT_FLAG_80
Definition hud_element.h:80
MenuPanel * tab

◆ filemenu_choose_name_handle_input()

void filemenu_choose_name_handle_input ( MenuPanel * menu)

Definition at line 366 of file filemenu_createfile.c.

366 {
367 s32 prevSelected = menu->selected;
368 s32 i;
369
370#if VERSION_PAL
373#endif
374
376 menu->col--;
377 if (menu->col < 0) {
378 menu->col = menu->numCols - 1;
379 }
381 menu->col++;
382 if (menu->col >= menu->numCols) {
383 menu->col = 0;
384 }
385 if (menu->row == menu->numRows - 1) {
386 if (menu->col > 10) {
387 menu->col = 0;
388 } else if (menu->col == 8 || menu->col == 9) {
389 menu->col = 10;
390 }
391#if !VERSION_PAL
392 else if (menu->col == 5 || menu->col == 6) {
393 menu->col = 7;
394 }
395#endif
396 }
397 }
398
400 menu->row--;
401 if (menu->row < 0) {
402 menu->row = menu->numRows - 1;
403 }
405 menu->row++;
406 if (menu->row >= menu->numRows) {
407 menu->row = 0;
408 }
409 }
410
411 if (menu->row == menu->numRows - 1) {
412 if (menu->col > 10) {
413 menu->col = 10;
414 } else if (menu->col == 8 || menu->col == 9) {
415 menu->col = 7;
416 }
417#if !VERSION_PAL
418 else if (menu->col == 5 || menu->col == 6) {
419 menu->col = 4;
420 }
421#endif
422 }
423
425 if (prevSelected != menu->selected) {
427 }
428
430 switch (menu->selected) {
435 }
440 }
441 break;
443 if (menu->state != FM_INPUT_CHARSET_B) {
446 filemenu_set_selected(menu, menu->col, menu->row);
448 }
449 break;
451 if (menu->state != FM_INPUT_CHARSET_A) {
454 filemenu_set_selected(menu, menu->col, menu->row);
456 }
457 break;
459 // handled later to combine with B-input detection
460 break;
462 for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
464 break;
465 }
466 }
467 if (i == ARRAY_COUNT(filemenu_filename)) {
469 break;
470 }
471
478
479#if VERSION_PAL
481#else
483#endif
487
491 return;
492 default:
495 filemenu_filename[7] = menu->selected;
496 } else {
501 }
502 }
503 break;
504 }
505
508 && menu->selected != MSG_CHAR_MENU_BACK
510 ) {
511 filemenu_set_selected(menu, menu->numCols - 3, menu->numRows - 1);
512 }
513 }
514
518 if (filemenu_filename_pos < 0) {
534 return;
535 }
536
539 }
540 }
541
543 for (i = 0; i < ARRAY_COUNT(filemenu_filename); i++) {
545 break;
546 }
547 }
548 if (i == ARRAY_COUNT(filemenu_filename)) {
550 return;
551
552 }
553
556
561
562#if VERSION_PAL
564#else
566#endif
570
574 }
575}
@ BUTTON_A
Definition enums.h:2790
@ BUTTON_START
Definition enums.h:2787
@ BUTTON_B
Definition enums.h:2789
@ SOUND_CREATE_FILE_MOVE_CURSOR
Definition enums.h:1540
@ SOUND_CREATE_FILE_BACKSPACE
Definition enums.h:1542
@ SOUND_CREATE_FILE_CHANGE_CHARSET
Definition enums.h:1543
@ SOUND_MENU_NEXT
Definition enums.h:700
@ SOUND_CREATE_FILE_SET_CHARACTER
Definition enums.h:1541
@ SOUND_MENU_ERROR
Definition enums.h:933
@ MSG_CHAR_MENU_USE_CHARSET_B
Definition enums.h:6037
@ MSG_CHAR_MENU_USE_CHARSET_A
Definition enums.h:6038
@ WIN_FILES_SLOT3_BODY
Definition enums.h:5302
@ WIN_FILES_TITLE
Definition enums.h:5289
@ WIN_FILES_OPTION_CENTER
Definition enums.h:5298
@ WIN_FILES_OPTION_RIGHT
Definition enums.h:5299
@ WIN_FILES_STEREO
Definition enums.h:5295
@ WIN_FILES_OPTION_LEFT
Definition enums.h:5297
@ WIN_FILES_SLOT1_BODY
Definition enums.h:5300
@ WIN_FILES_SLOT2_BODY
Definition enums.h:5301
@ WIN_FILES_MONO
Definition enums.h:5296
@ WIN_FILES_CONFIRM_PROMPT
Definition enums.h:5290
@ WIN_FILES_CONFIRM_OPTIONS
Definition enums.h:5294
@ WIN_FILES_SLOT4_BODY
Definition enums.h:5303
@ FM_INPUT_CHARSET_A
Definition filemenu.h:38
@ FM_CONFIRM_CREATE
Definition filemenu.h:30
@ FM_INPUT_CHARSET_B
Definition filemenu.h:39
MenuPanel * filemenu_menus[]
void filemenu_update_show_with_rotation(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void filemenu_update_show_name_confirm(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
@ FILE_MENU_CONFIRM
Definition filemenu.h:18
@ FILE_MENU_MAIN
Definition filemenu.h:17
void filemenu_update_hidden_name_input(s32 windowIdx, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
s32 filemenu_pressedButtons
void filemenu_set_selected(MenuPanel *menu, s32 col, s32 row)
void sfx_play_sound(s32 soundID)
Definition sfx.c:517
#define MENU_PANEL_SELECTED_GRID_DATA(panel)
Definition macros.h:76

◆ filemenu_choose_name_update()

void filemenu_choose_name_update ( MenuPanel * menu)

Definition at line 577 of file filemenu_createfile.c.

577 {
578}

◆ filemenu_choose_name_cleanup()

void filemenu_choose_name_cleanup ( MenuPanel * menu)

Definition at line 580 of file filemenu_createfile.c.

580 {
581 s32 i;
582
583 for (i = 0; i < 3; i++) {
585 }
586}
void hud_element_free(s32 id)

Variable Documentation

◆ HES_FilenameCaret

HudScript HES_FilenameCaret
extern

Definition at line 45 of file menu_hud_scripts.c.

45 {
47 hs_SetCustomSize(16, 16)
50 hs_SetCI(9, ui_files_filename_caret)
52 hs_SetCI(6, ui_files_filename_caret)
54 hs_End
55};
#define hs_SetCustomSize(arg0, arg1)
#define hs_SetVisible
#define hs_End
@ HUD_ELEMENT_FLAG_200000
Definition hud_element.h:94
#define hs_Restart
#define hs_Loop
#define hs_SetCI(time, name)
#define hs_ClearFlags(arg0)
#define hs_SetFlags(arg0)

◆ HES_FilenameSpace

HudScript HES_FilenameSpace
extern

Definition at line 57 of file menu_hud_scripts.c.

◆ HES_134F60_135120

HudScript HES_134F60_135120
extern

Definition at line 289 of file menu_hud_scripts.c.

◆ filemenu_createfile_hudElemScripts

HudScript* filemenu_createfile_hudElemScripts[]
Initial value:
= {
}
HudScript HES_FilenameCaret
HudScript HES_134F60_135120
HudScript HES_FilenameSpace

Definition at line 9 of file filemenu_createfile.c.

Referenced by filemenu_choose_name_init().

◆ D_8024A18C

s32 D_8024A18C = -4

Definition at line 13 of file filemenu_createfile.c.

Referenced by filemenu_draw_contents_choose_name().

◆ filemenu_createfile_windowBPs

MenuWindowBP filemenu_createfile_windowBPs[]
Initial value:
= {
{
.windowID = WIN_FILES_INPUT_FIELD,
.unk_01 = 0,
.pos = { .x = 68, .y = (10) },
.width = 164,
.height = 46,
.priority = WINDOW_PRIORITY_64,
.tab = NULL,
.parentID = WIN_FILES_MAIN,
.fpUpdate = { WINDOW_UPDATE_HIDE },
.extraFlags = 0,
.style = { .customStyle = &filemenu_windowStyles[21] }
},
{
.unk_01 = 0,
.pos = { .x = 12, .y = (67) },
.width = 262,
.height = (113) ,
.priority = WINDOW_PRIORITY_64,
.tab = NULL,
.parentID = WIN_FILES_MAIN,
.fpUpdate = { WINDOW_UPDATE_HIDE },
.extraFlags = 0,
.style = { .customStyle = &filemenu_windowStyles[22] }
},
}
@ WINDOW_PRIORITY_64
Definition enums.h:3188
@ WINDOW_UPDATE_HIDE
Definition enums.h:5312
@ WIN_FILES_MAIN
Definition enums.h:5288
WindowStyleCustom filemenu_windowStyles[]
void filemenu_draw_contents_file_create_header(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)
void filemenu_draw_contents_choose_name(MenuPanel *menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening)

Definition at line 29 of file filemenu_createfile.c.

29 {
30 {
31 .windowID = WIN_FILES_INPUT_FIELD,
32 .unk_01 = 0,
33 .pos = { .x = 68, .y = WINDOW_1_Y },
34 .width = 164,
35 .height = 46,
36 .priority = WINDOW_PRIORITY_64,
38 .tab = NULL,
39 .parentID = WIN_FILES_MAIN,
40 .fpUpdate = { WINDOW_UPDATE_HIDE },
41 .extraFlags = 0,
42 .style = { .customStyle = &filemenu_windowStyles[21] }
43 },
44 {
45 .windowID = WIN_FILES_INPUT_KEYBOARD,
46 .unk_01 = 0,
47 .pos = { .x = 12, .y = WINDOW_2_Y },
48 .width = 262,
49 .height = WINDOW_2_HEIGHT,
50 .priority = WINDOW_PRIORITY_64,
51 .fpDrawContents = &filemenu_draw_contents_choose_name,
52 .tab = NULL,
53 .parentID = WIN_FILES_MAIN,
54 .fpUpdate = { WINDOW_UPDATE_HIDE },
55 .extraFlags = 0,
56 .style = { .customStyle = &filemenu_windowStyles[22] }
57 },
58};
#define WINDOW_2_HEIGHT
#define WINDOW_2_Y
#define WINDOW_1_Y

Referenced by filemenu_choose_name_init().

◆ filemenu_createfile_menuBP

MenuPanel filemenu_createfile_menuBP
Initial value:
= {
.initialized = FALSE,
.col = 0,
.row = 0,
.selected = 0,
.state = 0,
.numCols = 13,
.numRows = (6) ,
.numPages = 0,
}
u8 filemenu_createfile_gridData[]
void filemenu_choose_name_update(MenuPanel *menu)
void filemenu_choose_name_cleanup(MenuPanel *menu)
void filemenu_choose_name_init(MenuPanel *menu)
void filemenu_choose_name_handle_input(MenuPanel *menu)

Definition at line 60 of file filemenu_createfile.c.

60 {
61 .initialized = FALSE,
62 .col = 0,
63 .row = 0,
64 .selected = 0,
65 .state = 0,
66 .numCols = 13,
67 .numRows = ROWS,
68 .numPages = 0,
71 .fpHandleInput = &filemenu_choose_name_handle_input,
72 .fpUpdate = &filemenu_choose_name_update,
74};
#define ROWS