本文整理汇总了C++中CGuiLayout::moveWidgets方法的典型用法代码示例。如果您正苦于以下问题:C++ CGuiLayout::moveWidgets方法的具体用法?C++ CGuiLayout::moveWidgets怎么用?C++ CGuiLayout::moveWidgets使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGuiLayout
的用法示例。
在下文中一共展示了CGuiLayout::moveWidgets方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Dnr_ChallengeOpponent
///////////////////
// Challenge the opponent
void Dnr_ChallengeOpponent(int nLevel, int nType)
{
psDiner->bOppClicked = true;
psDiner->bGoodOffer = false;
// Setup the racing gui
cDinerLayout.Initialize();
// Level 1
// Top level choice
if(nLevel == 0) {
cDinerLayout.Add( new CButton("Drag race",-1), dng_drag, 335,230,0, 0);
cDinerLayout.Add( new CButton("Road race",-1), dng_road, 335,280,0, 0);
cDinerLayout.Add( new CButton("Forget it",-1), dng_cancel, 335,330,0, 0);
cDinerLayout.Add( new CDialog("Race", dlgs_small), dng_dlg, 0, 0, 230,200);
}
// Level 2
// Location
if(nLevel == 1) {
// Drag
if(nType == 0) {
for(int i=0; i<psDiner->nNumDragTracks; i++) {
cDinerLayout.Add(new CButton(psDiner->sDragTracks[i].szName,-1), dng_dragtrk1+i, 335,230+i*5,0, 0);
CButton *b = ((CButton *)cDinerLayout.getWidget(dng_dragtrk1+i));
if(b)
b->setSize(10);
}
cDinerLayout.Add( new CButton("Forget it",-1), dng_cancel, 335,330,0, 0);
cDinerLayout.Add( new CDialog("Race", dlgs_small), dng_dlg, 0, 0, 230,200);
}
}
// Level 3
// Bet
if(nLevel == 2) {
// Drag
if(nType == 0) {
cDinerLayout.Add( new CButton("For kicks",-1), dng_dragkicks, 335,220,0, 0);
cDinerLayout.Add( new CButton("$10",-1), dng_drag10, 335,260,0, 0);
cDinerLayout.Add( new CButton("$50",-1), dng_drag50, 335,300,0, 0);
cDinerLayout.Add( new CButton("Back",-1), dng_dragback, 335,350,0, 0);
cDinerLayout.Add( new CDialog("Race", dlgs_small), dng_dlg, 0, 0, 230,200);
}
}
cDinerLayout.moveWidgets(-270, 180);
}
示例2: Gar_SetupPartChange
///////////////////
// Setup a part change
void Gar_SetupPartChange(void)
{
// Initialize the dialog box for the part change
cPartDlg.Initialize();
if( tPartChange.iNutsGoingon )
cPartDlg.Add( new CButton("Add All",-1), 1, 340,255,75, 25 );
else
cPartDlg.Add( new CButton("Remove",-1), 1, 340,255,75, 25 );
cPartDlg.Add( new CButton("Repair",-1), 2, 340,300,75, 25 );
cPartDlg.Add( new CButton("Forget it",btn_forgit), 3, 340,345,120,25 );
cPartDlg.Add( new CDialog("Part Change",dlgs_small), 4, 35, 25, 300,200 );
cPartDlg.moveWidgets(240,-170);
}