本文整理汇总了C++中show_mouse函数的典型用法代码示例。如果您正苦于以下问题:C++ show_mouse函数的具体用法?C++ show_mouse怎么用?C++ show_mouse使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了show_mouse函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
}
示例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();
}
示例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();
}
示例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;
}
示例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);
}
}
}
示例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);
}
示例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;
}
示例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();
}
示例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);
}
示例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);
}
示例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;
}
示例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'));
}
}
}
示例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();
}
示例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();
}
示例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));
}