void Icon::Paint( const Rect &cUpdateRect ) { EraseRect( cUpdateRect ); if( m_bSelected ) { Rect cUpdateFrame = GetBounds(); cUpdateFrame.top += 2; cUpdateFrame.left += 2; /* XXXKV: This is a hack; why is the height from GetBounds() so large? */ cUpdateFrame.right = m_cSize.x - 2; cUpdateFrame.bottom = m_cSize.y - 2; FillRect( cUpdateFrame, m_sHighlightColor ); /* Round edges */ SetDrawingMode( DM_COPY ); SetFgColor( m_sHighlightColor ); DrawLine( os::Point( cUpdateFrame.left + 2, cUpdateFrame.top - 2 ), os::Point( cUpdateFrame.right - 2, cUpdateFrame.top - 2 ) ); DrawLine( os::Point( cUpdateFrame.left, cUpdateFrame.top - 1 ), os::Point( cUpdateFrame.right, cUpdateFrame.top - 1 ) ); DrawLine( os::Point( cUpdateFrame.left - 2, cUpdateFrame.top + 2 ), os::Point( cUpdateFrame.left - 2, cUpdateFrame.bottom - 2 ) ); DrawLine( os::Point( cUpdateFrame.left - 1, cUpdateFrame.top ), os::Point( cUpdateFrame.left - 1, cUpdateFrame.bottom ) ); DrawLine( os::Point( cUpdateFrame.left + 2, cUpdateFrame.bottom + 2 ), os::Point( cUpdateFrame.right - 2, cUpdateFrame.bottom + 2 ) ); DrawLine( os::Point( cUpdateFrame.left, cUpdateFrame.bottom + 1 ), os::Point( cUpdateFrame.right, cUpdateFrame.bottom + 1 ) ); DrawLine( os::Point( cUpdateFrame.right + 2, cUpdateFrame.top + 2 ), os::Point( cUpdateFrame.right + 2, cUpdateFrame.bottom - 2 ) ); DrawLine( os::Point( cUpdateFrame.right + 1, cUpdateFrame.top ), os::Point( cUpdateFrame.right + 1, cUpdateFrame.bottom ) ); SetFgColor( m_sFgColor ); } SetDrawingMode( DM_BLEND ); /* XXXKV: Will only work with BitmapImage; should use RTTI to find type and handle accordingly */ BitmapImage *pcImage = static_cast<BitmapImage*>( m_pcImage ); Bitmap *pcBitmap = pcImage->LockBitmap(); DrawBitmap( pcBitmap, pcImage->GetBounds(), m_cImageFrame ); pcImage->UnlockBitmap(); /* Draw the icon name */ SetDrawingMode( DM_OVER ); MovePenTo( m_cNamePos ); DrawString( m_cName ); }
/******************************************************************** * Description: Paints the statusbar * Author: Andreas Engh-Halstvedt(with modifications by Rick Caudill) * Date: Thu Mar 18 20:07:11 2004 *********************************************************************/ void StatusBar::Paint(const os::Rect& cUpdateRect) { os::Rect cBounds=GetBounds(); float vPanel=3; os::font_height sHeight; GetFont()->GetHeight(&sHeight); SetFgColor(GetBgColor()); FillRect(cUpdateRect); SetFgColor(255, 255, 255); DrawLine(os::Point(0, 0), os::Point(cBounds.right, 0)); for(int a=0;a<nPanelCount;++a) { switch(m_pcPanels[a].mode) { case RELATIVE: { if(m_pcPanels[a].vWidth<0) continue; float w=(cBounds.right-cBounds.left)*m_pcPanels[a].vWidth; DrawPanel(m_pcPanels[a].cText, vPanel, 3, vPanel+w, cBounds.bottom-3, sHeight.ascender+sHeight.line_gap); vPanel+=w; break; } case FILL://TODO: handle FILL other places than at the end { float w=cBounds.right-cBounds.left-3-vPanel; if(w<0) continue; DrawPanel(m_pcPanels[a].cText, vPanel, 3, vPanel+w, cBounds.bottom-3, sHeight.ascender+sHeight.line_gap); vPanel+=w; break; } case CONSTANT: default: if(m_pcPanels[a].vWidth<0) continue; DrawPanel(m_pcPanels[a].cText, vPanel, 3, vPanel+m_pcPanels[a].vWidth, cBounds.bottom-3, sHeight.ascender+sHeight.line_gap); vPanel+=m_pcPanels[a].vWidth; break; } vPanel+=5; } }
/******************************************************************** * Description: Draws a certain panel at a certain position * Author: Andreas Engh-Halstvedt(with modifications by Rick Caudill) * Date: Thu Mar 18 20:07:11 2004 *********************************************************************/ void StatusBar::DrawPanel(const String& cLabel, float vLeft, float vTop, float vRight, float vBottom, float vTable) { SetFgColor(255, 255, 255); DrawLine(os::Point(vLeft, vTop), os::Point(vLeft, vBottom)); DrawLine(os::Point(vLeft, vBottom), os::Point(vRight, vBottom)); SetFgColor(0, 0, 0); DrawLine(os::Point(vLeft+1, vTop), os::Point(vRight, vTop)); DrawLine(os::Point(vRight, vTop), os::Point(vRight, vBottom-1)); DrawString(os::Point(vLeft+4,vTop+2+vTable),cLabel); }
void CHudChat::ApplySchemeSettings( vgui::IScheme *pScheme ) { BaseClass::ApplySchemeSettings( pScheme ); SetBgColor( Color( 0, 0, 0, 0 ) ); SetFgColor( Color( 0, 0, 0, 0 ) ); }
void FIMGSE2D::FillRect(PRECTL prclDst, COLOR uColor) { SetFgColor(uColor); Set3rdOperand(G2D_OPERAND3_FG); SetRopEtype(ROP_PAT_ONLY); BitBlt(prclDst, prclDst, ROT_0); // Fill Rect doesn't care about screen rotation, }
void CBaseHudChat::ApplySchemeSettings( vgui::IScheme *pScheme ) { BaseClass::ApplySchemeSettings( pScheme ); SetPaintBackgroundEnabled( false ); SetKeyBoardInputEnabled( false ); SetMouseInputEnabled( false ); m_nVisibleHeight = 0; // Put input area at bottom if ( m_pChatInput ) { int w, h; GetSize( w, h ); m_pChatInput->SetBounds( 1, h - m_iFontHeight - 1, w-2, m_iFontHeight ); } #ifdef HL1_CLIENT_DLL SetBgColor( Color( 0, 0, 0, 0 ) ); SetFgColor( Color( 0, 0, 0, 0 ) ); #else SetBgColor( Color( 0, 0, 0, 100 ) ); #endif }
void IconList::AttachedToWindow( void ) { SetFgColor( get_default_color( COL_MENU_TEXT ) ); SetEraseColor( get_default_color( COL_SHINE ) ); SetBgColor( get_default_color( COL_SHINE ) ); _Layout(); }
ProtectedMethod void CGUICommunity::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings( pScheme ); SetFgColor( pScheme->GetColor("Modfg", GetFgColor()) ); SetBgColor( Color(0, 0, 0, 0) ); SetBorder( pScheme->GetBorder( "FrameBorder" ) ); }
void CGUIReportBug::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings( pScheme ); SetFgColor( pScheme->GetColor( "Modfg", GetFgColor() ) ); SetBgColor( Color( 0, 0, 0, 0 ) ); SetBorder( pScheme->GetBorder( "FrameBorder" ) ); }
void IconList::InnerView::AttachedToWindow( void ) { View *pcParent = GetParent(); SetFgColor( pcParent->GetFgColor() ); SetEraseColor( pcParent->GetEraseColor() ); SetBgColor( pcParent->GetBgColor() ); _Layout(); }
void CHudLessonPanel::ApplySchemeSettings( vgui::IScheme *pScheme ) { BaseClass::ApplySchemeSettings( pScheme ); SetFgColor( GetFgColor() ); m_hFont = pScheme->GetFont( "HudHintTextLarge", true ); m_pLabel->SetBgColor( Color( 0, 0, 0, 150 ) ); m_pLabel->SetPaintBackgroundType( 2 ); m_pLabel->SetSize( 0, GetTall() ); // Start tiny, it'll grow. }
void LoginImageView::Paint(const Rect& cRect) { FillRect(GetBounds(),get_default_color(COL_NORMAL)); SetBgColor(get_default_color(COL_NORMAL)); SetFgColor(255,255,255); SetDrawingMode(DM_OVER); GetFont()->SetSize(25); pcImage->Draw(Point(0,0),this); DrawText(Rect(0,0,100,100),GetSystemInfo(),DTF_ALIGN_CENTER); }
void CHudChatLine::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings( pScheme ); m_hFont = pScheme->GetFont( "ChatFont" ); SetBorder( NULL ); SetBgColor( Color( 0, 0, 0, 0 ) ); SetFgColor( Color( 0, 0, 0, 0 ) ); SetFont( m_hFont ); }
void CIconPanel::ApplySchemeSettings( vgui::IScheme *pScheme ) { BaseClass::ApplySchemeSettings( pScheme ); if ( m_szIcon[0] != '\0' ) { m_icon = gHUD.GetIcon( m_szIcon ); } SetFgColor( pScheme->GetColor( "FgColor", Color( 255, 255, 255, 255 ) ) ); }
ProtectedMethod void CWebWindow::ApplySchemeSettings( vgui::IScheme *pScheme ) { BaseClass::ApplySchemeSettings( pScheme ); SetFgColor( pScheme->GetColor("Modfg", GetFgColor()) ); SetBgColor( Color(0, 0, 0, 0) ); SetBorder( pScheme->GetBorder( "FrameBorder" ) ); m_pHTMLMessage = dynamic_cast< vgui::HTML * > ( FindChildByName("HTMLMessage") ); AssertMsg( m_pHTMLMessage, "HTML Widget" ); }
void CHudChatFilterPanel::ApplySchemeSettings(vgui::IScheme *pScheme) { LoadControlSettings( "resource/UI/ChatFilters.res" ); BaseClass::ApplySchemeSettings( pScheme ); Color cColor = pScheme->GetColor( "DullWhite", GetBgColor() ); SetBgColor( Color ( cColor.r(), cColor.g(), cColor.b(), CHAT_HISTORY_ALPHA ) ); SetFgColor( pScheme->GetColor( "Blank", GetFgColor() ) ); }
void Icon::AttachedToWindow( void ) { View *pcParent = GetParent(); m_sHighlightColor = m_sEraseColor = pcParent->GetEraseColor(); m_sBgColor = pcParent->GetBgColor(); m_sFgColor = pcParent->GetFgColor(); SetEraseColor( m_sEraseColor ); SetBgColor( m_sBgColor ); SetFgColor( m_sFgColor ); }
void RemoteIconView::DrawMessage( const String& zMsg ) { DEBUG( "RemoteIconView::DrawMessage( %s )\n", zMsg.c_str() ); EraseRect( GetBounds() ); SetFgColor( Color32_s( 255,0,0 ) ); Point cSize = GetTextExtent( zMsg ); Point cPos; cPos.x = Width()/2 - cSize.x/2; cPos.y = Height()/2 - cSize.y/2; DrawString( cPos, zMsg ); Flush(); }
//----------------------------------------------------------------------------- // Purpose: // Input : *parent - //----------------------------------------------------------------------------- CDistanceMeter::CDistanceMeter( const char *pElementName ) : CHudElement( pElementName ), BaseClass( NULL, "CDistanceMeter" ) { Panel *pParent = g_pClientMode->GetViewport(); SetParent( pParent ); SetVisible( false ); SetCursor( null ); SetFgColor( Color( 0, 0, 0, 255 ) ); SetPaintBackgroundEnabled( false ); m_hFont = 0; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CHudPlayerOverlay::Paint() { // Don't draw if I'm not visible in the tactical map if ( MapData().IsEntityVisibleToTactical( GetEntity() ) == false ) return; // Don't draw if if I haven't chosen a class... SetFgColor( m_fgColor ); SetBgColor( m_bgColor ); BaseClass::Paint(); }
void CalcDisplay::Paint(const Rect &update) { Rect cBounds = GetBounds(); DrawFrame(cBounds, FRAME_RECESSED); SetFgColor(0,0,0,0); SetBgColor(get_default_color(COL_NORMAL)); char *text = m_Contents; if(!text) text = "0"; font_height fh; GetFontHeight(&fh); float fontheight = fh.ascender + fh.descender; float baseline = cBounds.top + (cBounds.Height() + 1)/2 - fontheight/2 + fh.ascender; float tw = GetStringWidth(text); MovePenTo(cBounds.right - 3.0f - tw, baseline); DrawString(text); float flagpos = cBounds.left + 5.0f; if(m_Mem) { MovePenTo(flagpos, baseline); DrawString("M"); flagpos += GetStringWidth("M "); } if(m_Inv) { MovePenTo(flagpos, baseline); DrawString("INV"); flagpos += GetStringWidth("INV "); } if(m_Hyp) { MovePenTo(flagpos, baseline); DrawString("HYP"); flagpos += GetStringWidth("HYP "); } if(m_Par != 0) { char bfr[10]; sprintf(bfr, "(%d ", m_Par); MovePenTo(flagpos, baseline); DrawString(bfr); flagpos += GetStringWidth(bfr); } }
virtual void ApplySchemeSettings( IScheme *pScheme ) { BaseClass::ApplySchemeSettings( pScheme ); HFont marlett = pScheme->GetFont( "Marlett" ); SetFont( marlett ); SetTextInset( 0, 0 ); SetContentAlignment( Label::a_northwest ); if ( GetParent() ) { SetFgColor( pScheme->GetColor( "Button.TextColor", GetParent()->GetFgColor() ) ); SetBgColor( GetParent()->GetBgColor() ); } }
//----------------------------------------------------------------------------- // Purpose: // Input : *parent - //----------------------------------------------------------------------------- CDownloadSliderPanel::CDownloadSliderPanel( vgui::VPANEL parent ) : BaseClass( NULL , "CDownloadSliderPanel" ) { SetParent( parent ); SetSize( ScreenWidth(), ScreenHeight() ); SetPos( 0, 0 ); SetVisible( false ); SetCursor( null ); SetFgColor( Color( 0, 0, 0, 255 ) ); SetPaintBackgroundEnabled( false ); scr_downloading = (ConVar *)cvar->FindVar( "scr_downloading" ); assert( scr_downloading ); vgui::ivgui()->AddTickSignal( GetVPanel(), 250 ); }
virtual void ApplySchemeSettings(IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); m_ArmedFgColor2 = GetSchemeColor("ListPanel.SelectedTextColor", pScheme); m_ArmedBgColor = GetSchemeColor("ListPanel.SelectedBgColor", pScheme); m_FgColor1 = GetSchemeColor("ListPanel.TextColor", pScheme); m_FgColor2 = GetSchemeColor("ListPanel.SelectedTextColor", pScheme); m_BgColor = GetSchemeColor("ListPanel.BgColor", GetBgColor(), pScheme); m_BgColor = GetSchemeColor("ListPanel.TextBgColor", m_BgColor, pScheme); m_SelectionBG2Color = GetSchemeColor("ListPanel.SelectedOutOfFocusBgColor", pScheme); SetBgColor(m_BgColor); SetFgColor(m_FgColor1); UpdateImage(); }
State::State (Interactor* i) { drawingname = nil; graphicstate = new FullGraphic; gridding = false; magnif = 1.0; mapibrush = new MapIBrush(i, "brush"); mapifgcolor = new MapIColor(i, "fgcolor"); mapibgcolor = new MapIColor(i, "bgcolor"); mapifont = new MapIFont(i, "font"); mapipattern = new MapIPattern(i, "pattern"); modifstatus = Unmodified; viewlist = new InteractorList; SetBrush(mapibrush->GetInitial()); SetFgColor(mapifgcolor->GetInitial()); SetBgColor(mapibgcolor->GetInitial()); SetFillBg(true); SetFont(mapifont->GetInitial()); SetPattern(mapipattern->GetInitial()); }
//----------------------------------------------------------------------------- // Purpose: // Input : *parent - // Output : //----------------------------------------------------------------------------- CMessageCharsPanel::CMessageCharsPanel( vgui::VPANEL parent ) : BaseClass( NULL, "CMessageCharsPanel" ) { SetParent( parent ); SetSize( ScreenWidth(), ScreenHeight() ); SetPos( 0, 0 ); SetVisible( true ); SetCursor( null ); SetKeyBoardInputEnabled( false ); SetMouseInputEnabled( false ); m_hFont = vgui::INVALID_FONT; SetFgColor( Color( 0, 0, 0, 255 ) ); SetPaintBackgroundEnabled( false ); Reset(); vgui::ivgui()->AddTickSignal( GetVPanel(), 100 ); }
//----------------------------------------------------------------------------- // Purpose: Instances the overlay object // Input : *parent - //----------------------------------------------------------------------------- CDebugOverlay::CDebugOverlay( vgui::VPANEL parent ) : BaseClass( NULL, "CDebugOverlay" ) { int w, h; vgui::surface()->GetScreenSize( w, h ); SetParent( parent ); SetSize( w, h ); SetPos( 0, 0 ); SetVisible( false ); SetCursor( null ); m_hFont = 0; SetFgColor( Color( 0, 0, 0, 0 ) ); SetPaintBackgroundEnabled( false ); // set the scheme before any child control is created vgui::HScheme scheme = vgui::scheme()->LoadSchemeFromFileEx( enginevgui->GetPanel( PANEL_CLIENTDLL_TOOLS ), "resource/ClientScheme.res", "Client"); SetScheme( scheme ); vgui::ivgui()->AddTickSignal( GetVPanel(), 250 ); }
void CBaseHudChatLine::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); m_hFont = pScheme->GetFont( "Default" ); #ifdef HL1_CLIENT_DLL SetBgColor( Color( 0, 0, 0, 0 ) ); SetFgColor( Color( 0, 0, 0, 0 ) ); SetBorder( NULL ); #else SetBgColor( Color( 0, 0, 0, 100 ) ); #endif m_hFontMarlett = pScheme->GetFont( "Marlett" ); m_clrText = pScheme->GetColor( "FgColor", GetFgColor() ); SetFont( m_hFont ); }
void CBaseHudChat::ApplySchemeSettings( vgui::IScheme *pScheme ) { LoadControlSettings( "resource/UI/BaseChat.res" ); BaseClass::ApplySchemeSettings( pScheme ); SetPaintBackgroundType( 2 ); SetPaintBorderEnabled( true ); SetPaintBackgroundEnabled( true ); SetKeyBoardInputEnabled( false ); SetMouseInputEnabled( false ); m_nVisibleHeight = 0; #ifdef HL1_CLIENT_DLL SetBgColor( Color( 0, 0, 0, 0 ) ); SetFgColor( Color( 0, 0, 0, 0 ) ); #endif Color cColor = pScheme->GetColor( "DullWhite", GetBgColor() ); SetBgColor( Color ( cColor.r(), cColor.g(), cColor.b(), CHAT_HISTORY_ALPHA ) ); GetChatHistory()->SetVerticalScrollbar( false ); }
void init_display(int argc, char **argv, MyProgram *me) { Widget w[MAX_WIDGETS]; if (OpenDisplay(argc, argv) == FALSE) return; /* declare all the widgets */ w[FILE_MENU_IDX] = MakeMenu(" File "); w[OPTIONS_MENU_IDX] = MakeMenu(" Options "); w[DISPLAY_MENU_IDX] = MakeMenu(" Display "); w[CONTROL_MENU_IDX] = MakeMenu(" Control "); w[HELP_MENU_IDX] = MakeMenu(" Help "); w[LABEL_IDX] = MakeLabel(" "); w[DRAW_AREA_IDX] = MakeDrawArea(SCREEN_X_SIZE, SCREEN_Y_SIZE, redisplay, me); w[STATUS_AREA_IDX] = MakeDrawArea(STATUS_X_SIZE, STATUS_Y_SIZE, redisplay_status, me); /* add menu items to 'file' menu */ w[FILE_LOAD_IDX] = MakeMenuItem(w[FILE_MENU_IDX], "Load Image ...", file_load, me); w[FILE_SAVE_IDX] = MakeMenuItem(w[FILE_MENU_IDX], "Save Image ...", file_save, me); w[FILE_QUIT_IDX] = MakeMenuItem(w[FILE_MENU_IDX], "Quit", file_quit, me); /* add menu items to 'options' menu */ w[OPT_ROM_IDX] = MakeMenuItem(w[OPTIONS_MENU_IDX], "ROM Setup ...", options_rom_setup, me); w[OPT_RAM_IDX] = MakeMenuItem(w[OPTIONS_MENU_IDX], "RAM Setup ...", options_ram_setup, me); w[OPT_CLOCK_IDX] = MakeMenuItem(w[OPTIONS_MENU_IDX], "Clock Setup ...", options_clock_setup, me); w[OPT_STAT_IDX] = MakeMenuItem(w[OPTIONS_MENU_IDX], "Status ...", options_status, me); /* add menu items to 'display' menu */ w[DIS_MPU_IDX] = MakeMenuItem(w[DISPLAY_MENU_IDX], "MPU", display_mpu, me); w[DIS_SYS_IDX] = MakeMenuItem(w[DISPLAY_MENU_IDX], "System", display_system, me); w[DIS_BOTH_IDX] = MakeMenuItem(w[DISPLAY_MENU_IDX], "MPU & System", display_both, me); w[DIS_IMAGE_IDX] = MakeMenuItem(w[DISPLAY_MENU_IDX], "Code Image", display_image, me); /* add menu items to 'control' menu */ w[CON_RESET_IDX] = MakeMenuItem(w[CONTROL_MENU_IDX], "Reset", control_reset, me); w[CON_STEP_IDX] = MakeMenuItem(w[CONTROL_MENU_IDX], "Step", control_step, me); w[CON_GO_IDX] = MakeMenuItem(w[CONTROL_MENU_IDX], "Go", control_go, me); w[CON_HALT_IDX] = MakeMenuItem(w[CONTROL_MENU_IDX], "Halt", control_halt, me); /* add menu items to 'help' menu */ w[HELP_ABOUT_IDX] = MakeMenuItem(w[HELP_MENU_IDX], "About ...", help_about, me); w[HELP_MENUS_IDX] = MakeMenuItem(w[HELP_MENU_IDX], "Menu Help ...", help_menu, me); w[HELP_KEYS_IDX] = MakeMenuItem(w[HELP_MENU_IDX], "Keys Help ...", help_keys, me); /* callbacks for draw area */ SetButtonDownCB(w[DRAW_AREA_IDX], button_down); SetButtonUpCB(w[DRAW_AREA_IDX], button_up); SetMouseMotionCB(w[DRAW_AREA_IDX], motion); SetKeypressCB(w[DRAW_AREA_IDX], keypress); /* set all the widgets' positions */ SetWidgetPos(w[OPTIONS_MENU_IDX], PLACE_RIGHT, w[FILE_MENU_IDX], NO_CARE, NULL); SetWidgetPos(w[DISPLAY_MENU_IDX], PLACE_RIGHT, w[OPTIONS_MENU_IDX], NO_CARE, NULL); SetWidgetPos(w[CONTROL_MENU_IDX], PLACE_RIGHT, w[DISPLAY_MENU_IDX], NO_CARE, NULL); SetWidgetPos(w[HELP_MENU_IDX], PLACE_RIGHT, w[CONTROL_MENU_IDX], NO_CARE, NULL); SetWidgetPos(w[LABEL_IDX], PLACE_RIGHT, w[HELP_MENU_IDX], NO_CARE, NULL); SetWidgetPos(w[DRAW_AREA_IDX], PLACE_UNDER, w[FILE_MENU_IDX], NO_CARE, NULL); SetWidgetPos(w[STATUS_AREA_IDX], PLACE_UNDER, w[DRAW_AREA_IDX], NO_CARE, NULL); /* This call actually causes the whole thing to be displayed on the * screen. You have to call this function before doing any drawing * into the window. */ ShowDisplay(); /* Get standard (red, blue, green, yellow, black, white) colors for * drawing stuff. Check libsx.h for more info. */ GetStandardColors(); SetFgColor(w[FILE_MENU_IDX], WHITE); SetBgColor(w[FILE_MENU_IDX], BLUE); SetFgColor(w[OPTIONS_MENU_IDX], WHITE); SetBgColor(w[OPTIONS_MENU_IDX], BLUE); SetFgColor(w[DISPLAY_MENU_IDX], WHITE); SetBgColor(w[DISPLAY_MENU_IDX], BLUE); SetFgColor(w[CONTROL_MENU_IDX], WHITE); SetBgColor(w[CONTROL_MENU_IDX], BLUE); SetFgColor(w[HELP_MENU_IDX], WHITE); SetBgColor(w[HELP_MENU_IDX], BLUE); SetFgColor(w[LABEL_IDX], BLACK); SetFgColor(w[DRAW_AREA_IDX], WHITE); SetBgColor(w[DRAW_AREA_IDX], BLACK); SetFgColor(w[STATUS_AREA_IDX], WHITE); SetBgColor(w[STATUS_AREA_IDX], BLACK); SetFgColor(w[FILE_LOAD_IDX], WHITE); SetFgColor(w[FILE_SAVE_IDX], WHITE); SetFgColor(w[FILE_QUIT_IDX], WHITE); SetBgColor(w[FILE_LOAD_IDX], BLUE); SetFgColor(w[OPT_ROM_IDX], WHITE); SetFgColor(w[OPT_RAM_IDX], WHITE); SetFgColor(w[OPT_CLOCK_IDX], WHITE); SetFgColor(w[OPT_STAT_IDX], WHITE); SetBgColor(w[OPT_RAM_IDX], BLUE); SetFgColor(w[DIS_MPU_IDX], WHITE); SetFgColor(w[DIS_SYS_IDX], WHITE); SetFgColor(w[DIS_BOTH_IDX], WHITE); SetFgColor(w[DIS_IMAGE_IDX], WHITE); SetBgColor(w[DIS_MPU_IDX], BLUE); SetFgColor(w[CON_RESET_IDX], WHITE); SetFgColor(w[CON_STEP_IDX], WHITE); SetFgColor(w[CON_GO_IDX], WHITE); SetFgColor(w[CON_HALT_IDX], WHITE); SetBgColor(w[CON_RESET_IDX], BLUE); SetFgColor(w[HELP_ABOUT_IDX], WHITE); SetFgColor(w[HELP_MENUS_IDX], WHITE); SetFgColor(w[HELP_KEYS_IDX], WHITE); SetBgColor(w[HELP_ABOUT_IDX], BLUE); /* save drawing area widget */ me->draw_area_widget = w[DRAW_AREA_IDX]; me->status_area_widget = w[STATUS_AREA_IDX]; /* If you wanted to get all the colors in the colormap, you'd do the * following : * * GetAllColors(); * SetColorMap(GREY_SCALE_1); * * You can wait to do it till later if you want. There's no need * to do it here if you don't need to (because it wacks out the * colormap). */ }