当前位置: 首页>>代码示例>>C++>>正文


C++ InitColors函数代码示例

本文整理汇总了C++中InitColors函数的典型用法代码示例。如果您正苦于以下问题:C++ InitColors函数的具体用法?C++ InitColors怎么用?C++ InitColors使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了InitColors函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: fopen

void Log::Initialize()
{
    std::string logfn=sConfig.GetStringDefault("LogFile", "");
    if(logfn!="")
    {
        logfile = fopen(logfn.c_str(), "w");
    }

    std::string gmlogname = sConfig.GetStringDefault("GMLogFile", "");
    if(gmlogname!="")
    {
        gmlogfile = fopen(gmlogname.c_str(), "a");
    }

    std::string dberlogname = sConfig.GetStringDefault("DBErrorLogFile", "");
    if(dberlogname!="")
    {
        dberlogfile = fopen(dberlogname.c_str(), "a");
    }

    m_logLevel     = sConfig.GetIntDefault("LogLevel", 0);
    m_logFileLevel = sConfig.GetIntDefault("LogFileLevel", 0);
    InitColors(sConfig.GetStringDefault("LogColors", ""));

    if(sConfig.GetIntDefault("LogFilter_TransportMoves", 0)!=0)
        m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
    if(sConfig.GetIntDefault("LogFilter_CreatureMoves", 0)!=0)
        m_logFilter |= LOG_FILTER_CREATURE_MOVES;

}
开发者ID:elitak,项目名称:noxserver,代码行数:30,代码来源:Log.cpp

示例2: initInstance

static bool initInstance( void )
{
    // OLE2Init();
    InitFonts();
    InitColors();
    return( true );
}
开发者ID:NoSuchProcess,项目名称:open-watcom-v2,代码行数:7,代码来源:main.c

示例3: initInstance

static BOOL initInstance( void )
{
    // OLE2Init();
    InitFonts();
    InitColors();
    return( TRUE );
}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:7,代码来源:main.c

示例4: InitColors

void CSynBCGPEditCtrl::OnSysColorChange()
{
	CWnd::OnSysColorChange();

	InitColors ();
	RedrawWindow ();
}
开发者ID:kaffeel,项目名称:coolformat3.2,代码行数:7,代码来源:SynBCGPEditCtrl.cpp

示例5: InitColors

//*****************************************************************************************
void CBCGPListCtrl::OnSysColorChange() 
{
	CListCtrl::OnSysColorChange();
	
	InitColors ();
	RedrawWindow ();
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:8,代码来源:BCGPListCtrl.cpp

示例6: I2X

void CAutomap::Init (void)
{
m_nWidth = 640;
m_nHeight = 480;
m_bFull = false;
m_bDisplay = 0;
m_data.bCheat = 0;
m_data.bHires = 1;
m_data.nViewDist = 0;
m_data.nMaxDist = I2X (2000);
m_data.nZoom = 0x9000;
m_data.viewPos.SetZero ();
m_data.viewTarget.SetZero ();
m_data.viewMatrix = CFixMatrix::IDENTITY;
for (int i = 0; i < 2; i++) {
	if (!m_visited [i].Buffer ())
		m_visited [i].Create (MAX_SEGMENTS_D2X);
	m_visited [i].Clear ();
	}
if (!m_visible.Buffer ())
	m_visible.Create (MAX_SEGMENTS_D2X);
m_visible.Clear ();
m_nEdges = 0;
m_nMaxEdges = MAX_EDGES;
m_nLastEdge = -1;
m_edges.Create (MAX_EDGES);
m_brightEdges.Create (MAX_EDGES);
InitColors ();
}
开发者ID:paud,项目名称:d2x-xl,代码行数:29,代码来源:automap.cpp

示例7: BasicInit

void BasicInit()
#ifdef MAC
{
	void InitColors();
#if MACB4CARBON  
	short i;
	Ptr stackTop;
	// JLMextern _DataInit();
	
	stackTop = GetApplLimit();
	
	
	SetApplLimit((void *)(stackTop - (Ptr)30000));
	// SetApplLimit((void *)(*(long *)csb - 30000));
	MaxApplZone();
	for (i = 1 ; i <= 16 ; i++) MoreMasters();
	
	InitGraf(&qd.thePort);
	InitFonts();
	InitWindows();
	InitMenus();
	TEInit();
	InitDialogs(nil);
	FlushEvents(everyEvent, 0);
#endif
	InitCursor();
	
	InitColors();
}
开发者ID:NOAA-ORR-ERD,项目名称:PyGnome,代码行数:29,代码来源:CROSS.CPP

示例8: InitColors

Draw::Draw(HDC hdc) {
	DrawLock __;
	native = 0;
	InitColors();
	InitFonts();
	Reset();
	Attach(hdc);
}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:8,代码来源:DrawWin32.cpp

示例9: Appender

AppenderConsole::AppenderConsole(uint8 id, std::string const& name, LogLevel level, AppenderFlags flags, std::vector<char const*> extraArgs)
    : Appender(id, name, level, flags), _colored(false)
{
    for (uint8 i = 0; i < NUM_ENABLED_LOG_LEVELS; ++i)
        _colors[i] = ColorTypes(MaxColors);

    if (!extraArgs.empty())
        InitColors(extraArgs[0]);
}
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:9,代码来源:AppenderConsole.cpp

示例10: Appender

AppenderConsole::AppenderConsole(uint8 id, std::string const& name, LogLevel level, AppenderFlags flags, ExtraAppenderArgs extraArgs)
    : Appender(id, name, level, flags), _colored(false)
{
    for (uint8 i = 0; i < MaxLogLevels; ++i)
        _colors[i] = ColorTypes(MaxColors);

    if (!extraArgs.empty())
        InitColors(extraArgs[0]);
}
开发者ID:joinjold,项目名称:TrinityCore,代码行数:9,代码来源:AppenderConsole.cpp

示例11: GetTimestampStr

void Log::Initialize()
{
    std::string logsDir = sConfig.GetStringDefault("LogsDir","");

    if(!logsDir.empty())
    {
        if((logsDir.at(logsDir.length()-1)!='/') && (logsDir.at(logsDir.length()-1)!='\\'))
            logsDir.append("/");
    }

    std::string logfn=sConfig.GetStringDefault("LogFile", "");
    if(logfn!="")
    {
        if(sConfig.GetIntDefault("LogTimestamp",0))
        {
            std::string logTimestamp = sConfig.GetIntDefault("LogTimestamp",0) ? GetTimestampStr() : "";
            logTimestamp.insert(0,"_");
            size_t dot_pos = logfn.find_last_of(".");
            if(dot_pos!=logfn.npos)
                logfn.insert(dot_pos,logTimestamp);
            else
                logfn += logTimestamp;
        }

        logfile = fopen((logsDir+logfn).c_str(), "w");
    }

    std::string gmlogname = sConfig.GetStringDefault("GMLogFile", "");
    if(gmlogname!="")
    {
        gmLogfile = fopen((logsDir+gmlogname).c_str(), "a");
    }

    std::string dberlogname = sConfig.GetStringDefault("DBErrorLogFile", "");
    if(dberlogname!="")
    {
        dberLogfile = fopen((logsDir+dberlogname).c_str(), "a");
    }
    std::string ralogname = sConfig.GetStringDefault("RaLogFile", "");
    if(ralogname!="")
    {
        raLogfile = fopen((logsDir+ralogname).c_str(), "a");
    }
    m_logLevel     = sConfig.GetIntDefault("LogLevel", 0);
    m_logFileLevel = sConfig.GetIntDefault("LogFileLevel", 0);
    InitColors(sConfig.GetStringDefault("LogColors", ""));

    m_logFilter = 0;

    if(sConfig.GetIntDefault("LogFilter_TransportMoves", 0)!=0)
        m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
    if(sConfig.GetIntDefault("LogFilter_CreatureMoves", 0)!=0)
        m_logFilter |= LOG_FILTER_CREATURE_MOVES;
    if(sConfig.GetIntDefault("LogFilter_VisibilityChanges", 0)!=0)
        m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES;
}
开发者ID:Artea,项目名称:mangos-svn,代码行数:56,代码来源:Log.cpp

示例12: glClearColor

void SceneBase::Init(string vertexShader, string fragmentShader)
{
	// Debug
	m_bShowDebug = false;

	// Simulation Speed
	m_speed = 1.0f;

	// Dark Blue Background
	glClearColor(0.0f, 0.0f, 0.4f, 0.0f);
	// Enable depth test
	glEnable(GL_DEPTH_TEST);
	// Accept fragment if it closer to the camera than the former one
	glDepthFunc(GL_LESS);

	// Face Culling
	glEnable(GL_CULL_FACE);
	m_bCull = true;

	// Filled/Wireframe Mode
	glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
	m_bWireframe = false;

	glEnable(GL_BLEND);
	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

	glGenVertexArrays(1, &m_vertexArrayID);
	glBindVertexArray(m_vertexArrayID);

	Math::InitRNG();
	InitShadersAndLights(vertexShader, fragmentShader);
	InitFog();


	/*
	* Resource Initialization
	*/
	// Colors
	InitColors();
	// Materials
	InitMaterials();
	// Textures
	InitTextures();
	// Meshes
	InitMeshes();

	// Projection matrix : 45° Field of View, 4:3 ratio, display range : 0.1 unit <-> 1000 units
	Mtx44 perspective;
	perspective.SetToPerspective(45.0f, 4.0f / 3.0f, 0.1f, 12000.0f);
	//perspective.SetToOrtho(-80, 80, -60, 60, -1000, 1000);
	projectionStack.LoadMatrix(perspective);

	bLightEnabled = true;
}
开发者ID:Pycorax,项目名称:GDevFramework,代码行数:54,代码来源:SceneBase.cpp

示例13: DrawBoard

/* 
 * Function: DrawBoard
 * -------------------
 * Exported function to draw a new board.  Sets up named colors, draws the yellow
 * border, draws the empty cubes, the labels on the scoreboard, and resets scores
 * to zero and words lists to empty.
 */
void DrawBoard(int numRows, int numCols)
{
    if (numRows < 0 || numRows > MAX_DIMENSION || numCols < 0 || numCols > MAX_DIMENSION)
	Error("DrawBoard called with invalid dimensions.");
		
    SetWindowTitle("Welcome to Boggle!");
    InitColors();
    CalculateGeometry(numRows, numCols);
	
    // Draws a filled rect underneath cubes in the oh-so-familiar yellow color
    FillBox(gState.board.x, gState.board.y, gState.board.w, gState.board.h, 0.5, "Board Color");
    DrawEmptyCubes();
    DrawPlayerLabel(Human, "Me");
    DrawPlayerLabel(Computer, "Computer");
}
开发者ID:sunil3loq,项目名称:cpptrials,代码行数:22,代码来源:gboggle.cpp

示例14: SetPaintBackgroundEnabled

void CEditorRoot::ApplySchemeSettings(vgui::IScheme *pScheme)
{
	BaseClass::ApplySchemeSettings(pScheme);

	SetPaintBackgroundEnabled(true);
	SetPaintBorderEnabled(false);
	SetPaintEnabled(true);
	SetCloseButtonVisible(false);
	SetSizeable(false);
	SetMoveable(false);

	InitColors();

	SetTitle( "", true );
	SetTitleBarVisible( false );
	m_pLabelTitle->SetText( GetEditorTitle() );
	m_pLabelTitle->SetFont( pScheme->GetFont( "UiBold", false ) );

	SetPaintBackgroundType( 0 );
	OnShaderNameChanged();
	GenerateFonts(pScheme);
}
开发者ID:Biohazard90,项目名称:source-shader-editor,代码行数:22,代码来源:veditorroot.cpp

示例15: wxOwnerDrawnComboBox

    : wxOwnerDrawnComboBox(parent, id, wxEmptyString, wxDefaultPosition,
                           wxDefaultSize, wxArrayString(), wxCB_READONLY)
#endif
{
    // If the ctrl is too small the color box gets messed up in wxOSX
    SetMinSize(wxSize(GetCharWidth() * 22, -1));
    s_ctrls.push_back(this);
    // Make sure we have a list of colors
    if (s_colors.empty())
        InitColors();
    else
        UpdateCtrls();
    // Set the initial value
    SetColor(color.IsOk() ? color : *wxWHITE);
    // Connect the event handler
#ifndef __WXOSX__
    Connect(wxEVT_COMMAND_COMBOBOX_SELECTED,
#else
    Connect(wxEVT_COMMAND_CHOICE_SELECTED,
#endif
            wxCommandEventHandler(ColorChoice::OnSelection));
}
开发者ID:oeuftete,项目名称:wx-xword,代码行数:22,代码来源:colorchoice.cpp


注:本文中的InitColors函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。