本文整理汇总了C++中UI_GADGET::check_move方法的典型用法代码示例。如果您正苦于以下问题:C++ UI_GADGET::check_move方法的具体用法?C++ UI_GADGET::check_move怎么用?C++ UI_GADGET::check_move使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UI_GADGET
的用法示例。
在下文中一共展示了UI_GADGET::check_move方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process
// key_in: If not -1, this means to use this key as input, and not call game_poll()
int UI_WINDOW::process(int key_in,int process_mouse)
{
UI_GADGET *tmp;
// only does stuff in non THREADED mode
os_poll();
if (process_mouse){
ui_mouse_process();
}
if (key_in == -1){
keypress = game_check_key();
} else {
keypress = key_in;
}
last_keypress = keypress;
do_dump_check();
if (mouse_captured_gadget && B1_RELEASED){
mouse_captured_gadget = NULL;
}
// The following code was commented out by NeilK on 4/15/99 to fix a problem we were having with
// the UI_SLIDER2 class not receiving the process event when the mouse was dragging the scroller
// but outside the mask region. I checked a handful of other screens and so no adverse affects
// of this change at the time.
/*
if (mouse_captured_gadget) {
mouse_captured_gadget->process(); // if a control has captured the mouse, only it gets processed
use_hack_to_get_around_stupid_problem_flag = 0;
return last_keypress;
}
*/
if (!first_gadget) {
use_hack_to_get_around_stupid_problem_flag = 0;
return last_keypress;
}
check_focus_switch_keys();
// run through all top level gadgets and process them (they are responsible for processing
// their children, which UI_GADGET will handle if you don't override process() or if you
// do, you call UI_GADGET::process()).
if ( !ignore_gadgets ) {
tmp = first_gadget;
do {
if ( !tmp->check_move() )
tmp->process();
tmp = tmp->next;
} while (tmp != first_gadget);
}
use_hack_to_get_around_stupid_problem_flag = 0;
return last_keypress;
}