Skip to content

Commit

Permalink
Game Menu|Refactor: Animate focus effects using the active page's tic…
Browse files Browse the repository at this point in the history
… timer
  • Loading branch information
danij-deng committed Feb 18, 2012
1 parent a795858 commit 4f3d2f1
Show file tree
Hide file tree
Showing 4 changed files with 127 additions and 104 deletions.
7 changes: 7 additions & 0 deletions doomsday/plugins/common/include/hu_lib.h
Expand Up @@ -204,6 +204,8 @@ typedef struct mn_object_s {

/// MenuPage which owns this object (if any).
struct mn_page_s* _page;

int timer;
} mn_object_t;

mn_obtype_e MNObject_Type(const mn_object_t* obj);
Expand Down Expand Up @@ -336,6 +338,8 @@ typedef struct mn_page_s {

/// User data.
void* userData;

int timer;
} mn_page_t;

void MNPage_Initialize(mn_page_t* page);
Expand Down Expand Up @@ -391,6 +395,9 @@ fontid_t MNPage_PredefinedFont(mn_page_t* page, mn_page_fontid_t id);

void MNPage_SetPredefinedFont(mn_page_t* page, mn_page_fontid_t id, fontid_t fontId);

/// @return Current time in tics since page activation.
int MNPage_Timer(mn_page_t* page);

/**
* Rect objects.
*/
Expand Down
4 changes: 2 additions & 2 deletions doomsday/plugins/common/src/g_game.c
Expand Up @@ -3318,7 +3318,7 @@ void G_DoScreenShot(void)
static void openLoadMenu(void)
{
Hu_MenuCommand(MCMD_OPEN);
/// \fixme This should be called automatically when opening the page
/// @fixme This should be called automatically when opening the page
/// thus making this function redundant.
Hu_MenuUpdateGameSaveWidgets();
Hu_MenuSetActivePage(Hu_MenuFindPageByName("LoadGame"));
Expand All @@ -3327,7 +3327,7 @@ static void openLoadMenu(void)
static void openSaveMenu(void)
{
Hu_MenuCommand(MCMD_OPEN);
/// \fixme This should be called automatically when opening the page
/// @fixme This should be called automatically when opening the page
/// thus making this function redundant.
Hu_MenuUpdateGameSaveWidgets();
Hu_MenuSetActivePage(Hu_MenuFindPageByName("SaveGame"));
Expand Down

0 comments on commit 4f3d2f1

Please sign in to comment.