Changes

Jump to navigation Jump to search
797 bytes added ,  05:24, 23 July 2008
no edit summary
Line 17: Line 17:  
*Main object that takes a one or two dimensional array of function pointers and builds workable menus out of them. Will also need a corresponding array of text or images for each button, button backgrounds, menu background.
 
*Main object that takes a one or two dimensional array of function pointers and builds workable menus out of them. Will also need a corresponding array of text or images for each button, button backgrounds, menu background.
 
*Allow copying a menu object, so that one main menu can be created with other sub menus copied therefrom and modified.
 
*Allow copying a menu object, so that one main menu can be created with other sub menus copied therefrom and modified.
*Use wiimote IR input with a default cursor
+
*<del>Use wiimote IR input with a default cursor</del> Will just need to use functions that check against info obtained from IR.
 
===Possible issues===
 
===Possible issues===
 
*I can't think of an easy way to allow a mix of text AND images over buttons on the menu. Unless maybe an "icon" class with an overloaded constructor?
 
*I can't think of an easy way to allow a mix of text AND images over buttons on the menu. Unless maybe an "icon" class with an overloaded constructor?
*The menu, buttons and all will have to sit in a LayerManager, but LayerManager has no visible option, so where do we put the Menu when not in use? Or is it better to discard the menu from memory and rebuild later? Will look into how this is done on other software.
+
*The menu, buttons and all will have to sit in a LayerManager, but LayerManager has no visible option, so where do we put the Menu when not in use? Or is it better to discard the menu from memory and rebuild later? Will look into how this is done on other software. Each menu/function can sit in its own LayerManager and be shoved offscreen when needed.
 +
*When allowing some other function to access video that does not use libwiisprite (say an emulator) then how do we make sure the path is clear, so to speak?
 
*The classes can't be checking the wiimote all willy nilly, so user will have to init wpad and make a call to check called states and all that
 
*The classes can't be checking the wiimote all willy nilly, so user will have to init wpad and make a call to check called states and all that
*I've forgotten how to deal with passing arrays and dealing with their sizes. That's why I have references though.
+
*I've forgotten how to deal with passing arrays and dealing with their sizes. That's why I have reference books though.
 
*I'm starting to think I might want to use vectors or another data structure if it's going to allow adding and removing buttons.
 
*I'm starting to think I might want to use vectors or another data structure if it's going to allow adding and removing buttons.
 
==Class Member Function Outline==
 
==Class Member Function Outline==
 
===Menu===
 
===Menu===
*Menu(void (*functionpointer)(void),Icon* icons, Image button_back, f32 xpos, f32 ypos, GxColor bgcolor, Image bgimage)
+
*Menu(void (*functionpointer)(void),Button* buttons, f32 xo, f32 yo, GxColor bgcolor, Image bgimage)
 
*void AddButton(Icon newbutton, u32 index)
 
*void AddButton(Icon newbutton, u32 index)
 
*void RemoveButton(u32 index)
 
*void RemoveButton(u32 index)
 
*bool AnySelected(u32 pressed, u32 irx, u32 iry)
 
*bool AnySelected(u32 pressed, u32 irx, u32 iry)
 
*void RunSelected()
 
*void RunSelected()
===Icon===
  −
*Icon(char* str)
  −
*Icon(Image img)
   
===Button===
 
===Button===
*Button(Icon icn, Image button)
+
Have this be derived from the wsp::Layer class to hold the background button image, hover button image, foreground button image and/or text? Deriving from wsp::Layer allows it to be controlled as a group in a wsp::LayerManager. Might want to talk to the libwiisprite guys about looking at their source as well.
 +
Images here could be sprites instead?
 +
Maybe roll the function pointer into the button?
 +
*Button(Image background, Image hover, Image pressed, Image icon, *char str)
 +
*bool IsPointerOver(u32 x, u32 y);
 +
*bool Select(u32 x, u32 y);
 +
*void Deselect();
 +
 
    
==Development information==
 
==Development information==
49

edits

Navigation menu