• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ iRect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: iView

iSpellListView::iSpellListView(iViewMgr* pViewMgr, IViewCmdHandler* pCmdHandler, const iRect& rect, uint32 uid, iHero* pOwner, bool bShowFavorites)
: iView(pViewMgr, rect, GENERIC_VIEWPORT, uid, Visible|Enabled)
, m_pCmdHandler(pCmdHandler)
, m_pOwner(pOwner)
, m_typeMask(0), m_curSel(MSP_INVALID) 
{
	sint32 bcnt = SSM_COUNT;
	if  (!bShowFavorites) bcnt--;

	sint32 btnW = iMAX<sint32>(rect.w/2,140) / bcnt;
	sint32 sbW = btnW*bcnt - 16;

	iPHScrollBar* pScrollBar = new iPHScrollBar(m_pMgr, this, iRect(sbW+1, 0, 15, rect.h-16), uid+1);
	AddChild(pScrollBar);
	m_pSpellListBox = new iSpellListBox(m_pMgr, this, iRect(0, 0, sbW, rect.h-16), uid, m_pOwner);
	AddChild(m_pSpellListBox);
	m_pSpellListBox->SetScrollBar(pScrollBar);

	AddChild(m_pSchoolSwitch = new iBarTabSwitch(pViewMgr, this, iRect(0, rect.h-15, btnW * bcnt, 15), bcnt, uid + 10));
	for (uint32 xx=0; xx<bcnt; ++xx) m_pSchoolSwitch->SetTabIcon(SCHOOL_SWITCH_ICONS[xx]);
	if (m_pOwner) {
		if (m_pOwner->GetSpellSetMode() == SSM_FAVORITES && !bShowFavorites) m_pSchoolSwitch->SetCurrentTab(SSM_ALL);
		else m_pSchoolSwitch->SetCurrentTab(m_pOwner->GetSpellSetMode());
	}

	iRect rrc(rect.size());
	rrc.DeflateRect(sbW + 16 + 5, 0, 0, 0);
	AddChild(m_pSpellButton = new iSpellBtn(m_pMgr, this, iRect(rrc.x + (rrc.w/2 - 30), 30, 61,36), uid + 20));
}
开发者ID:Reynmar,项目名称:pocketheroes,代码行数:29,代码来源:SpellListView.cpp


示例2: ClientRect

void iDlg_HallOfFame::OnCreateDlg()
{
	iRect clRect = ClientRect();

	// Buttons
	AddChild(new iTextButton(m_pMgr, this, iRect(clRect.x + clRect.w/2-55, clRect.y2()-DEF_BTN_HEIGHT, 50, DEF_BTN_HEIGHT), TRID_OK, DRC_OK));
	AddChild(new iTextButton(m_pMgr, this, iRect(clRect.x + clRect.w/2+5, clRect.y2()-DEF_BTN_HEIGHT, 50, DEF_BTN_HEIGHT), TRID_RESET, 1000));
}
开发者ID:Reynmar,项目名称:pocketheroes,代码行数:8,代码来源:Dlg_HallOfFame.cpp


示例3: iView

/*
 *	Hero Child
 */
iHeroChild::iHeroChild(iViewMgr* pViewMgr, IViewCmdHandler* pCmdHandler, iSimpleArray<iArtDragDropItem*>& competitors, const iPoint& pos)
: iView(pViewMgr, iRect(pos.x, pos.y, 320, 109), GENERIC_VIEWPORT, 200, Enabled | Visible), m_pHero(NULL), m_pFriend(NULL)
{
	AddChild(m_pPortrait = new iHeroBigPortBtn(pViewMgr, this, iRect(3,20,48,48), 201));
	AddChild(m_pArtBackPackCtrl = new iArtBackPackCtrl(competitors, pViewMgr, this, iPoint(55,20+18), iSize(32,30), 7, iArtBackPackCtrl::Horizontal, 120));
	AddChild(m_pSplitBtn = new iCheckButton(pViewMgr, this, iRect(m_Rect.w-23,m_Rect.h-38,20,36), PDGG_BTN_SPLIT, 140));
	AddChild(m_pArmyList = new iArmyListEx(pViewMgr,this,iPoint(3,53+18), m_pSplitBtn, iSize(41,36),110));
}
开发者ID:Reynmar,项目名称:pocketheroes,代码行数:11,代码来源:MeetView.cpp


示例4: View

IRCLobbyView::IRCLobbyView() 
    : View()
{
    lobby_connection=0;
    change_name=0;
    skipChatLines=0;
    lobby_view_height=184;
    total_displayed_servers=0;
    setSearchName("IRCLobbyView");
    setTitle("Lobby");
    setSubTitle("");

    setAllowResize(false);
    setAllowMove(false);
    setVisible(false);
    topViewableItem=0;

    moveTo(iXY(bodyTextRect.max.x-440, bodyTextRect.min.y + 170));

    iXY  area_size = iXY(440, lobby_view_height);
    resizeClientArea(area_size);

    int chat_y=lobby_view_height-(Surface::getFontHeight()*2);
    addButtonCenterText(iXY(getClientRect().getSizeX()-80, chat_y), 80,  "Refresh", "", buttonRefresh);
    szChat.init("  ", 255,39);
    cInputField* input = addInputField(iXY(4, chat_y), &szChat, "", true);
    input->setReturnAction(chatReturnPressed);

    server_list_end_y=(Surface::getFontHeight()*6);
    chat_list_end_y=getClientRect().getSizeY()-(Surface::getFontHeight()*2);
    server_list_end_x=(getClientRect().getSizeX()-12);

    iXY size(12, 12);
    iXY pos(getClientRect().getSizeX() - size.x, 0);
    serverUpButton.setLabel("-");
    serverUpButton.setBounds(iRect(pos, pos + size));
    add(&serverUpButton);

    pos.y= server_list_end_y-size.y;
    serverDownButton.setLabel("+");
    serverDownButton.setBounds(iRect(pos, pos + size));
    add(&serverDownButton);

    pos.y+=size.y;
    chatUpButton.setLabel("-");
    chatUpButton.setBounds(iRect(pos, pos + size));
    add(&chatUpButton);

    pos.y = chat_list_end_y-size.y;
    chatDownButton.setLabel("+");
    chatDownButton.setBounds(iRect(pos, pos + size));
    add(&chatDownButton);

    // XXX ugly ugly ugly
    if(!lobby_view)
        lobby_view = this;
} 
开发者ID:BackupTheBerlios,项目名称:netpanzer-svn,代码行数:57,代码来源:IRCLobbyView.cpp


示例5: iRect

// getClientRect
//---------------------------------------------------------------------------
// Purpose:
//---------------------------------------------------------------------------
iRect View::getClientRect() const
{
    if (getBordered()) {
        return iRect( borderSize,
                      borderSize + moveAreaHeight,
                      getSizeX() - borderSize,
                      getSizeY() - borderSize);
    }

    return iRect(0, 0, getSizeX(), getSizeY());

} // end View::getClientRect
开发者ID:BackupTheBerlios,项目名称:netpanzer-svn,代码行数:16,代码来源:View.cpp


示例6: ClientRect

void iDlg_TownList::OnCreateDlg()
{
	iRect clRect = ClientRect();

	AddChild(m_pTownList = new iTownListBox(m_pMgr, this, iRect(clRect.x+5, clRect.y+20, clRect.w-25-1, 130), 101, m_pOwner));
	AddChild(m_pScrollBar = new iPHScrollBar(m_pMgr, this, iRect(clRect.x+clRect.w-20,clRect.y+20,15,130), 102));
	m_pTownList->SetScrollBar(m_pScrollBar);

	sint32 npos = clRect.x + (clRect.w/2-65);
	AddChild(m_pbtnOk =  new iTextButton(m_pMgr,this,iRect(npos,clRect.y2()-DEF_BTN_HEIGHT,60,DEF_BTN_HEIGHT),m_okBtnText, DRC_OK, Visible));
	AddChild(new iTextButton(m_pMgr,this,iRect(npos+70,clRect.y2()-DEF_BTN_HEIGHT,60,DEF_BTN_HEIGHT),TRID_CANCEL, DRC_CANCEL));
}
开发者ID:Reynmar,项目名称:pocketheroes,代码行数:12,代码来源:Dlg_TownList.cpp


示例7: ClientRect

void iDlg_LeaveGuards::OnCreateDlg()
{
	iRect clRect = ClientRect();

	AddChild(m_pSplitBtn = new iCheckButton(m_pMgr, this, iRect(clRect.x+5+36*7,clRect.y+20,18,34*2+1), PDGG_BTN_SPLIT, 103));
	AddChild(m_pCnstArmyList = new iArmyListEx(m_pMgr,this,iPoint(clRect.x+5,clRect.y+20),m_pSplitBtn, iSize(35,34),101));
	m_pCnstArmyList->SetArmy(&m_pOwnCnst->Guard(), NULL, true);
	AddChild(m_pHeroArmyList = new iArmyListEx(m_pMgr,this,iPoint(clRect.x+5,clRect.y+55),m_pSplitBtn, iSize(35,34),102));
	m_pHeroArmyList->SetArmy(&m_pHero->Army(), m_pHero, false);
	m_pCnstArmyList->AddCompetitor(m_pHeroArmyList);
	m_pHeroArmyList->AddCompetitor(m_pCnstArmyList);

	AddChild(new iTextButton(m_pMgr, this, iRect((clRect.x+clRect.w/2)-20, clRect.y2()-DEF_BTN_HEIGHT, 40, DEF_BTN_HEIGHT), TRID_OK, DRC_OK));
}
开发者ID:iamale,项目名称:palm-heroes,代码行数:14,代码来源:Dlg_LeaveGuards.cpp


示例8: render

void
LoadingView::doDraw(Surface &viewArea, Surface &clientArea)
{
    if (dirty)
        render();

    screen->fill(Color::black);
    backgroundSurface.blt(clientArea, 0, 0);
    clientArea.FillRoundRect(iRect(165, 40, 635, 225), 10, Color::black);
    clientArea.RoundRect(iRect(165, 40, 635, 225), 10, Color::yellow);
    surface.blt(clientArea, 172, 45);

    View::doDraw(viewArea, clientArea);
}
开发者ID:BackupTheBerlios,项目名称:netpanzer-svn,代码行数:14,代码来源:LoadingView.cpp


示例9: ClientRect

void iDlg_BattleLog::OnCreateDlg()
{
	iRect clRect = ClientRect();
	AddChild(m_pLogList = new iTextListBox(m_pMgr, this, iRect(clRect.x+5,clRect.y+20,clRect.w-26,135), 101, m_log));
	AddChild(m_pScrollBar = new iPHScrollBar(m_pMgr, this, iRect(clRect.x+clRect.w-20,clRect.y+20,15,135), 102));
	m_pLogList->SetScrollBar(m_pScrollBar);
	if (m_pLogList->LBItemsCount() > m_pLogList->PageSize()) {
		// scroll list down
		sint32 npos = m_pLogList->LBItemsCount() - m_pLogList->PageSize();
		m_pScrollBar->SetCurPos(npos);
		m_pLogList->SetCurPos(npos);
	}
	AddChild(new iTextButton(m_pMgr,this,iRect(clRect.x+(clRect.w/2-20),clRect.y2()-DEF_BTN_HEIGHT,40,DEF_BTN_HEIGHT),TRID_OK, DRC_OK));
}
开发者ID:iamale,项目名称:palm-heroes,代码行数:14,代码来源:Dlg_BattleLog.cpp


示例10: OnCreateDlg

	void OnCreateDlg()
	{
		iRect clRect = ClientRect();
		AddChild(new iPHLabel(m_pMgr, iRect(clRect.x,clRect.y,clRect.w,15), gTextMgr[TRID_HARDWARE_KEYS_SETTINGS], AlignCenter, dlgfc_hdr));
		sint32 xpos = clRect.x + 10;
		sint32 ypos = clRect.y + 20;
		for (uint16 nn=0; nn<BAT_COUNT; ++nn) {
			AddChild(new iPHLabel(m_pMgr, iRect(xpos,ypos,80,DEF_BTN_HEIGHT), gTextMgr[TRID_HKEY_ACT_HELPMODE + nn], AlignRight, dlgfc_topic));
			AddChild(m_keyBtn[nn] = new iTextButton(m_pMgr, this, iRect(xpos+85, ypos, 70, DEF_BTN_HEIGHT), TRID_HKEY_NAME_ENTER + gSettings.ActionKey((ButtonActionType)nn), 100+nn));
			ypos += DEF_BTN_HEIGHT + 3;
		}

		AddChild(new iTextButton(m_pMgr,this,iRect(clRect.x+(clRect.w/2-20),clRect.y2()-DEF_BTN_HEIGHT,40,DEF_BTN_HEIGHT),TRID_OK, DRC_OK));
	}
开发者ID:Reynmar,项目名称:pocketheroes,代码行数:14,代码来源:Dlg_Settings.cpp


示例11: iView

/*
 *	Castle Toolbar
 */
iCastleToolBar::iCastleToolBar(iViewMgr* pViewMgr, IViewCmdHandler* pCmdHandler, const iRect& rect)
: iView(pViewMgr,rect,GENERIC_VIEWPORT,VPUID_CTLVIEWTOOLBAR,Visible|Enabled), m_pCastle(NULL)
{
	// Button with Popup
	AddChild(m_pCastleGlyphBtn = new iCastleGlyphBtn(pViewMgr, pCmdHandler, iRect(0,1,32,20), 150));

	// Tab switch
	m_pTabSwitch = new iBarTabSwitch(pViewMgr, pCmdHandler, iRect(33,1,CVT_COUNT*32,20), CVT_COUNT, 103);
	for (uint32 xx=0; xx<CVT_COUNT; ++xx) m_pTabSwitch->SetTabIcon(CVT_ICONS[xx]);
	m_pTabSwitch->SetCurrentTab(CVT_CONSTRUCT);
	AddChild(m_pTabSwitch);

	// Close button
	AddChild(new iIconButton(pViewMgr, pCmdHandler, iRect(rect.w-30,1,30,20),PDGG_BTN_CLOSE,VPUID_BTN_CLOSECITY));
}
开发者ID:iamale,项目名称:palm-heroes,代码行数:18,代码来源:CastleView.cpp


示例12: rc

void iDlg_CreatInfo::DoCompose(const iRect& clRect)
{
	iRect rc(clRect);

	// title
	gTextComposer.TextOut(dlgfc_hdr, gApp.Surface(),rc.point(),gTextMgr[m_cGroup.Type()*3+TRID_CREATURE_PEASANT_F2], iRect(rc.x,rc.y,rc.w,15),AlignCenter);
	rc.y+=15;

	// icon
	BlitIcon(gApp.Surface(),PDGG_MINIMON+m_cGroup.Type(),iRect(rc.x,rc.y,rc.w,45));
	rc.y+=45;

	// Perks
	if (CREAT_DESC[m_cGroup.Type()].perks != CPERK_NONE) rc.y+=15;

	// props
	iRect trc(rc.x,rc.y,90,12);
	iTextComposer::FontConfig fc(iTextComposer::FS_SMALL, RGB16(192,192,255));
	gTextComposer.TextOut(fc, gApp.Surface(),trc.point(),iStringT(gTextMgr[TRID_SKILL_ATTACK])+_T(" :"),trc,AlignTopRight); trc.y+=10;
	gTextComposer.TextOut(fc, gApp.Surface(),trc.point(),iStringT(gTextMgr[TRID_SKILL_DEFENCE])+_T(" :"),trc,AlignTopRight); trc.y+=10;
	gTextComposer.TextOut(fc, gApp.Surface(),trc.point(),iStringT(gTextMgr[TRID_SKILL_SHOTS])+_T(" :"),trc,AlignTopRight); trc.y+=10;
	gTextComposer.TextOut(fc, gApp.Surface(),trc.point(),iStringT(gTextMgr[TRID_SKILL_DAMAGE])+_T(" :"),trc,AlignTopRight); trc.y+=10;
	gTextComposer.TextOut(fc, gApp.Surface(),trc.point(),iStringT(gTextMgr[TRID_SKILL_HEALTH])+_T(" :"),trc,AlignTopRight); trc.y+=10;
	gTextComposer.TextOut(fc, gApp.Surface(),trc.point(),iStringT(gTextMgr[TRID_SKILL_SPEED])+_T(" :"),trc,AlignTopRight); trc.y+=10;
	gTextComposer.TextOut(fc, gApp.Surface(),trc.point(),iStringT(gTextMgr[TRID_SKILL_MORALE])+_T(" :"),trc,AlignTopRight); trc.y+=10;
	gTextComposer.TextOut(fc, gApp.Surface(),trc.point(),iStringT(gTextMgr[TRID_SKILL_LUCK])+_T(" :"),trc,AlignTopRight); trc.y+=10;

	trc = iRect(rc.x+95,rc.y,rc.w-105,12);
	iTextComposer::FontConfig tfc(iTextComposer::FS_SMALL, RGB16(255,220,192));
	iStringT tout;

	tout.Setf(_T("%d (%d)"),CREAT_DESC[m_cGroup.Type()].attack, CREAT_DESC[m_cGroup.Type()].attack+m_furtSkills.Value(FSK_ATTACK));
	gTextComposer.TextOut(tfc, gApp.Surface(),trc.point(),tout,trc,AlignTopLeft); trc.y+=10;
	tout.Setf(_T("%d (%d)"),CREAT_DESC[m_cGroup.Type()].defence, CREAT_DESC[m_cGroup.Type()].defence+m_furtSkills.Value(FSK_DEFENCE));
	gTextComposer.TextOut(tfc, gApp.Surface(),trc.point(),tout,trc,AlignTopLeft); trc.y+=10;
	if (CREAT_DESC[m_cGroup.Type()].shots) tout.Setf(_T("%d"),CREAT_DESC[m_cGroup.Type()].shots);
	else tout.Setf(_T("-"));
	gTextComposer.TextOut(tfc, gApp.Surface(),trc.point(),tout,trc,AlignTopLeft); trc.y+=10;
	tout.Setf(_T("%d - %d"),CREAT_DESC[m_cGroup.Type()].damage_min,CREAT_DESC[m_cGroup.Type()].damage_max);
	gTextComposer.TextOut(tfc, gApp.Surface(),trc.point(),tout,trc,AlignTopLeft); trc.y+=10;
	tout.Setf(_T("%d (%d)"),CREAT_DESC[m_cGroup.Type()].hits, CREAT_DESC[m_cGroup.Type()].hits+m_furtSkills.Value(FSK_HITS));
	gTextComposer.TextOut(tfc, gApp.Surface(),trc.point(),tout,trc,AlignTopLeft); trc.y+=10;
	tout.Setf(_T("%d (%d)"),CREAT_DESC[m_cGroup.Type()].speed, CREAT_DESC[m_cGroup.Type()].speed+m_furtSkills.Value(FSK_SPEED));
	gTextComposer.TextOut(tfc, gApp.Surface(),trc.point(),tout,trc,AlignTopLeft); trc.y+=10;
	sint32 morale = (CREAT_DESC[m_cGroup.Type()].perks&CPERK_UNDEAD)?0:(m_furtSkills.Value(FSK_MORALE)+m_moraleMod);
	gTextComposer.TextOut(tfc, gApp.Surface(),trc.point(),FormatNumber(morale,true),trc,AlignTopLeft); trc.y+=10;
	gTextComposer.TextOut(tfc, gApp.Surface(),trc.point(),FormatNumber(m_furtSkills.Value(FSK_LUCK),true),trc,AlignTopLeft); trc.y+=10;
}
开发者ID:iamale,项目名称:palm-heroes,代码行数:48,代码来源:Dlg_CreatInfo.cpp


示例13: doDraw

// doDraw
//---------------------------------------------------------------------------
void MiniMapView::doDraw(Surface &viewArea, Surface &clientArea)
{
    // border
    viewArea.drawRect(iRect(0,0,viewArea.getWidth(), viewArea.getHeight()),Color::gray);
    
//    GameTemplateView::doDraw(viewArea, clientArea);
} // end doDraw
开发者ID:BackupTheBerlios,项目名称:netpanzer-svn,代码行数:9,代码来源:MiniMapView.cpp


示例14: ComposeLBItem

	void ComposeLBItem(uint32 iIdx, bool bSel, const iRect& irc)
	{
		iTextComposer::FontConfig fc(dlgfc_plain);
		iRect rc=irc;

		if (bSel) {
			gGfxMgr.BlitTile(PDGG_CTILE, gApp.Surface(),rc);
			ButtonFrame(gApp.Surface(),rc,0);
		}

		rc.DeflateRect(2);
		iCastle* pCastle = *(m_pOwner->CastleFirst()+iIdx);

		// Glyph
		gApp.Surface().FillRect(iRect(rc.x,rc.y,34,22),cColor_Black);
		SpriteId sid = PDGG_CTL_SICONS + (pCastle->Proto()->Size()-1)*CTLT_COUNT + pCastle->Proto()->Type();
		gGfxMgr.Blit(sid,gApp.Surface(), iPoint(rc.x+1,rc.y+1));

		// Name
		rc.DeflateRect(36,0,0,0);
		rc.h = 10;
		gTextComposer.TextOut(dlgfc_topic,gApp.Surface(),rc,pCastle->Name(),rc,AlignTop);
		rc.y+=10;
		State state = GetItemState(iIdx);
		if (state == Occupied) {
			iTextComposer::FontConfig fc(iTextComposer::FS_SMALL,RGB16(255,128,128));
			gTextComposer.TextOut(fc,gApp.Surface(),rc,pCastle->Visitor()->Name(),rc,AlignTop);
		} else if (state == Normal) {
			iTextComposer::FontConfig fc(iTextComposer::FS_SMALL,RGB16(128,255,128));
			gTextComposer.TextOut(fc,gApp.Surface(),rc,gTextMgr[TRID_UNOCCUPIED],rc,AlignTop);
		} else {
			check(0);
		}
	}
开发者ID:Reynmar,项目名称:pocketheroes,代码行数:34,代码来源:Dlg_TownList.cpp


示例15: AddFrame

 void Sprite::LoadFromText(const char *text)
 {
     TextParser parser;
     parser.Parse(text);
     TextParser::NODE *node = NULL;
     if ((node = parser.GetNode("FILETYPE")) && node->values[0] == "SPRITE")
     {
         if ((node = parser.GetNode("RESOURCE")))
         {
             _texture = static_cast<Texture*>(LE_ResourceManager.GetResourceWithRegister(node->values[0].GetCharPtr())->data);
         }
         if ((node = parser.GetNode("FRAMES")))
         {
             for (size_t i = 0; i<node->children.count(); i++)
             {
                 TextParser::NODE *child = node->children[i];
                 if (child)
                 {
                     TextParser::NODE *node_rect = child->FindChild("RECT");
                     if (node_rect)
                     {
                         AddFrame(iRect(node_rect->values[0].ToInt(),
                             node_rect->values[1].ToInt(),
                             node_rect->values[2].ToInt(),
                             node_rect->values[3].ToInt()
                         ));
                     }
                 }
             }
         }
     }
 }
开发者ID:rasidin,项目名称:LimitEngine,代码行数:32,代码来源:LE_Sprite.cpp


示例16:

void
WorldInputCmdProcessor::draw()
{
    if (selection_box_active == true && box_press != box_release)
    {
        WorldViewInterface::getViewWindow(&world_win);
        iXY box1, box2;
        WorldViewInterface::worldXYtoClientXY(world_win, box_press, &box1);
        WorldViewInterface::worldXYtoClientXY(world_win, box_release, &box2);
        --box2.x;
        box2.y-=3;

        screen->drawRect(iRect(box1, box2), Color::white);
    }

    if (outpost_goal_selection != OBJECTIVE_NONE)
    {
        iXY mouse_pos;
        MouseInterface::getMousePosition( &mouse_pos.x, &mouse_pos.y );

        WorldViewInterface::getViewWindow( &world_win );
        iXY pos;
        WorldViewInterface::worldXYtoClientXY(world_win, output_pos_press,&pos);
        screen->drawLine(pos, mouse_pos, Color::blue);
    }
}
开发者ID:BackupTheBerlios,项目名称:netpanzer-svn,代码行数:26,代码来源:WorldInputCmdProcessor.cpp


示例17: iChildGameView

/*
 *	Castle view
 */
iCastleView::iCastleView()
: iChildGameView(false, CV_OVERLAND), m_curTab(-1), m_pCastle(NULL)
{
	AddChild(m_pChilds[0] = new iCnstTab(&gApp.ViewMgr(), this));
	AddChild(m_pChilds[1] = new iRecrTab(&gApp.ViewMgr()));
	AddChild(m_pChilds[2] = new iMGuildTab(&gApp.ViewMgr()));
	AddChild(m_pChilds[3] = new iMarketTab(&gApp.ViewMgr()));
	AddChild(m_pChilds[4] = new iTavernTab(&gApp.ViewMgr()));

	AddChild(new iInfoBar(&gApp.ViewMgr(), this, iRect(0,0,m_Rect.w,15)));
	AddChild(new iCastleTitleBar(&gApp.ViewMgr(),this,  iRect(0,15,m_Rect.w,22)));
	AddChild(m_pToolBar = new iCastleToolBar(&gApp.ViewMgr(),this, iRect(0,m_Rect.h-21,m_Rect.w,21)));

	SetCastle(gGame.Map().CurCastle());
	ShowPage(CVT_CONSTRUCT);
}
开发者ID:iamale,项目名称:palm-heroes,代码行数:19,代码来源:CastleView.cpp


示例18: size

void VehicleSelectionView::drawBar(const Surface &dest, const iXY &pos, int length, float percent)
{
    const PIX tickColor = Color::white;

    iXY size(int(float(length) * percent), CHAR_YPIX);

    dest.fillRect(iRect(pos.x, pos.y, pos.x + size.x, pos.y + size.y), Color::red);

    // Draw tick marks.

    //// Draw 3 major
    //int topY    = pos.y + size.y / 2;
    //int bottomY = pos.y + size.y;
    //
    //dest.drawVLine(pos.x + 0, topY, bottomY, tickColor);
    //dest.drawVLine(pos.x + length / 2 - 1, topY, bottomY, tickColor);
    //dest.drawVLine(pos.x + length - 1, topY, bottomY, tickColor);
    //
    //// Draw 4 minor
    //int oneSixth = length / 6;
    //topY    = pos.y + size.y - size.y / 4;
    //bottomY = pos.y + size.y;
    //
    //dest.drawVLine(pos.x + oneSixth - 1, topY, bottomY, tickColor);
    //dest.drawVLine(pos.x + oneSixth * 2 - 1, topY, bottomY, tickColor);
    //dest.drawVLine(pos.x + oneSixth * 4 - 1, topY, bottomY, tickColor);
    //dest.drawVLine(pos.x + oneSixth * 5 - 1, topY, bottomY, tickColor);
}
开发者ID:BackupTheBerlios,项目名称:netpanzer-svn,代码行数:28,代码来源:VehicleSelectionView.cpp


示例19: rc

void iDlg_TownList::DoCompose(const iRect& clRect)
{
	iRect rc(clRect);
	// title
	gTextComposer.TextOut(dlgfc_hdr, gApp.Surface(),rc.point(), m_title, iRect(rc.x,rc.y,rc.w,15),AlignTop);
	rc.y+=15;
}
开发者ID:Reynmar,项目名称:pocketheroes,代码行数:7,代码来源:Dlg_TownList.cpp


示例20: resize

// doDraw
//---------------------------------------------------------------------------
void RankView::doDraw(Surface &viewArea, Surface &clientArea)
{
    unsigned int flagHeight = ResourceManager::getFlag(0)->getHeight();
    unsigned int newheight = HEADER_HEIGHT
                             + (TABLE_BORDER * 2)
                             + (ENTRY_HEIGHT * PlayerInterface::countPlayers())
                             + DEFAULT_MOVE_AREA_HEIGHT
                             + (DEFAULT_BORDER_SIZE * 2);

    if ( newheight != (unsigned int)getSizeY() )
    {
        resize(WINDOW_WIDTH, newheight);
        return; // this frame draws nothing
    }
    
    bltViewBackground(viewArea);

    clientArea.drawButtonBorder(
            iRect(0, TABLE_BORDER_START, clientArea.getWidth()-1, clientArea.getHeight()-1),
            Color::gray64, Color::white);

    clientArea.bltStringShadowed(0, 16, table_header, Color::red, Color::gray64);
    drawPlayerStats(clientArea, flagHeight);

    View::doDraw(viewArea, clientArea);
} // end doDraw
开发者ID:Rominagrobis,项目名称:OldNetPanzer,代码行数:28,代码来源:RankView.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ iSetInputFile函数代码示例发布时间:2022-05-30
下一篇:
C++ i915_screen函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap