v1.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
Sifteo::GameMenuEventVector Struct Reference

Implementation for the gameMenu event vector. More...

#include <sifteo/event.h>

Public Member Functions

void * context () const
 Return the currently set context object, as a void pointer.
 
void * handler () const
 Return the currently set handler function, as a void pointer.
 
template<typename tContext >
void set (void(*handler)(tContext), tContext context, const char *label=0) const
 Set this Vector to a function with context pointer. More...
 
void set (void(*handler)(void *), const char *label=0) const
 Set this Vector to a bare function. More...
 
template<typename tClass >
void set (void(tClass::*handler)(), tClass *cls, const char *label=0) const
 Set this event vector to an instance method, given a class method pointer and an instance of that class. More...
 
void setLabel (const char *label) const
 Set the label text used for the Game Menu item. More...
 
void setResumeEnabled (bool enabled) const
 Specify whether the 'Resume' option should be included in the menu. More...
 
void unset () const
 Disable this event vector, and disable the game menu. More...
 

Detailed Description

Implementation for the gameMenu event vector.

An instance of this class is found in the Events namespace. Typically you should not create instances of this object elsewhere.

Member Function Documentation

template<typename tContext >
void Sifteo::GameMenuEventVector::set ( void(*)(tContext)  handler,
tContext  context,
const char *  label = 0 
) const
inline

Set this Vector to a function with context pointer.

Requires a closure consisting of an arbitrary pointer-sized context value, and a function pointer of the form:

void handler(ContextType c);

This can set the item's label at the same time. See setLabel() for details about the suggested label format.

void Sifteo::GameMenuEventVector::set ( void(*)(void *)  handler,
const char *  label = 0 
) const
inline

Set this Vector to a bare function.

Set this event vector to a bare function which requires no context. It must still take a dummy void* placeholder argument:

void handler(void*);

This can set the item's label at the same time. See setLabel() for details about the suggested label format.

template<typename tClass >
void Sifteo::GameMenuEventVector::set ( void(tClass::*)()  handler,
tClass *  cls,
const char *  label = 0 
) const
inline

Set this event vector to an instance method, given a class method pointer and an instance of that class.

This can set the item's label at the same time. See setLabel() for details about the suggested label format.

void Sifteo::GameMenuEventVector::setLabel ( const char *  label) const
inline

Set the label text used for the Game Menu item.

This sets the text which is displayed under the Game Menu icon on the standard Pause menu. It must be between 1 and 15 characters long, and we strongly recommend that it is an even number of characters, so that it can be centered perfectly.

The character set is that of the font in BG0_ROM. It is a superset of ASCII, with nearly all ISO Latin-1 characters.

void Sifteo::GameMenuEventVector::setResumeEnabled ( bool  enabled) const
inline

Specify whether the 'Resume' option should be included in the menu.

Warning
Currently, if you have set a game label, this will have no effect.
void Sifteo::GameMenuEventVector::unset ( ) const
inline

Disable this event vector, and disable the game menu.

The custom menu item will no longer appear on the Pause menu.


The documentation for this struct was generated from the following file: