示例#1
0
static void
widget_query_line_draw( int left_edge, int width, struct widget_query_entry *menu,
                        const char *label )
{
  int colour = WIDGET_COLOUR_BACKGROUND;
  int y = (menu->index + num_message_lines) * 8 + 24;

  if( menu->index == highlight_line ) colour = WIDGET_COLOUR_HIGHLIGHT;
  widget_rectangle( left_edge*8+1, y, width*8-2, 1*8, colour );
  widget_printstring( left_edge*8+8, y, WIDGET_COLOUR_FOREGROUND,
                      menu->text );
  widget_display_rasters( y, 8 );
}
示例#2
0
static void
print_rom( int which )
{
  const char *setting;

  setting = *( settings_get_rom_setting( widget_settings,
					 which + first_rom, is_peripheral ) );
  while( widget_stringwidth( setting ) >= 232 - 68 )
    ++setting;

  widget_rectangle( 68, which * 8 + 24, 232 - 68, 8,
		    WIDGET_COLOUR_BACKGROUND );
  widget_printstring (68, which * 8 + 24,
				   WIDGET_COLOUR_FOREGROUND, setting );
  widget_display_rasters( which * 8 + 24, 8 );
}
示例#3
0
static int
widget_text_draw_text( void )
{
  int width;
  const char *tptr;

  widget_rectangle( 12, 28, 232, 8, WIDGET_COLOUR_BACKGROUND );

  tptr = text - 1;
  do {
    width = widget_stringwidth (++tptr);
  } while (width > 28 * 8 - 4);

  if( tptr != text )
    widget_rectangle( 14, 29, 1, 6, 5 );

  widget_printstring( 16, 28, WIDGET_COLOUR_FOREGROUND, tptr );
  widget_rectangle( 17 + width, 35, 4, 1, 5 );

  widget_display_rasters( 28, 8 );
  return 0;
}