実装に左右されますが、大体以下のような感じではないでしょうか。
マウスの左クリックをすると左右を判定し、右クリックでリセットします。
//- 以下、テストコード -//
#include "DxLib.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
{
ChangeWindowMode( TRUE );
if ( DxLib_Init( ) == -1 ) return -1;
SetMouseDispFlag( TRUE );
SetDrawScreen( DX_SCREEN_BACK );
int StrColor = GetColor( 255, 255, 255 );
int state = 0, x, y;
while ( ProcessMessage( ) == 0 && CheckHitKey( KEY_INPUT_ESCAPE ) == 0 ) {
if ( GetMouseInput( ) & MOUSE_INPUT_LEFT ) {
GetMousePoint( &x, &y );
if ( x < 640 / 2 )
state = 1;
else
state = 2;
}
if ( GetMouseInput( ) & MOUSE_INPUT_RIGHT ) {
state = 0;
}
ClearDrawScreen( );
DrawFormatString( 0, 0, StrColor, "TEST" );
if ( state == 1 )
DrawString( 312, 240, "左", StrColor );
else if ( state == 2 )
DrawString( 312, 240, "右", StrColor );
else
DrawString( 312, 240, "待", StrColor );
ScreenFlip( );
}
DxLib_End( );
return 0;
}