本文整理汇总了C++中UI_SLIDER2::forceUp方法的典型用法代码示例。如果您正苦于以下问题:C++ UI_SLIDER2::forceUp方法的具体用法?C++ UI_SLIDER2::forceUp怎么用?C++ UI_SLIDER2::forceUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UI_SLIDER2
的用法示例。
在下文中一共展示了UI_SLIDER2::forceUp方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tech_prev_entry
// select previous entry in current list
void tech_prev_entry()
{
//unload the current animation, we load another one for the new current entry
techroom_unload_animation();
Cur_entry--;
if (Cur_entry < 0) {
Cur_entry = Current_list_size - 1;
// scroll to end of list
List_offset = Cur_entry - Tech_list_coords[gr_screen.res][SHIP_H_COORD] / gr_get_font_height() + 1;
if (List_offset < 0) {
// this happens when there are not enough items to scroll
List_offset = 0;
}
Tech_slider.force_currentItem(Tech_slider.get_numberItems());
} else {
// maybe adjust list position by 1
if (List_offset > Cur_entry) {
tech_scroll_list_up();
Tech_slider.forceUp();
}
}
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;
}