quakeforge/ruamoko/cl_menu/MenuGroup.h
Bill Currie dd183d3ba6 [qfcc] Handle signed-unsigned int comparison better
This fixes the upostop-- test by auto-casting implicit constants to
unsigned (and it gives a warning for signed-unsigned comparisons
otherwise). The generated code isn't quite the best, but the fix for
that is next.

Also clean up the resulting mess, though not properly. There are a few
bogus warnings, and the legit ones could do with a review.
2023-12-20 23:09:06 +09:00

36 lines
805 B
Objective-C

#ifndef __MenuGroup_h
#define __MenuGroup_h
#include "gui/Group.h"
/** A group of views for use as a menu.
A menu may consist of decorations and actual menu items. For correct
results, the decoration views must be added before the menu item views.
*/
@interface MenuGroup : Group
{
unsigned base; ///< The index of the first menu item.
unsigned current; ///< The currently selected menu item.
}
/** Set the index of the first menu item.
\param b The index of the first menu item.
*/
-(void) setBase: (unsigned) b;
/** Select the next menu item.
Wraps back to the base menu item if the current menu item is the last.
*/
-(void) next;
/** Select the previous menu item.
Wraps to the last menu item if the current menu item is the base item.
*/
-(void) prev;
@end
#endif//__MenuGroup_h