Quake3World.com Forums
     Programming Discussion
        New submenu "HELP"...


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: New submenu "HELP"...

Warrior
Warrior

Joined: 16 May 2006
Posts: 90
PostPosted: 05-25-2010 02:26 AM           Profile Send private message  E-mail  Edit post Reply with quote


Hi everyone!

I'm trying to add a submenu "HELP" to my Monkeys of Doom cell phone fps. Think the easiest (non-coder :rolleyes: ) way is to use former "CINEMATICS" for it. Instead of the RoQ-videos short help texts should pop up. So I created a couple of new menu files (ui_help1.c, ui_help2.c ...) and added the following to ui_cinematics:

Code:
#define ID_CIN_HELP1      80
...
#define ID_CIN_HELP8     87


Code:
typedef struct  {
...
menutext_s     cin_help1;
...
menutext_s     cin_help8;
...


Code:
/*
=====================
UI_CinematicsMenu_Event
=====================
*/

void UI_CinematicsMenu_Event (void* ptr, int event) {
      if( event != QM_ACTIVATED )  {
         return;
      }
      switch ( ((menucommon_s*)ptr)->id ) {

      case ID_CIN_HELP1:
      UI_Help1Menu();
      break;
...
      case ID_CIN_HELP8:
      UI_Help8Menu();
      break;
      }
}


Code:
/*
=====================
UI_CinematicsMenu_Init
=====================
*/
...
        cinematicsMenuInfo.cin_help1.generic.type     = MTYPE_PTEXT;
        cinematicsMenuInfo.cin_help1.generic.flags     = QMF_CENTER_JUSTIFY|QMF_PULSEIFINFOCUS;
        cinematicsMenuInfo.cin_help1.generic.x          = 320;
        cinematicsMenuInfo.cin_help1.generic.y          = y;
        cinematicsMenuInfo.cin_help1.generic.id         = ID_CIN_HELP1;
        cinematicsMenuInfo.cin_help1.generic.callback = UI_CinematicsMenuEvent;
        cinematicsMenuInfo.cin_help1.generic.string     = "W-LAN CONNECTION";
        cinematicsMenuInfo.cin_help1.generic.color      = color_white;
        cinematicsMenuInfo.cin_help1.generic.style      = UI_CENTER|UI_DROPSHADOW;
...
        cinematicsMenuInfo.cin_help2.generic.type     = MTYPE_PTEXT;
        cinematicsMenuInfo.cin_help2.generic.flags     = QMF_CENTER_JUSTIFY|QMF_PULSEIFINFOCUS;
        cinematicsMenuInfo.cin_help2.generic.x          = 320;
        cinematicsMenuInfo.cin_help2.generic.y          = y;
        cinematicsMenuInfo.cin_help2.generic.id         = ID_CIN_HELP2;
        cinematicsMenuInfo.cin_help2.generic.callback = UI_CinematicsMenuEvent;
        cinematicsMenuInfo.cin_help2.generic.string     = "CHANGE AVATAR";
        cinematicsMenuInfo.cin_help2.generic.color      = color_white;
        cinematicsMenuInfo.cin_help2.generic.style      = UI_CENTER|UI_DROPSHADOW;
...

        Menu_AddItem( &cinematicsMenuInfo.menu, &cinematicsMenuInfo.cin_help1 );
...
        Menu_AddItem( &cinematicsMenuInfo.menu, &cinematicsMenuInfo.cin_help8 );
...


Next I browsed the code for everything else a submenu might require. Searching the source for "cdkeymenu" (for example) showed hits in
code/q3_ui/ui_atoms.c
Code:
...
/*
===============
UI_Cache
===============
*/
...
UI_CDKeyMenu_Cache();
UI_Help1Menu_Cache();//WW
...


code/q3_ui/ui_cdkey.c
Code:
(not relevant?)


code/q3_ui/ui_local.h
Code:
...
/*
=================
ui_qmenu.c
=================
*/
...
//
//ui_cdkey.c
//
extern void UI_CDKeyMenu( void );
extern void UI_CDKeyMenu_Cache (void );
extern void UI_CDKeyMenu_f( void );

//
//ui_help1.c
//
extern void UI_Help1Menu( void );
extern void UI_Help1Menu_Cache (void );
extern void UI_Help1Menu_f( void );
...

code/q3_ui/ui_setup.c
Code:
(not relevant?)


But something still seems to miss cause the compiler throws out these errors:
Quote:
Error: L6218E: Undefined symbol UI_Help1Menu_f (referred from monkeyui.h).
Error: L6218E: Undefined symbol UI_Help1Menu_Cache (referred from monkeyui.h).
Error: L6218E: Undefined symbol UI_Help1Menu (referred from monkeyui.h).


- Would be great if someone can help me! :)



_________________
Visit MONKEYS of DOOM at http://www.monkeysofdoom.org


Top
                 

Mentor
Mentor

Joined: 12 Mar 2005
Posts: 3957
PostPosted: 05-25-2010 03:29 AM           Profile Send private message  E-mail  Edit post Reply with quote


Did you add the ui_help*.c files to the build path (Makefile)?




Top
                 

Warrior
Warrior

Joined: 16 May 2006
Posts: 90
PostPosted: 05-27-2010 12:25 AM           Profile Send private message  E-mail  Edit post Reply with quote


Um... no... :rolleyes:

Thanks a lot!



_________________
Visit MONKEYS of DOOM at http://www.monkeysofdoom.org


Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group