00001 #include "../borqueror.h"
00002
00003 GameItfc::GameItfc( void )
00004 : ssObject( 0 )
00005 {
00006 }
00007
00008 GameItfc::~GameItfc( void )
00009 {
00010 }
00011
00012 const bool GameItfc::SetupWindow( const Message &msg )
00013 {
00014 XBox::SetupWindow( msg );
00015
00016 MessageServer::Instance().RegisterMessageClient( this , Message::CTRL_LCLICK );
00017 MessageServer::Instance().RegisterMessageClient( this , Message::CTRL_VALUECHANGE );
00018 MessageServer::Instance().RegisterMessageClient( this , Message::CTRL_VALUECHANGING );
00019
00020 Form *f = Rsrc::GetAddr( ePlayGame );
00021 ssObject = f->GetArsObject( 21 );
00022
00023 return true;
00024 }
00025
00026 const bool GameItfc::evValueChange( const CtrlMessage &msg )
00027 {
00028 bool ans = XBox::evValueChange( msg );
00029
00030 if( ((Window *)msg.source)->GetId() == 20 )
00031 ArsPostMessage( CtrlMessage( Message::CTRL_VALUECHANGE , ssObject , msg.source , msg.value ) );
00032 else if( ((Window *)msg.source)->GetId() == 42 || ((Window *)msg.source)->GetId() == 43 )
00033 Rsrc::GetAddr( ePlayGame )->GetArsObject( 20 )->UpdateWindow();
00034
00035 return true;
00036 }
00037
00038 const bool GameItfc::evValueChanging( const CtrlMessage &msg )
00039 {
00040 bool ans = XBox::evValueChanging( msg );
00041
00042 if( ((Window *)msg.source)->GetId() == 42 || ((Window *)msg.source)->GetId() == 43 )
00043 Rsrc::GetAddr( ePlayGame )->GetArsObject( 20 )->UpdateWindow();
00044
00045 return true;
00046 }
00047
00048 const bool GameItfc::evMouseLClick( const CtrlMessage &msg )
00049 {
00050 bool ans = XBox::evMouseLClick( msg );
00051
00052 return ans;
00053 }
00054