您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DrawCursor函数代码示例

51自学网 2021-06-01 20:29:56
  C++
这篇教程C++ DrawCursor函数代码示例写得很实用,希望能帮到您。

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

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

示例1: DrawCursorPos

/*** @brief 绘制指定位置的光标* * 如果光标不在指定位置,则不会绘制*/void DrawCursorPos(struct ChessBoard *cp, struct ChessPos pos){    struct ChessPos *cursor;    //绘制光标    //仅在游戏正常进行时绘制    if (cp->gameState == GSTAT_ACTIVE)    {        cursor = ActiveCursor(cp);        if (MatchPos(*cursor, pos.line, pos.row))        {            DrawCursor(*cursor, cp->activePlayer);        }        if (cp->chessLocked)        {            cursor = &cp->lockedCursor;            if (MatchPos(*cursor, pos.line, pos.row))            {                //棋子锁定光标是两玩家共用的                DrawCursor(*cursor, PLY_BOTH);            }        }    }}
开发者ID:SwimmingTiger,项目名称:ChineseChess,代码行数:32,


示例2: DrawCursor

// Renders the buffer to the screen.void CConsole::DrawBuffer(CTextRenderer& textRenderer){	if (m_fHeight < m_iFontHeight)		return;	CMatrix3D savedTransform = textRenderer.GetTransform();	textRenderer.Translate(2.0f, m_fHeight - (float)m_iFontOffset + 1.0f, 0.0f);	textRenderer.Color(1.0f, 1.0f, 0.0f);	textRenderer.PutAdvance(L"]");	textRenderer.Color(1.0f, 1.0f, 1.0f);	if (m_iBufferPos == 0)		DrawCursor(textRenderer);	for (int i = 0; i < m_iBufferLength; i++)	{		textRenderer.PrintfAdvance(L"%lc", m_szBuffer[i]);		if (m_iBufferPos-1 == i)			DrawCursor(textRenderer);	}	textRenderer.SetTransform(savedTransform);}
开发者ID:2asoft,项目名称:0ad,代码行数:27,


示例3: DrawCursor

void GraphView::CurrentProbeChanged(Draw *draw, int pi, int ni, int d) {	wxRegion reg;	DrawCursor(pi, true, &reg);	int i = d;	if (i)		i = i > 0 ? -1 : 1;	if (m_draw->GetDoubleCursor() && ni >= 0) {		int vd = m_draw->GetValuesTable().size();		int s, e;		if (d >= 0) {			s = std::max(0, ni - d);			e = ni;		} else {			s = ni;			e = std::min(vd - 1, ni - d);		}		for (int i = s; i <= e; ++i) 			DrawPoint(i, &reg, false);	}	DrawCursor(ni, false, &reg);	m_graphs->UpdateArea(reg);}
开发者ID:cyclefusion,项目名称:szarp,代码行数:32,


示例4: GetDocument

voidMFCSequenceEditor::OnDraw(CDC* pdc){	CRect	clipBox;	int		cbType;	cbType = pdc->GetClipBox(&clipBox);//	fprintf(stderr, "OnDraw() clip (%d %d %d %d) type %s/n", clipBox.left, clipBox.top, clipBox.right, clipBox.bottom, cbType==COMPLEXREGION?"complex":cbType==SIMPLEREGION?"simple":cbType==NULLREGION?"null":"error");//	fprintf(stderr, "lt %d/n", lastScheduledEvent.ticks);	CDocument* pDoc = GetDocument();#ifdef QUA_V_GDI_PLUS	Graphics	graphics(pdc->m_hDC);	DrawGridGraphics(graphics, clipBox);// test the interoperation of GDI and GDI+//	Color	p = Color::MakeARGB(100, 255, 20, 255);//	Pen	semip(p, 3);//	graphics.DrawLine(&semip, 0,0, 200, 200);//	for (short i=0; i<NIR(); i++) {//		MFCInstanceView *ir = (MFCInstanceView *)IR(i);//		if (ir->bounds.Intersects(clipBox)) {//			ir->Draw(&graphics, &clipBox);//		}//	}	DrawCursor(graphics, clipBox);#else	DrawGrid(pdc, &clipBox);	DrawCursor(pdc, &clipBox);#endif//	fprintf(stderr, "OnDraw() finito/n");}
开发者ID:dakyri,项目名称:qua,代码行数:30,


示例5: DrawCursor

voidViewBuffer::MoveCursor(int32 x, int32 y){	DrawCursor(fCursorX, fCursorY);	DrawCursor(x, y);		fCursorX = x;	fCursorY = y;}
开发者ID:mmanley,项目名称:Antares,代码行数:9,


示例6: scare_mouse

void CGame::PlayTurn() {	int x,y;	scare_mouse();	DrawBoard();	DrawPlayer();	DrawScores();	DrawCursor();	blit(background, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H);	unscare_mouse();	while (!players[currplayer].Done()) {		if (mouse_b & 1) {			x = mouse_x;			y = mouse_y;			players[currplayer].HandleMouse(x,y);			rest (200); //rest for a bit so it doesnt keep catching mouse clicks						scare_mouse();			DrawBoard();			DrawScores(); //shouldnt have to redraw this, but i dont have time to do a decent redraw management system			if (!players[currplayer].Done())				DrawPlayer(); //only redraw if not at end of turn			DrawCursor();				blit(background, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H);			unscare_mouse();		}			}//end while	players[currplayer].ResetTurnComplete();			//update currplayer	int oldcurrplayer;	oldcurrplayer = currplayer;	do {		if (currplayer == (numplayers-1)) {  //if currplayer is last in line			currplayer = 0;		}		else {			currplayer++;		}	//stop increment currplayer if the curr isnt playing AND we have gone through the whole list already	} while (!players[currplayer].stillplaying && currplayer != oldcurrplayer);}
开发者ID:Josh-Stewart,项目名称:Scarbble,代码行数:57,


示例7: DrawCursor

void					BF_GUI_ColorView::MouseDown(BPoint point){	if(point.x>255) return;	DrawCursor(false);	*piColor = (uint8)point.x;		DrawCursor(true);		poUnit->Draw(poUnit->Bounds());}
开发者ID:mmadia,项目名称:befar-svn_clone,代码行数:10,


示例8: EraseCursor

/*-----------------------------------------------------------------*/void __fastcall TChoosePaletteForm::SelectColor (COLORREF _color){    EraseCursor();    for (int i=0; i<MAX_PAL_ENTRY; i++)        if (_color==Data->palette->GetColor(i)) {            index = i;            DrawCursor();            return;        }    index = 0;    DrawCursor();}
开发者ID:damianbrunold,项目名称:dbweave,代码行数:13,


示例9: UpdateDisplay

/****  Display update.****  This functions updates everything on screen. The map, the gui, the**  cursors.*/void UpdateDisplay(){	if (GameRunning || Editor.Running == EditorEditing) {		DrawMapArea();		DrawMessages();		if (CursorState == CursorStateRectangle) {			DrawCursor();		}		if ((Preference.BigScreen && !BigMapMode) || (!Preference.BigScreen && BigMapMode)) {			UiToggleBigMap();		}		if (!BigMapMode) {			for (size_t i = 0; i < UI.Fillers.size(); ++i) {				UI.Fillers[i].G->DrawSubClip(0, 0,											 UI.Fillers[i].G->Width,											 UI.Fillers[i].G->Height,											 UI.Fillers[i].X, UI.Fillers[i].Y);			}			DrawMenuButtonArea();			DrawUserDefinedButtons();			UI.Minimap.Draw();			UI.Minimap.DrawViewportArea(*UI.SelectedViewport);			UI.InfoPanel.Draw();			DrawResources();			UI.StatusLine.Draw();			UI.StatusLine.DrawCosts();			UI.ButtonPanel.Draw();		}		DrawTimer();	}	DrawPieMenu(); // draw pie menu only if needed	DrawGuichanWidgets();	if (CursorState != CursorStateRectangle) {		DrawCursor();	}	//	// Update changes to display.	//	Invalidate();}
开发者ID:Clemenshemmerling,项目名称:Stratagus,代码行数:56,


示例10: DrawGrid

void Game::ComposeFrame(){	const int baseX = 100;	const int baseY = 100;	if( CheckForVictory() == EMPTY )	{		DrawGrid( baseX, baseY );		DoUserInput();		DrawCursor( cursorX, cursorY );	}	else {		DrawGrid( baseX, baseY );		if( CheckForVictory() == X ){			winR = 255;		}		else {			winB = 255;		}		gfx.DrawLine( winX1 + 50, winY1 + 140, winX2 + 50, winY2 + 140, winR, 0, winB );	}	}
开发者ID:kylepollina,项目名称:Connect-Four,代码行数:27,


示例11: SetHighColor

voidBF_GUI_ColorView::Draw(BRect o_Rect){	// fill back //	SetHighColor(SYS_COLOR(BF_COLOR_DIALOG_BACK));	BRect oRect(Bounds());		FillRect(oRect);				// draw lines //	BPoint oPointTop(0,4),oPointBottom(0,oRect.Height()-4);	rgb_color oCol;	RGB_SET(oCol,0,0,0);	for(int32 i=0;i<256;i++){			SetHighColor(oCol);				StrokeLine(oPointTop,oPointBottom);				oPointTop.x++;		oPointBottom.x++;		if(iColorIndex==0) oCol.red++;else		if(iColorIndex==1) oCol.green++;else		if(iColorIndex==2) oCol.blue++;	}	DrawCursor(true);}
开发者ID:mmadia,项目名称:befar-svn_clone,代码行数:26,


示例12: dc

void PageSettingsTabs1::SetCursor(void){  CRect rectCursorAnim;  m_staticCursorAnim.GetClientRect(&rectCursorAnim);  CClientDC dc(m_staticCursorAnim.m_hWnd);  CBrush brush(::CreateSolidBrush(RGB(0,0,0)));  dc.FillRect(rectCursorAnim, brush);  rectCursorAnim.right  -= 12;  rectCursorAnim.right  /= 2;  rectCursorAnim.bottom -= 8;  m_cursor.reset();  m_cursor = CursorFactory::CreateCursor(    m_hWnd,    true,    static_cast<CursorStyle>(m_comboCursor.GetCurSel()),    dc,    rectCursorAnim,    m_tabData->crCursorColor,    this,    true);  DrawCursor();}
开发者ID:kevbui,项目名称:console,代码行数:25,


示例13: RegistLoop

void RegistLoop (double timestep ){	int ww = param.x_resolution;	int hh = param.y_resolution;	Music.Update ();    	check_gl_error();    ClearRenderContext ();    set_gl_options (GUI);    SetupGuiDisplay ();	TColor col;			update_ui_snow (timestep);	draw_ui_snow();	Tex.Draw (BOTTOM_LEFT, 0, hh - 256, 1);	Tex.Draw (BOTTOM_RIGHT, ww-256, hh-256, 1);	Tex.Draw (TOP_LEFT, 0, 0, 1);	Tex.Draw (TOP_RIGHT, ww-256, 0, 1);	Tex.Draw (T_TITLE_SMALL, CENTER, AutoYPosN (5), scale);//	DrawFrameX (area.left, area.top, area.right-area.left, area.bottom - area.top, //			0, colMBackgr, col, 0.2);	FT.AutoSizeN (3);	FT.SetColor (colWhite);	int top = AutoYPosN (24);	FT.DrawString (area.left, top, "Select your player name:");	FT.DrawString (area.left + framewidth + arrowwidth, top, "Select a character:");	FT.AutoSizeN (4);	if (curr_focus == 0) col = colDYell; else col = colWhite;	DrawFrameX (area.left, area.top, framewidth, frameheight, 3, colMBackgr, col, 1.0);	FT.SetColor (col);	FT.DrawString (area.left + 20, area.top, Players.GetName (curr_player));	Tex.DrawDirectFrame (Players.GetAvatarID (curr_player), 		area.left + 60, AutoYPosN (40), texsize, texsize, 3, colWhite);	if (curr_focus == 1) col = colDYell; else col = colWhite;	DrawFrameX (area.left + framewidth + arrowwidth, area.top, 		framewidth, frameheight, 3, colMBackgr, col, 1.0);	FT.SetColor (col);	FT.DrawString (area.left + framewidth + arrowwidth + 20, 		area.top, CharList[curr_character].name);	Tex.DrawDirectFrame (CharList[curr_character].preview, 		area.right - texsize - 60 - arrowwidth, 		AutoYPosN (40), texsize, texsize, 3, colWhite);	FT.SetColor (colWhite);	PrintArrow (0, (curr_player > 0));		PrintArrow (1, (curr_player < last_player));	PrintArrow (2, (curr_character > 0));		PrintArrow (3, (curr_character < last_character));	PrintTextButton (0, curr_focus);	PrintTextButton (1, curr_focus);	if (param.ice_cursor) DrawCursor ();    Winsys.SwapBuffers();} 
开发者ID:cdlewis,项目名称:extremetuxracer,代码行数:60,


示例14: dbw3_assert

/*-----------------------------------------------------------------*/void __fastcall CrFeld::EnableCursor(){    dbw3_assert(frm);    dbw3_assert(frm->CursorTimer);    DrawCursor();    frm->CursorTimer->Enabled = true;}
开发者ID:damianbrunold,项目名称:dbweave,代码行数:8,


示例15: DrawAnyCursor

/****	Draw the cursor and prepare tobe restored by HideAnyCursor again.**      Note: This function can be called, without calling HideAnyCursor first,**            which means that this function should re-use/free memory of the**            last call.**            When calling multiple times, the old cursor is expected to be**            overdrawn by something else (else HideAnyCursor is needed!)**            Also the cursors are not invalidated (refresh on real screen)**            here, but this is done by InvalidateCursorAreas.****  FIXME: event handler should be temporary stopped while copying**         CursorX,CursorY,.. because between two copy commands another**         event can occure, which let invalid mouse position be delivered.*/global void DrawAnyCursor(void){    // Disable any previous drawn cursor    OldCursorInvalidate=OldCursorW=	OldCursorRectangleInvalidate=OldCursorRectangleW=	BuildingCursor=0;    //    //	First, Selecting rectangle    //    if( CursorState==CursorStateRectangle	     && (CursorStartX!=CursorX || CursorStartY!=CursorY) ) {	DrawVisibleRectangleCursor(CursorStartX,CursorStartY,CursorX,CursorY);    }    //    //	Or Selecting position for building    //    else if( CursorBuilding && CursorOn==CursorOnMap ) {	DrawBuildingCursor();	BuildingCursor=1;    }    //    //	Last, Normal cursor.    //  This will also save (part of) drawn rectangle cursor, but that's ok.    //    DrawCursor(GameCursor,CursorX,CursorY,GameCursor->SpriteFrame);}
开发者ID:saniv,项目名称:freecraft-ale-clone,代码行数:42,


示例16: GameSelectLoop

static void GameSelectLoop (double time_step) {	int ww = param.x_resolution;	int hh = param.y_resolution;	check_gl_error();	Music.Update ();        set_gl_options (GUI);    ClearRenderContext ();    SetupGuiDisplay ();    	if (param.ui_snow) {		update_ui_snow (time_step);		draw_ui_snow();    }	Tex.Draw (T_TITLE, CENTER, AutoYPosN (5), param.scale);	Tex.Draw (BOTTOM_LEFT, 0, hh-256, 1);	Tex.Draw (BOTTOM_RIGHT, ww-256, hh-256, 1);	Tex.Draw (TOP_LEFT, 0, 0, 1);	Tex.Draw (TOP_RIGHT, ww-256, 0, 1);	PrintTextButton (0, scope);	PrintTextButton (1, scope);	PrintTextButton (2, scope);	PrintTextButton (3, scope);	PrintTextButton (4, scope);	PrintTextButton (5, scope);	PrintTextButton (6, scope);	if (param.ice_cursor) DrawCursor ();	Reshape (ww, hh);	Winsys.SwapBuffers ();}
开发者ID:cdlewis,项目名称:extremetuxracer,代码行数:33,


示例17: DrawGrid

/*-----------------------------------------------------------------*/void __fastcall TFixeinzugForm::pbFixeinzugPaint(TObject *Sender){    DrawGrid (pbFixeinzug);    DrawData (pbFixeinzug);    DrawRange();    DrawCursor();}
开发者ID:damianbrunold,项目名称:dbweave,代码行数:8,


示例18: dbw3_assert

/*-----------------------------------------------------------------*/void __fastcall TFixeinzugForm::pbFixeinzugMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y){    int i = X / dx;    int j = maxy-1 - (Y / dy);    dbw3_assert(i>=0);    dbw3_assert(j>=0);    if (i>=maxx || j>=maxy) return;    short old = einzug[scrollx+i];    if (old==j+1) einzug[scrollx+i] = 0;    else einzug[scrollx+i] = short(j+1);    changed = true;    CalcRange();    if (old!=0) {        pbFixeinzug->Canvas->Pen->Color = clBtnFace;        pbFixeinzug->Canvas->Brush->Color = clBtnFace;        pbFixeinzug->Canvas->Rectangle (i*dx+2, (maxy-old)*dy+2, (i+1)*dx-1, (maxy-old+1)*dy-1);    }    DrawData (pbFixeinzug, i);    DeleteCursor();    cx = i;    cy = j;    DeleteRange();    CalcRange();    DrawRange();    DrawCursor();}
开发者ID:damianbrunold,项目名称:dbweave,代码行数:30,


示例19: DrawAnyCursor

/****	Draw the cursor*/global void DrawAnyCursor(void){    RectangleCursor=BuildingCursor=0;    //    //	Selecting rectangle    //    if( CursorState==CursorStateRectangle	     && (CursorStartX!=CursorX || CursorStartY!=CursorY) ) {	DrawRectangleCursor();	RectangleCursor=1;    } else    //    //	Selecting position for building    //    if( CursorBuilding && CursorOn==CursorOnMap ) {	DrawBuildingCursor();	BuildingCursor=1;    }    //    //	Normal cursor.    //    DrawCursor(CloneCursor,CursorX,CursorY,0);}
开发者ID:saniv,项目名称:freecraft-ale-clone,代码行数:29,


示例20: max_c

voidViewBuffer::Draw(BRect updateRect){	if (fGlyphGrid) {		int32 startX	= max_c(0, (int32)(updateRect.left / CHAR_WIDTH));		int32 endX		= min_c(fColumns - 1, (int32)(updateRect.right / CHAR_WIDTH) + 1);		int32 startY	= max_c(0, (int32)(updateRect.top / CHAR_HEIGHT));		int32 endY		= min_c(fRows - 1, (int32)(updateRect.bottom / CHAR_HEIGHT) + 1);		char string[2];		string[1] = 0;		for (int32 y = startY; y <= endY; y++) {			for (int32 x = startX; x <= endX; x++) {				uint16 grid = fGlyphGrid[y * fColumns + x];				uint8 glyph = grid >> 8;				uint8 attr = grid & 0x00ff;				string[0] = glyph;				_RenderGlyph(x, y, string, attr, false);			}		}	}	DrawCursor(fCursorX, fCursorY);}
开发者ID:mmanley,项目名称:Antares,代码行数:25,


示例21: DrawFrame

void CWindowOPTION_TASKBAR::Draw(PCImg32 pDst){	int nLevel;	HDC hDC;	HFONT hFontOld;	COLORREF clText;	if (m_dwTimeDrawStart) {		goto Exit;	}	DrawFrame ();	clText		= RGB (1, 1, 1);	hDC			= m_pDib->Lock ();	hFontOld	= (HFONT)SelectObject (hDC, m_hFont);	SetBkMode (hDC, TRANSPARENT);	TextOut2 (hDC, 32, 16 + 16 * 0, "ON",	clText);	TextOut2 (hDC, 32, 16 + 16 * 1, "OFF",	clText);	SelectObject (hDC, hFontOld);	m_pDib->Unlock ();	DrawCursor (8, 16 + 16 * m_nPos);	m_dwTimeDrawStart = timeGetTime ();Exit:	nLevel = 100;	if (m_bActive == FALSE) {		nLevel = 60;	}	pDst->BltLevel (m_ptViewPos.x + 32, m_ptViewPos.y + 32, m_sizeWindow.cx, m_sizeWindow.cy, m_pDib, 0, 0, nLevel, TRUE);}
开发者ID:psgsgpsg,项目名称:scrapbookonline,代码行数:34,


示例22: DrawOpening

int DrawOpening(){	//int hoOldTime = GetCurrentTime();	if(lpOpening == NULL || lpLogin == NULL)		return FALSE;	if(WorkMode == OPENING_MODE)		lpOpening->Draw();	else if(WorkMode == LOGIN_MODE)		lpLogin->Draw();		if(lpD3DDevice && LoginEndFlag == FALSE)	{		lpD3DDevice->BeginScene();					/*			POINT mousePos;			GetCursorPos(&mousePos);			ScreenToClient(hwnd, &mousePos);			dsDrawTexImage(MatHoCursorDefault , mousePos.x, mousePos.y ,32,32,255);			*/			DrawCursor();		lpD3DDevice->EndScene();	}	if(LoginEndFlag)		CursorShowFlag = FALSE;	return TRUE;}
开发者ID:rafaellincoln,项目名称:Source-Priston-Tale,代码行数:30,


示例23: PutChar

asm .MODEL TINYint PutChar(unsigned char ch) /* public */{    int i;    /* unsigned short offset = GetVideoOffset(current_row,current_col); */    UnDrawCursor();    if(ch == '/n')    {        GoNextRow();    }    else if(ch == '/r')    {        GoFirstColumn();    }    else if(ch == '/t')    {        /* Make current_col align to a 4-character span */        i = 4 - (current_col % 4);        /* Although it is a recursive call, we will not make it true recursive */        for(;i > 0;i--) PutChar(' ');    }    else    {        video_char_ptr[current_offset] = ch;        video_char_ptr[current_offset + 1] = default_mode;        GoNextPosition();    }    DrawCursor();    return ch;}
开发者ID:wangziqi2013,项目名称:Simple-OS-Kernel,代码行数:31,


示例24: switch

/*-----------------------------------------------------------------*/void __fastcall TChoosePaletteForm::DummyEditKeyDown(TObject *Sender, WORD &Key, TShiftState Shift){    int x = index/GRIDSIZE;    int y = index%GRIDSIZE;    switch (Key) {        case VK_LEFT:            if (x>0) --x;            break;        case VK_RIGHT:            if (x<15) ++x;            break;        case VK_UP:            if (y>0) --y;            else if (x>0) { y=15; --x; }            break;        case VK_DOWN:            if (y<15) ++y;            else if (x<15) { y=0; ++x; }            break;    }    int newcol = x*GRIDSIZE+y;    if (newcol!=index && newcol<MAX_PAL_ENTRY) {        EraseCursor();        index = x*GRIDSIZE+y;        DrawCursor();    }}
开发者ID:damianbrunold,项目名称:dbweave,代码行数:33,


示例25: UpdateDisplay

/****  Display update.****  This functions updates everything on screen. The map, the gui, the**  cursors.*/void UpdateDisplay(void){	if (GameRunning || Editor.Running == EditorEditing) {		DrawMapArea();		DrawMessages();		if (CursorState == CursorStateRectangle) {			DrawCursor();		}		if (!BigMapMode) {			for (int i = 0; i < (int)UI.Fillers.size(); ++i) {				UI.Fillers[i].G->DrawSubClip(0, 0,					UI.Fillers[i].G->Width,					UI.Fillers[i].G->Height,					UI.Fillers[i].X, UI.Fillers[i].Y);			}			DrawMenuButtonArea();			UI.Minimap.Draw(UI.SelectedViewport->MapX, UI.SelectedViewport->MapY);			UI.Minimap.DrawCursor(UI.SelectedViewport->MapX,				UI.SelectedViewport->MapY);			UI.InfoPanel.Draw();			UI.ButtonPanel.Draw();			DrawResources();			UI.StatusLine.Draw();		}		DrawCosts();		DrawTimer();	}	DrawPieMenu(); // draw pie menu only if needed	DrawGuichanWidgets();		if (CursorState != CursorStateRectangle) {		DrawCursor();	}	//	// Update changes to display.	//	Invalidate();}
开发者ID:k1643,项目名称:StratagusAI,代码行数:52,


示例26: DrawCursor

void CComposingView::DrawForPinyin(    /* [in] */ ICanvas* canvas){    Float x, y, value;    Int32 top = 0;    x = mPaddingLeft + LEFT_RIGHT_MARGIN;    y = -(mFmi->GetTop(&top), top) + mPaddingTop;    mPaint->SetColor(mStrColor);    Int32 cursorPos = 0;    mDecInfo->GetCursorPosInCmpsDisplay(&cursorPos);    Int32 cmpsPos = cursorPos;    String cmpsStr;    mDecInfo->GetComposingStrForDisplay(&cmpsStr);    Int32 activeCmpsLen = 0;    mDecInfo->GetActiveCmpsDisplayLen(&activeCmpsLen);    if (cursorPos > activeCmpsLen) cmpsPos = activeCmpsLen;    canvas->DrawText(cmpsStr, 0, cmpsPos, x, y, mPaint);    x += (mPaint->MeasureText(cmpsStr, 0, cmpsPos, &value), value);    if (cursorPos <= activeCmpsLen) {        if (ComposingStatus_EDIT_PINYIN == mComposingStatus) {            DrawCursor(canvas, x);        }        canvas->DrawText(cmpsStr, cmpsPos, activeCmpsLen, x, y, mPaint);    }    x += (mPaint->MeasureText(cmpsStr, cmpsPos, activeCmpsLen, &value), value);    if ((Int32)cmpsStr.GetLength() > activeCmpsLen) {        mPaint->SetColor(mStrColorIdle);        Int32 oriPos = activeCmpsLen;        if (cursorPos > activeCmpsLen) {            if (cursorPos > (Int32)cmpsStr.GetLength()) cursorPos = cmpsStr.GetLength();            canvas->DrawText(cmpsStr, oriPos, cursorPos, x, y, mPaint);            x += (mPaint->MeasureText(cmpsStr, oriPos, cursorPos, &value), value);            if (ComposingStatus_EDIT_PINYIN == mComposingStatus) {                DrawCursor(canvas, x);            }            oriPos = cursorPos;        }        canvas->DrawText(cmpsStr, oriPos, cmpsStr.GetLength(), x, y, mPaint);    }}
开发者ID:XilongPei,项目名称:Elastos5,代码行数:46,


示例27: EventSelectLoop

void EventSelectLoop (double timestep) {	int ww = param.x_resolution;	int hh = param.y_resolution;	TColor col;			check_gl_error();   	set_gl_options (GUI );	Music.Update ();        ClearRenderContext ();	SetupGuiDisplay ();	if (param.ui_snow) {		update_ui_snow (timestep);		draw_ui_snow ();	}	Tex.Draw (T_TITLE_SMALL, CENTER, AutoYPosN (5), param.scale);	Tex.Draw (BOTTOM_LEFT, 0, hh-256, 1);	Tex.Draw (BOTTOM_RIGHT, ww-256, hh-256, 1);	Tex.Draw (TOP_LEFT, 0, 0, 1);	Tex.Draw (TOP_RIGHT, ww-256, 0, 1);	//	DrawFrameX (area.left, area.top, area.right-area.left, area.bottom - area.top, //			0, colMBackgr, colBlack, 0.2);	FT.AutoSizeN (3);	FT.SetColor (colWhite);	FT.DrawString (area.left, AutoYPosN (30), Trans.Text (6));	FT.DrawString (area.left,AutoYPosN (45), Trans.Text (7));	if (Events.IsUnlocked (curr_event, curr_cup) == false) {		FT.SetColor (colLGrey); 		FT.DrawString (CENTER, AutoYPosN (58), Trans.Text (10));	}	FT.AutoSizeN (4);	if (curr_focus == 0) col = colDYell; else col = colWhite;	DrawFrameX (area.left, frametop1, framewidth, frameheight, 3, colMBackgr, col, 1.0);	FT.SetColor (colDYell);	FT.DrawString (area.left + 20, frametop1, EventList[curr_event].name);	if (curr_focus == 1) col = colDYell; else col = colWhite;	DrawFrameX (area.left, frametop2, framewidth, frameheight, 3, colMBackgr, col, 1.0);	if (Events.IsUnlocked (curr_event, curr_cup)) FT.SetColor (colDYell); 		else FT.SetColor (colLGrey);	FT.DrawString (area.left + 20, frametop2, Events.GetCupTrivialName (curr_event, curr_cup));	PrintArrow (0, (curr_event > 0));		PrintArrow (1, (curr_event < last_event));	PrintArrow (2, (curr_cup > 0));		PrintArrow (3, (curr_cup < last_cup));	if (Events.IsUnlocked (curr_event, curr_cup)) PrintTextButton (0, curr_focus);	PrintTextButton (1, curr_focus);	if (param.ice_cursor) DrawCursor ();    SDL_GL_SwapBuffers ();}
开发者ID:cdlewis,项目名称:extremetuxracer,代码行数:58,


示例28: DrawCursor

LRESULT PageSettingsTabs1::OnTimer(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& /*bHandled*/){    if ((wParam == CURSOR_TIMER) && (m_cursor.get() != NULL))    {        DrawCursor();    }    return 0;}
开发者ID:ThomasWDonnelly,项目名称:console,代码行数:9,



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


C++ DrawFormatString函数代码示例
C++ DrawButton函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。