if 'slow' and 'highlight_prompt', set the yn_label widget to look like part of the map when idle or to invert background and foreground when a prompt is active */
| 2543 | part of the map when idle or to invert background and foreground when |
| 2544 | a prompt is active */ |
| 2545 | void |
| 2546 | highlight_yn(boolean init) |
| 2547 | { |
| 2548 | struct xwindow *xmap; |
| 2549 | |
| 2550 | if (!appResources.slow || !appResources.highlight_prompt) |
| 2551 | return; |
| 2552 | |
| 2553 | /* first time through, WIN_MAP isn't fully initialized yet */ |
| 2554 | xmap = ((map_win != WIN_ERR) ? &window_list[map_win] |
| 2555 | : (WIN_MAP != WIN_ERR) ? &window_list[WIN_MAP] : 0); |
| 2556 | |
| 2557 | if (init && xmap) { |
| 2558 | Arg args[2]; |
| 2559 | XGCValues vals; |
| 2560 | unsigned long fg_bg = (GCForeground | GCBackground); |
| 2561 | GC ggc = (xmap->map_information->is_tile |
| 2562 | ? xmap->map_information->tile_map.white_gc |
| 2563 | : xmap->map_information->text_map.copy_gc); |
| 2564 | |
| 2565 | (void) memset((genericptr_t) &vals, 0, sizeof vals); |
| 2566 | if (XGetGCValues(XtDisplay(xmap->w), ggc, fg_bg, &vals)) { |
| 2567 | XtSetArg(args[0], XtNforeground, vals.foreground); |
| 2568 | XtSetArg(args[1], XtNbackground, vals.background); |
| 2569 | XtSetValues(yn_label, args, TWO); |
| 2570 | } |
| 2571 | } else |
| 2572 | swap_fg_bg(yn_label); |
| 2573 | } |
| 2574 | |
| 2575 | /* |
| 2576 | * Set up the playing console. This has three major parts: the |
no test coverage detected