Began creating the listbox widget. It's still just a structure.
[xuni.git] / TODO
bloba9d04ca0a9c46f121240052ec746e55b6453c98d
1 ---- Current todo list ----
2 [done] Handle SDL_VIDEOEXPOSE instead of repainting the whole menu every screen. This could involve passing paint_menu() et al information about which part of the screen to repaint.
4 Create a settings file which saves the screen mode etc. strtol() is a good idea.
6 [done] theme_t::boxw and theme_t::boxh are currently just shortcuts for box[0].corners.image->[wh]. Should the corners of buttons all be the same size? If not, should there be get_button_corner_size() functions, complicated inline code, or separate images like box[x].upperleftcorner?
8 Currently, the entire screen is repainted when fullscreen is toggled, whether or not it succeeded in any way. Perhaps the screen does not need to be repainted if SDL_WM_ToggleFullScreen() succeeds?
10 The warning messages are vague at best. Perhaps a varargs print_warning() etc is in order?
12 Currently, load_icon() frees the SDL_Surface it passes to SDL_WM_SetIcon(). This is good for this system, because Valgrind shows a memory leak otherwise. But is this standard?
14 [done -- see ~/perl/func_need_be_unstatic.pl] Determine which functions ought to be static and make them so.
16 Split graphics.c up into several files -- it's too long and complicated.
18 [done] De-obfuscate paint_button().
20 [done] Allow paint_button() to be passed the width (and height?) of the button.
22 [done] Should the frame rate change according to the mode? Since the menu does not paint all of the time, it could be running at twice the FPS. The menu could even use SDL_WaitEvent() and not be frame-limited at all . . .
24 [done] Check to make sure that the return value of set_graphics_mode() is always used, as toggle_fullscreen() does.
26 Pass specific information to SDL_UpdateRect to repaint only a widget if that is all that has changed.
28 [changed] The screen doesn't need repainting upon an SDL_MOUSEBUTTONUP event inside a checkbox widget.
30 [done] Handle SDL_ActiveEvent in the game loop, and pause if neccessary.
32 Should keys repeat? It makes using SDL_KEYDOWN (which is more natural as opposed to SDL_KEYUP) tough to use to detect menu keys etc. Maybe its setting could change between screens?
34 Add support for using the keyboard to navigate menus.
36 [done] Use a pointer to a widget when the mouse is held down as well as when a widget is selected (like a textbox). This will require changing struct smode_t.
38 Move screen into struct smode_t? Or use SDL_GetVideoSurface() all of the time? (Otherwise normal functions can't toggle fullscreen etc.)
40 Get rid of all of those unused parameters. Either that or use some function pointers.
42 Fix the app-focus bugs for all platforms.
44 Add an option to init_checkbox() to make the checkbox just the right width.
46 ---- External bugs discovered ----
47 The only member of the structure located in file:///usr/share/doc/libsdl1.2-dev/docs/html/sdlexposeevent.html is missing a semicolon.
49 ---- Screen plans ----
51 Options:
53        Gameplay
54        Graphics: Screen mode, Theme, Detail
55     Return to menu
57 Graphics:
59     Screen mode:    BPP:
60       320x200         0
61       320x240...      8...
62      XXX x XXX    X Fullscreen
63     
64     Theme:          Fonts:
65       default         Normal:  gui/FreeSans.ttf
66       alienglow       Special: gui/FreeMono.ttf
67     
68     Main menu background:
69       None
70       Static
71       Scrolling
72       Parallax