• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ show_mouse函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中show_mouse函数的典型用法代码示例。如果您正苦于以下问题:C++ show_mouse函数的具体用法?C++ show_mouse怎么用?C++ show_mouse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了show_mouse函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: restore_menu

restore_menu()
{
Pull *opull;
Flicmenu *omenu;

opull = cur_pull;
omenu = cur_menu;
cur_pull = NULL;
cur_menu = NULL;
set_top_lines();
cur_pull = opull;
cur_menu = omenu;
hide_mouse();
if (zoom_flag)
	{
	zscale_cursor = 1;
	draw_on_buffer();
	show_mouse();
	zbuf_to_screen();
	}
else
	{
	copy_screen(bscreen, pscreen);
	show_mouse();
	}
}
开发者ID:daemqn,项目名称:Atari_ST_Sources,代码行数:26,代码来源:SEEMENU.C


示例2: gui_enter

void gui_enter()
{
        int x = 1;
        DIALOG_PLAYER *dp;       
        
        while (keypressed()) readkey();
        while (key[KEY_F11]) rest(100);

        gui_update();

        if (curtube != 3 && !mouse_amx) install_mouse();
        
        set_color_depth(dcol);
        show_mouse(screen);
        bemgui[0].x  = (windx / 2) - 36;
        bemgui[0].y  = windy - 8;
        bemgui[0].fg = makecol(255,255,255);
        dp=init_dialog(bemgui, 0);
        while (x && !key[KEY_F11] && !key[KEY_ESC])
        {
                x = update_dialog(dp);
        }
        shutdown_dialog(dp);
        show_mouse(NULL);
        set_color_depth(8);

        if (curtube != 3 && !mouse_amx) remove_mouse();
        
        while (key[KEY_F11]) rest(100);

        video_clearscreen();
}
开发者ID:SteveFosdick,项目名称:b-em,代码行数:32,代码来源:linux-gui.c


示例3: input_nodes

/* let the user input a list of path nodes */
void input_nodes(void)
{
   clear_to_color(screen, makecol(255, 255, 255));

   textout_centre_ex(screen, font, "Click the left mouse button to add path "
		     "nodes", SCREEN_W/2, 8, palette_color[255],
		     palette_color[0]);
   textout_centre_ex(screen, font, "Right mouse button or any key to finish",
		     SCREEN_W/2, 24, palette_color[255], palette_color[0]);

   node_count = 1;

   show_mouse(screen);

   do {
      poll_mouse();
   } while (mouse_b);

   clear_keybuf();

   for (;;) {
      poll_mouse();

      if (mouse_b & 1) {
	 if (node_count < MAX_NODES-1) {
	    nodes[node_count].x = mouse_x;
	    nodes[node_count].y = mouse_y;

	    show_mouse(NULL);
	    draw_node(node_count);
	    show_mouse(screen);

	    node_count++;
	 }

	 do {
	    poll_mouse();
	 } while (mouse_b & 1);
      }

      if ((mouse_b & 2) || (keypressed())) {
	 if (node_count < 3)
	    alert("You must enter at least two nodes",
		  NULL, NULL, "OK", NULL, 13, 0);
	 else
	    break;
      }
   }

   show_mouse(NULL);

   do {
      poll_mouse();
   } while (mouse_b);

   clear_keybuf();
}
开发者ID:AntonLanghoff,项目名称:whitecatlib,代码行数:58,代码来源:exspline.c


示例4: view_fli

/* handles double-clicking on a FLIC object in the grabber */
static int view_fli(DATAFILE *dat)
{
   show_mouse(NULL);
   clear_to_color(screen, gui_mg_color);
   play_memory_fli(dat->dat, screen, TRUE, fli_stopper);
   do {
   } while (mouse_b);
   clear_keybuf();
   set_pallete(datedit_current_palette);
   show_mouse(screen);
   return D_REDRAW;
}
开发者ID:ifilex,项目名称:SRC,代码行数:13,代码来源:datfli.c


示例5: disable_hardware_cursor

/* disable_hardware_cursor:
 *  disables the hardware cursor on platforms where this interferes with 
 *  mickeys and disables system cursors.
 */
void disable_hardware_cursor(void)
{
   if ((mouse_driver) && (mouse_driver->enable_hardware_cursor)) {
      mouse_driver->enable_hardware_cursor(FALSE);
      allow_system_cursor = FALSE;
      if (is_same_bitmap(_mouse_screen, screen)) {
         BITMAP *bmp = _mouse_screen;
         show_mouse(NULL);
         show_mouse(bmp);
      }
   }
}
开发者ID:AntonLanghoff,项目名称:whitecatlib,代码行数:16,代码来源:mouse.c


示例6: set_mouse_sprite

/* set_mouse_sprite:
 *  Sets the sprite to be used for the mouse pointer. If the sprite is
 *  NULL, restores the default arrow.
 */
void set_mouse_sprite(struct BITMAP *sprite)
{
   BITMAP *old_mouse_screen = _mouse_screen;
   int am_using_sys_cursor = use_system_cursor;

   if (!mouse_driver)
      return;

   if (_mouse_screen && !am_using_sys_cursor)
      show_mouse(NULL);

   if (sprite)
      mouse_sprite = sprite;
   else {
      if (_mouse_pointer)
	 destroy_bitmap(_mouse_pointer);
      _mouse_pointer = create_mouse_pointer(mouse_arrow_data);
      mouse_sprite = _mouse_pointer;
   }

   cursors[MOUSE_CURSOR_ALLEGRO] = mouse_sprite;
   
   lock_bitmap((struct BITMAP*)mouse_sprite);

   /* make sure the ms bitmap is big enough */
   if ((!ms) || (ms->w < mouse_sprite->w) || (ms->h < mouse_sprite->h) ||
       (bitmap_color_depth(mouse_sprite) != bitmap_color_depth(ms))) {
      if (ms) {
	 destroy_bitmap(ms);
	 destroy_bitmap(mtemp);
      }

      ms = create_bitmap(mouse_sprite->w, mouse_sprite->h);
      lock_bitmap(ms);

      mtemp = create_bitmap(mouse_sprite->w*2, mouse_sprite->h*2);
      lock_bitmap(mtemp);
   }

   mouse_x_focus = 1;
   mouse_y_focus = 1;

   if (!am_using_sys_cursor)
      hw_cursor_dirty = TRUE;

   if (old_mouse_screen && !am_using_sys_cursor)
      show_mouse(old_mouse_screen);
}
开发者ID:AntonLanghoff,项目名称:whitecatlib,代码行数:52,代码来源:mouse.c


示例7: init

/* init: init's the element lists and allegro, returns 0 upon success
 * and non-zero otherwise */
int init(void)
{
    /* init allegro */
    if (allegro_init() != 0) {
        printf("failed to initialize...");
        return 1;
    }

    set_color_depth(GFX_DEPTH);
    if (set_gfx_mode(GFX_AUTODETECT_WINDOWED,
                     EDITOR_WIN_W, EDITOR_WIN_H, 0, 0) != 0) {
        set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
        allegro_message("Failed to init a gfxmode.");
        return 1;
    }
    set_window_title("GUNPOWDER MapEditor");

    install_keyboard();
    install_mouse();
    show_mouse(screen);

    vscreen = create_bitmap(EDITOR_WIN_W, EDITOR_WIN_H);
    if (!vscreen) {
        close_program = 1;
    }

    /* init our lists */
    load_tiles();
    load_sprites();

    return 0;
}
开发者ID:andreasg,项目名称:gunsmoke,代码行数:34,代码来源:mapeditor.c


示例8: preview_slide

static void preview_slide()
/*****************************************************************************
 * Display the cel moving across the screen with current slide settings
 * until right click or key is hit.
 ****************************************************************************/
{
int i;
Rcel *cel = cs.ifi.cel;
Boolean abortable = FALSE;

hide_mouse();
sl_ox = cel->x;
sl_oy = cel->y;
for (;;)
	{
	for (i=0; i<cs.slide_frames; i++)
		{
		slide_seek(i,&abortable);
		check_input(ANY_INPUT);
		if(JSTHIT(KEYHIT|MBRIGHT))
			goto OUT;
		wait_a_jiffy(1);
		}
	}
OUT:
cel->x = sl_ox;
cel->y = sl_oy;
conv_see_cel(cel);
show_mouse();
}
开发者ID:AnimatorPro,项目名称:Animator-Pro,代码行数:30,代码来源:CONVMOVE.C


示例9: get_cut

static Errcode get_cut(Pixel offc, Pixel onhi, Pixel onlo)

/* returns Err_abort if right click or key hit returns ZOOM_WNDOID if in zoom 
 * window FLI_WNDOID if in fli window leaves values in icb as of last click 
 * and iostate set to window click was in */
{
Wiostate ios;
Cutdata cd;
int ret;

	if(NULL == (cd.hline = pj_malloc(vb.pencel->width + vb.pencel->height)))
		return(Err_no_memory);

	save_wiostate(&ios);
	cd.vline = cd.hline + vb.pencel->width;
	cd.wndoid = -1;
	cd.doneonce = 0;
	cd.oncol = onhi;
	cd.offcol = offc;
	vinit_marqihdr(&cd.mh,1,1);

	ret = anim_wait_input(KEYHIT|MBRIGHT|MBPEN,KEYHIT|MBRIGHT|MBPEN|MMOVE,
						  cd.mh.waitcount,anim_cut,&cd);

	cleanup_toptext();
	restore_cut(&cd);
	pj_free(cd.hline);
	if(ret < 0)
		rest_wiostate(&ios);
	else 
		show_mouse();
	return(ret);
}
开发者ID:AnimatorPro,项目名称:Animator-Pro,代码行数:33,代码来源:CUTCURS.C


示例10: update

void update()
{
  int x, y, z;

  current_view = (current_view == left_view) ? right_view : left_view;

  // draw complete background
  rectfill(current_view, 0, 0, 639, 479, BACKGROUND_COLOR);

  draw_sprite(current_view, new_game, NEW_GAME_BUTTON_X1, BUTTON_YOFF);
  draw_sprite(current_view,	undo,	  UNDO_BUTTON_X1, BUTTON_YOFF);
  draw_sprite(current_view,	help,	  HELP_BUTTON_X1, BUTTON_YOFF);
  draw_sprite(current_view,	quit,	  QUIT_BUTTON_X1, BUTTON_YOFF);

  if(editing)
  {
    textprintf(current_view, font, 200,  2, SELECTED,
	       "Editing: '%s' (%s)", layout_title, get_filename(editing));
    textprintf(current_view, font, 200, 12, SELECTED,
	       "%3i pieces left", n_pieces_left);
  }

  for(z = 0; z <  3; z++)
  for(y = 0; y <  9; y++)
  for(x = 0; x < 16; x++)
    if(board[x][y][z].value < EMPTY || editing)
      drawPiece(current_view, &board[x][y][z]);

  scroll_screen((current_view == left_view) ? 0 : SCREEN_WIDTH, 0);
  show_mouse(current_view);
}
开发者ID:emulvaney,项目名称:mahjong,代码行数:31,代码来源:mahjong.c


示例11: main

int main()
{
allegro_init();
install_mouse();
install_keyboard();
set_color_depth(16);
set_gfx_mode( GFX_AUTODETECT, 640, 480, 0, 0);
buffer = create_bitmap( 640, 480);
show_mouse(buffer);
	while(!key[KEY_ESC])
		{	
		shape_menu();
		get_mouse_info();
		circle_fill();
		
			if(cursor_x<=110&&cursor_y<=40)
			{
			circle_empty();
			}
			else if(cursor_x<=110&&cursor_y>=60||cursor_y<=120)
			{
			circle_fill();
			}
		}

return 0;   
}
开发者ID:abhaysood,项目名称:Projects,代码行数:27,代码来源:paint.c


示例12: check_time

void check_time(struct pathtype *path)
{
	  timecount++;
	  if (timecount<50) return;
	  timecount=0;
	  oldtime=newtime;
	  if ((newtime=time(NULL)-starttime)>oldtime)
	  {
		  if (mainmover=='b') blacks+=(newtime-oldtime); else whites+=(newtime-oldtime);
		  if (options.analysis)
		  {
				if (mousex>175 && mousey>120) hide_mouse();
				if (mainmover=='b')
				{
					 shownumber(game.blacks[game.movenum]+blacks, 260, 184);
				} else
				{
					 shownumber(game.whites[game.movenum]+whites, 188, 184);
				}
				if (mousex>175 && mousey>120) show_mouse();
				showpath(195,path);
		  }
		  oldtime=newtime;
		  if (options.playstyle==CHAMPIONSHIP || options.playstyle==FIXEDTIME)
		  {
				nomore=(newtime>maxtime);
				if (options.analysis) show_time_bar((int)newtime, (int)maxtime, (mainmover=='b'));
		  }
	  }
}
开发者ID:chris-moreton,项目名称:rival-chess-dos,代码行数:30,代码来源:RIVAL.CPP


示例13: save_video

void yes_no_box::show(char a[])
{
	save_video(x1,y1,x2,y2);
	setfillstyle(SOLID_FILL,LIGHTGRAY);
	hide_mouse();
	bar(x1,y1,x2,y2);
	setfillstyle(SOLID_FILL,BLUE);
	bar(x1,y1,x2,y1+25);
	setcolor(BLACK);
	rectangle(x1,y1,x2,y2);
	line(x1,y1+25,x2,y1+25);
	setcolor(WHITE);
	outtextxy(x1+5,y1+10,a);
	int x=(x1+x2)/2;
	int y=(y1+y2)/2+50;
	setcolor(WHITE);
	line(x-100,y-10,x-60,y-10);
	line(x-100,y-10,x-100,y+10);
	setcolor(BLACK);
	line(x-100,y+10,x-60,y+10);
	line(x-60,y-10,x-60,y+10);
	outtextxy(x-90,y,"Yes");
	setcolor(WHITE);
	line(x+60,y-10,x+100,y-10);
	line(x+60,y-10,x+60,y+10);
	setcolor(BLACK);
	line(x+60,y+10,x+100,y+10);
	line(x+100,y-10,x+100,y+10);
	outtextxy(x+70,y,"No");
	show_mouse();
}
开发者ID:acvivek,项目名称:EZGP,代码行数:31,代码来源:DIALOG.CPP


示例14: pur

void pur()
{
 char ch;
  clrscr();
  design();
  show_mouse();
  gotoxy(20,23);
  printf("Press Enter to go to MAIN MENU ...........");
  textcolor(GREEN);
  gotoxy(25,4);
  cprintf("\xDB\xDB\xDB\xDB\xDB\xB2 VIEW OF PURCHASES  \xB2\xDB\xDB\xDB\xDB\xDB");
  textcolor(RED);
  gotoxy(4,7);
  cprintf("PRODUCT ID.    NAME.     UNIT PRICE.     QUANTITY.       TOTAL  COST");
  gotoxy(4,9);
  printf("========================================================================");

  ptr=fopen("shop.dat","rb");
  while((fread(&temp,sizeof(temp),1,ptr))==1)
     {
      printf("\n \xBA %s\t\t",temp.id);
      printf(" %s",temp.desc);

      printf("\t\t$%.2f",temp.unit);
      printf("\t\t%d",temp.quantity);
      printf("\t\t $%.2f",temp.cost);
       }
getche();
}
开发者ID:13436120,项目名称:Cgames,代码行数:29,代码来源:220.C


示例15: fopen

CAllegroDisplay::CAllegroDisplay(int width,int height,int color_depth,char *error_file)
{
  /*
    Init the error log handler
  */
  error_log = fopen(error_file,"at");
  if (error_file == NULL) 
  {
    error_log = stdout;
    PrintError("Error opening error_log file!!!\n");
  }
  
  /*
    Init allegro graphic library
  */
  allegro_init();
  install_timer();
  install_keyboard();
  install_mouse();
  alfont_init();
  
  show_mouse(NULL);
  /*
    Try to init display resolution
  */
  set_color_depth(color_depth);
  if (set_gfx_mode(GFX_AUTODETECT_FULLSCREEN,width,height,0,0)) fatalError(allegro_error);
  set_display_switch_mode(SWITCH_PAUSE);
  srandom(time(0));
}
开发者ID:Serebriakov,项目名称:breakin,代码行数:30,代码来源:CAllegroDisplay.cpp


示例16: run_game

void run_game(){
/* THE GAME RUNS WITHIN THIS TRUE WHILE LOOP */
	while (!0)
    {
    while(speed_limit > 0)
    {
         speed_limit --;
    /*============================================*/
        draw_court();               // GAME STEP 1
        show_mouse(court);
        set_mouse_range(0,0,court->w,court->h);
       	check_keyboard_entry();     // GAME STEP 2
    	control_bats();             // GAME STEP 3
        check_collision();          // GAME STEP 4
        update_cock_position();     // GAME STEP 5
		
        draw_bats_and_cock();       // GAME STEP 6
        draw_speed_meter();         // GAME STEP 7
        display_game_status();      // GAME STEP 8
        draw_buffer();              // GAME STEP 9
    /*============================================*/
    }
    // Speed limiting loop ends
    }
    deinitialize_game();
}
开发者ID:njsubedi,项目名称:Allegro-Badminton-Game,代码行数:26,代码来源:main.c


示例17: set_color_depth

BOOL display::SetDisplayMode(WORD _mode, WORD _width, WORD _height, BYTE _bpp)
{
    int error = 0;

    set_color_depth(_bpp);
    if((error = set_gfx_mode(_mode, _width, _height, 0, 0)) != 0)
    {
        LogError("Error setting graphics resolution.");
        LogError("Allegro returned this error message: %s", allegro_error);
        return false;
    }

    this->back = Surface(new surface(_width, _height, _bpp));
    this->_screen = Surface(new surface(::screen));
    acquire_screen();
    show_mouse(::screen);
    acquire_screen();
    this->mode = _mode;
    this->width = _width;
    this->height = _height;
    this->bpp = _bpp;
    LogMessage("Screen resolution succesfully changed.");

    return true;
}
开发者ID:halberd-project,项目名称:Poleaxe,代码行数:25,代码来源:display.cpp


示例18: m_surface

Alleg4Display::Alleg4Display(int width, int height, int scale)
  : m_surface(NULL)
  , m_scale(0)
  , m_nativeCursor(kNoCursor)
  , m_restoredWidth(0)
  , m_restoredHeight(0)
{
  unique_display = this;

  if (install_mouse() < 0) throw DisplayCreationException(allegro_error);
  if (install_keyboard() < 0) throw DisplayCreationException(allegro_error);

#ifdef FULLSCREEN_PLATFORM
  set_color_depth(16);        // TODO Try all color depths for fullscreen platforms
#else
  set_color_depth(desktop_color_depth());
#endif

  if (set_gfx_mode(
#ifdef FULLSCREEN_PLATFORM
        GFX_AUTODETECT_FULLSCREEN,
#else
        GFX_AUTODETECT_WINDOWED,
#endif
        width, height, 0, 0) < 0)
    throw DisplayCreationException(allegro_error);

  show_mouse(NULL);
  setScale(scale);

#if _WIN32
  subclass_hwnd((HWND)nativeHandle());
#endif
}
开发者ID:riggtravis,项目名称:aseprite,代码行数:34,代码来源:alleg_display.cpp


示例19: while

void Game::Update()
{  
  int m_frame = 0;
  while(!m_done)
  {
    while(g_ticks == 0)
    {
      rest(1);
    }

    while(g_ticks > 0)
    {
      m_oldticks = g_ticks;
      //Updates section
      m_frame++;
      if(key[KEY_ESC])
      {
        m_done = true;
      }
      m_player->HandleCursorLocation();
      //End of Updates
      clear_to_color(m_buffer, makecol(50,50,50));
      g_ticks--;
      if(m_oldticks <= g_ticks) {break;}
    }
    //Render Section
    textprintf_ex(m_buffer, font, 10, 10, makecol(255, 255, 255), -1, "Current Frame: %i", m_frame);
    m_enemy->Render(m_buffer);
    //End of Rendering
    show_mouse(screen);
    blit(m_buffer, screen, 0, 0, 0, 0, m_screenX, m_screenY);
  }
}
开发者ID:ItsRobEllis,项目名称:QuompGame,代码行数:33,代码来源:Game.cpp


示例20: main

main()
{
	int probleme;

	DataDecrypt();

	if ( DataCheck() != 0 )
		DataClear();

	linea_init();
	hide_mouse();

	probleme = InitTank();

	if ( !probleme ) {
		InitSys();
		_InitSys();
		InitRand((int)*_Hz200 & 0x7FFF);
		ShowLogo();
		MnRoot();
		_TermSys();
		TermSys();
		}

	TermTank(probleme);

	show_mouse(0);

	return (0);
}
开发者ID:gorhill,项目名称:rayoid,代码行数:30,代码来源:PROJET.C



注:本文中的show_mouse函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ show_msg函数代码示例发布时间:2022-05-30
下一篇:
C++ show_message函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap