本文整理汇总了C++中UI_SLIDER2::forceDown方法的典型用法代码示例。如果您正苦于以下问题:C++ UI_SLIDER2::forceDown方法的具体用法?C++ UI_SLIDER2::forceDown怎么用?C++ UI_SLIDER2::forceDown使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UI_SLIDER2
的用法示例。
在下文中一共展示了UI_SLIDER2::forceDown方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tech_next_entry
// select next entry in current list
void tech_next_entry()
{
//unload the current animation, we load another one for the new current entry
techroom_unload_animation();
Cur_entry++;
if (Cur_entry >= Current_list_size) {
Cur_entry = 0;
// scroll to beginning of list
List_offset = 0;
Tech_slider.force_currentItem(Cur_entry);
} else {
// maybe adjust list position by 1
if (List_offset + Tech_list_coords[gr_screen.res][SHIP_H_COORD] / gr_get_font_height() <= Cur_entry) {
tech_scroll_list_down();
Tech_slider.forceDown();
}
}
techroom_select_new_entry();
gamesnd_play_iface(SND_SCROLL);
}
示例2: fiction_viewer_button_pressed
// button press
void fiction_viewer_button_pressed(int button)
{
switch (button)
{
case FVW_BUTTON_ACCEPT:
fiction_viewer_exit();
gamesnd_play_iface(SND_COMMIT_PRESSED);
break;
case FVW_BUTTON_SCROLL_UP:
fiction_viewer_scroll_up();
Fiction_viewer_slider.forceUp();
break;
case FVW_BUTTON_SCROLL_DOWN:
fiction_viewer_scroll_down();
Fiction_viewer_slider.forceDown();
break;
default:
Int3(); // unrecognized button
break;
}
}
示例3: techroom_button_pressed
int techroom_button_pressed(int num)
{
switch (num) {
case SHIPS_DATA_TAB:
case WEAPONS_DATA_TAB:
case INTEL_DATA_TAB:
fsspeech_stop();
techroom_change_tab(num);
break;
case SIMULATOR_TAB:
fsspeech_stop();
gamesnd_play_iface(SND_SWITCH_SCREENS);
gameseq_post_event(GS_EVENT_SIMULATOR_ROOM);
return 1;
case CUTSCENES_TAB:
fsspeech_stop();
gamesnd_play_iface(SND_SWITCH_SCREENS);
gameseq_post_event(GS_EVENT_GOTO_VIEW_CUTSCENES_SCREEN);
return 1;
case CREDITS_TAB:
fsspeech_stop();
gamesnd_play_iface(SND_SWITCH_SCREENS);
gameseq_post_event(GS_EVENT_CREDITS);
return 1;
case PREV_ENTRY_BUTTON:
tech_prev_entry();
break;
case NEXT_ENTRY_BUTTON:
tech_next_entry();
break;
case SCROLL_LIST_UP:
tech_scroll_list_up();
Tech_slider.forceUp();
break;
case SCROLL_LIST_DOWN:
tech_scroll_list_down();
Tech_slider.forceDown();
break;
case SCROLL_INFO_UP:
tech_scroll_info_up();
break;
case SCROLL_INFO_DOWN:
tech_scroll_info_down();
break;
case HELP_BUTTON:
launch_context_help();
gamesnd_play_iface(SND_HELP_PRESSED);
break;
case OPTIONS_BUTTON:
gamesnd_play_iface(SND_SWITCH_SCREENS);
gameseq_post_event(GS_EVENT_OPTIONS_MENU);
break;
case EXIT_BUTTON:
fsspeech_stop();
gamesnd_play_iface(SND_COMMIT_PRESSED);
gameseq_post_event(GS_EVENT_MAIN_MENU);
break;
}
return 0;
}