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


C++ SetVisible函数代码示例

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


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

示例1: BaseClass

CFileListManager::CFileListManager( vgui::Panel *parent ) : BaseClass( parent, "FileListManager" )
{
	SetMultiselectEnabled( true );
	SetVisible( true );
	m_bRefreshRequired = false;

	SetSize( 800, 200 );
	SetPos( 100, 100 );

	AddColumn( this, CI_FILENAME );
	AddColumn( this, CI_PATH );
	AddColumn( this, CI_LOADED );
	AddColumn( this, CI_NUMELEMENTS );
	AddColumn( this, CI_CHANGED );
	AddColumn( this, CI_INPERFORCE );
	AddColumn( this, CI_OPENFOREDIT );

	SetSortColumn( 0 );

	Refresh();

	SetScheme( vgui::scheme()->LoadSchemeFromFile( "Resource/BoxRocket.res", "BoxRocket" ) );
//	LoadControlSettings( "resource/BxFileListManager.res" );
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:24,代码来源:FileListManager.cpp

示例2: CAnimatedInstanceModel

CRenderableAnimatedInstanceModel::CRenderableAnimatedInstanceModel(const std::string &Name, const std::string &CoreName)
{
  m_AnimatedInstanceModel = NULL;
  m_bIsOk = true;
  CAnimatedCoreModel * l_AnimatedCoreModel = CORE->GetAnimatedModelManager()->GetResource(CoreName);

  if (l_AnimatedCoreModel == NULL)
  {
    m_bIsOk = false;
  }
  else
  {
    m_AnimatedInstanceModel = new CAnimatedInstanceModel();
    m_AnimatedInstanceModel->Initialize(l_AnimatedCoreModel);
    m_AnimatedInstanceModel->InitD3D(CORE->GetRenderManager());
    
    SetName(Name);
    SetPitch(0.0);
    SetPosition(0.0);
    SetRoll(0.0);
    SetVisible(false);
    SetYaw(0.0);
  }
}
开发者ID:BGCX261,项目名称:zombigame-svn-to-git,代码行数:24,代码来源:RenderableAnimatedInstanceModel.cpp

示例3: SetParent

CGwenStart::CGwenStart( vgui::VPANEL parent ) : 
	vgui::Panel( NULL, "GwenStart" )
{
	SetParent( parent );
	SetVisible( false );
	int x, y, w, h;
	vgui::surface()->GetWorkspaceBounds( x, y, w, h );
	SetBounds( x, y, w, h );

	vgui::ISurface *surface = vgui::surface();
	if ( !g_pRenderer )
	{
		g_pRenderer = new Gwen::Renderer::VguiRenderer( surface, vgui::scheme() );
	}

	if ( !g_pSkin )
	{
		Gwen::Skin::TexturedBase *skin = new Gwen::Skin::TexturedBase();
		skin->SetRender( g_pRenderer );
		skin->Init( "gwen/DefaultSkin" );
		skin->SetDefaultFont( L"Tahoma", 11 );
		g_pSkin = skin;
	}
}
开发者ID:hekar,项目名称:gwen-vgui,代码行数:24,代码来源:Gwen.cpp

示例4: UIMGR

void CUITrade::OpenUI()
{
	if(IsVisible() == TRUE || GetHide() == FALSE )
		return;

	if (UIMGR()->GetInventory()->IsLocked() == TRUE ||
		UIMGR()->GetInventory()->IsLockedArrange() == TRUE)
	{
		UIMGR()->GetInventory()->ShowLockErrorMessage();
		return;
	}

	UIMGR()->GetInventory()->Lock(TRUE, TRUE, LOCK_TRADE);

	SetVisible(TRUE);
	Hide(FALSE);

	if (m_pBtnOk != NULL)
		m_pBtnOk->SetEnable(FALSE);

	UpdateItemList();

	UIMGR()->RearrangeOrder(UI_TRADE, TRUE);
}
开发者ID:RocketersAlex,项目名称:LCSource,代码行数:24,代码来源:UITrade.cpp

示例5: SetVisible

void
AxesArray::SetFromNode(DataNode *parentNode)
{
    if(parentNode == 0)
        return;

    DataNode *searchNode = parentNode->GetNode("AxesArray");
    if(searchNode == 0)
        return;

    DataNode *node;
    if((node = searchNode->GetNode("visible")) != 0)
        SetVisible(node->AsBool());
    if((node = searchNode->GetNode("ticksVisible")) != 0)
        SetTicksVisible(node->AsBool());
    if((node = searchNode->GetNode("autoSetTicks")) != 0)
        SetAutoSetTicks(node->AsBool());
    if((node = searchNode->GetNode("autoSetScaling")) != 0)
        SetAutoSetScaling(node->AsBool());
    if((node = searchNode->GetNode("lineWidth")) != 0)
        SetLineWidth(node->AsInt());
    if((node = searchNode->GetNode("axes")) != 0)
        axes.SetFromNode(node);
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:24,代码来源:AxesArray.C

示例6: Precache

void CASW_Queen_Divers::Spawn()
{
	BaseClass::Spawn();

	Precache();
	SetModel( ASW_QUEEN_DIVER_MODEL );
	SetMoveType( MOVETYPE_NONE );
	//SetSolid(SOLID_VPHYSICS);
	SetSolid( SOLID_BBOX );
	SetCollisionGroup( COLLISION_GROUP_NONE );
	m_takedamage = DAMAGE_YES;
	m_iHealth = 100;
	m_iMaxHealth = m_iHealth;
	int iIdleSeq = LookupSequence("idle");
	SetSequence(iIdleSeq);
	AddEffects(EF_NOSHADOW);
	SetVisible(false);	// stays hidden until we start a diver attack
	//VPhysicsInitStatic();	

	SetCollisionBounds(	Vector(-32, -100, -5), Vector(32, 100, 72) );

	SetThink( &CASW_Queen_Divers::AnimThink );
	SetNextThink( gpGlobals->curtime + 0.1f);
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:24,代码来源:asw_queen_divers_shared.cpp

示例7: PrevWord

/* -- Ctrl+cursor left key: to beginning of previous word -- */
static void PrevWord(WINDOW wnd)
{
    int savetop = wnd->wtop;
    int saveleft = wnd->wleft;
    ClearVisible(wnd);
    Backward(wnd);
    while (isWhite(*CurrChar))    {
        if (wnd->CurrLine == 0 && wnd->CurrCol == 0)
            break;
        Backward(wnd);
    }
    while (wnd->CurrCol != 0 && !isWhite(*CurrChar))
        Backward(wnd);
    if (isWhite(*CurrChar))
        Forward(wnd);
    SetVisible(wnd);
    if (wnd->wleft != saveleft)
        if (wnd->CurrCol >= saveleft)
            if (wnd->CurrCol - saveleft < ClientWidth(wnd))
                wnd->wleft = saveleft;
    SendMessage(wnd, KEYBOARD_CURSOR, WndCol, wnd->WndRow);
    if (wnd->wtop != savetop || wnd->wleft != saveleft)
        SendMessage(wnd, PAINT, 0, 0);
}
开发者ID:acutesoftware,项目名称:old_C_code,代码行数:25,代码来源:EDITBOX.C

示例8: SetVisible

void CUINPCEvent::Open(e_NpcEvent eNpcEvent, int iTradeId, int iIDTarget)
{
	SetVisible(true);
	m_iIDTarget = iIDTarget;
	m_iTradeID  = iTradeId;
	std::string szStr;

	switch(eNpcEvent)
	{
		case NPC_EVENT_ITEM_TRADE:
			szStr = "IDS_NPC_EVENT_TITLE_TRADE";//::_LoadStringFromResource(IDS_NPC_EVENT_TITLE_TRADE, szStr);
			m_pText_Title->SetString(szStr);
			if (m_pBtn_Repair)
			{
				if (m_pBtn_Repair->IsVisible())
				{
					m_pBtn_Repair->SetVisible(false);
					m_pText_Repair->SetVisible(false);
				}
			}
			break;

		case NPC_EVENT_TRADE_REPAIR:
			szStr = "IDS_NPCEVENT_TITLE_REPAIR";//::_LoadStringFromResource(IDS_NPCEVENT_TITLE_REPAIR, szStr);
			m_pText_Title->SetString(szStr);
			if (m_pBtn_Repair)
			{
				if (!m_pBtn_Repair->IsVisible())
				{
					m_pBtn_Repair->SetVisible(true);
					m_pText_Repair->SetVisible(true);
				}
			}
			break;
	}
}
开发者ID:sailei1,项目名称:knightonline,代码行数:36,代码来源:UINPCEvent.cpp

示例9: DisplayableObject

Demo3ObjectFinished::Demo3ObjectFinished(Demo3Main* pEngine, int iMapX, int iMapY)
: DisplayableObject(pEngine)
, m_pMainEngine( pEngine )
, m_iMapX(iMapX)
, m_iMapY(iMapY)
, m_iDir(0)
, m_iNextDir(0)
{
    // The ball coordinate will be the centre of the ball
    // Because we start drawing half the size to the top-left.
    m_iStartDrawPosX = -25;
    m_iStartDrawPosY = -25;

    // Record the ball size as both height and width
    m_iDrawWidth = 50;
    m_iDrawHeight = 50;
    
    // Out item at specific coordinates
    m_iPreviousScreenX = m_iCurrentScreenX = iMapX*50+25+25;
    m_iPreviousScreenY = m_iCurrentScreenY = iMapY*50+25+40;

    // And make it visible
    SetVisible(true);
}
开发者ID:robgolding,项目名称:g52cfj-cw1,代码行数:24,代码来源:Demo3ObjectFinished.cpp

示例10: Stop

int WebBrowserObject::BrowserClose(void)
{
    if (!IsVisible()) {
        return 0;
    }
    Stop();
    systemObject->UnregisterExternalEventHandler(this);
    Lock();
    SetVisible(0);
    // Destroy all children on close
    for (int i = 0; i < containedobjects.size(); i++) {
         if (!strcmp(containedobjects[i]->GetType(), "webbrowser")) {
             RemoveObject(containedobjects[i]);
         }
    }
    Unlock();
    OnEvent();
    FireEvent("OnClose");
    // In standalone mode exit application on main browser close
    if (!strcmp(systemObject->GetAppName(), "lmboxweb")) {
        gtk_main_quit();
    }
    return 0;
}
开发者ID:vseryakov,项目名称:lmbox,代码行数:24,代码来源:webbrowser.cpp

示例11: BaseClass

//
//	Name: CGUIListenServer
//	Author: Hekar Khani
//	Description: GUI Panel to replace Valve's CreateServer
//	Notes: 
//
CGUIListenServer::CGUIListenServer( vgui::VPANEL parent ) :
	BaseClass( NULL, "GUIListenServer" )
{	
	SetParent( parent );
	vgui::HScheme scheme = vgui::scheme()->LoadSchemeFromFile( "resource/SourceScheme.res", "SourceScheme" );
	SetScheme( scheme );
	LoadControlSettings( "Resource/UI/ListenServer.res" );

	SetVisible( false );
	SetSizeable( false );
	SetMoveable( false );
	SetSmallCaption( true );

	SetMaximizeButtonVisible( false );
	SetMinimizeButtonVisible( false );
	SetCloseButtonVisible( false );
	
	SetMenuButtonResponsive( true );
	SetDeleteSelfOnClose( false );

	GetPropertySheet()->SetSmallTabs( false );

	AddPage( new CPanelListenMain( this ), "Main" );
}
开发者ID:hekar,项目名称:luminousforts-codebase,代码行数:30,代码来源:GUI_ListenServer.cpp

示例12: switch

//选择框消息处理
void CChoosePanel::ReceiveMsg(CMessage msg)
{
	switch(msg.type)
	{
		//打开选择框,设置选项数目和标题
	case DEMO_MSG::MSG_OPEN_CHOOSE_PANEL:
		{
			SetNumOfItem(msg.p1);
			SetPanelTitle(*((std::string* )msg.p3));			
		}
		break;
		//添加选项
	case DEMO_MSG::MSG_SET_CHOOSE_ITEM:
		{
			AddItem(msg.p1, *((std::string* )msg.p3));

			//所有选项添加完成
			if (m_ChooseItems.size() > 0 && m_ChooseItems.size() == m_nNumOfItem)
			{
				for(TChooseItems::iterator iter = m_ChooseItems.begin(); iter != m_ChooseItems.end(); iter++)
				{
					m_pGui->AddCtrl(*iter);
				}

				m_pGui->SetNavMode(HGEGUI_UPDOWN | HGEGUI_CYCLED);
				m_pGui->SetFocus(m_ChooseItems[0]->GetId());
				m_pGui->Enter();
				//设置选择状态
				__SetChoosing(true);
				//设置选择框可见
				SetVisible(true);
			}
		}
		break;
	}
}
开发者ID:xiaohuajiao,项目名称:Demo,代码行数:37,代码来源:CChoosePanel.cpp

示例13: Frame

CDialog_NewCanvas::CDialog_NewCanvas( CNodeView *n, Panel *parent ) : Frame( parent, "newshader" )
{
	pNodeView = n;

	SetSizeable( false );
	SetVisible( true );

	SetMouseInputEnabled( true );
	SetKeyBoardInputEnabled( true );
	SetDeleteSelfOnClose( true );
	Activate();

	DoModal();

	m_pRadBut_Sm2 = new RadioButton( this, "rad_1", "SM 2.0b" );
	m_pRadBut_Sm3 = new RadioButton( this, "rad_2", "SM 3.0" );
	m_pRadBut_Sm2->SetSubTabPosition( 1 );
	m_pRadBut_Sm3->SetSubTabPosition( 1 );
	m_pRadBut_Sm3->SetSelected( true );

	LoadControlSettings("shadereditorui/vgui/dialog_newcanvas.res");

	SetTitle( "New shader", true );
}
开发者ID:Biohazard90,项目名称:source-shader-editor,代码行数:24,代码来源:vdialognew.cpp

示例14: ResolveTask

void Scene_Inca_Passage::MiniGameDone(const char *szGameName, bool bIsRevolved)
{
   if (strcmp(szGameName, "fresco3") == 0 && bIsRevolved) {
      // Artefact 1
      _lpSceneDirector->getSequencer()->ShowEmitter(NULL, "creeping_glow1", true);
      ESoundBank::getSound("reveal")->playSample();
      _lpSceneDirector->DropItem("inv_inca_cartouche1");
      ResolveTask("task_inca_repairfresco3");
      SetVisible("inca_cartouche1_wall", true);
      SetVisible("inca_artefact3", true);
      SetVisible("inca_stairsfresco3_zone", false);
      _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("INCA_ARTEFACT_APPEAR"), "", true, false);
   }

   if (strcmp(szGameName, "fresco4") == 0 && bIsRevolved) {
      // Artefact 2
      _lpSceneDirector->getSequencer()->ShowEmitter(NULL, "creeping_glow2", true);
      ESoundBank::getSound("reveal")->playSample();
      _lpSceneDirector->DropItem("inv_inca_cartouche2");
      ResolveTask("task_inca_repairfresco4");
      SetVisible("inca_cartouche2_wall", true);
      SetVisible("inca_artefact4", true);
      SetVisible("inca_stairsfresco4_zone", false);
      _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("INCA_ARTEFACT_APPEAR"), "", true, false);
   }

   if (!bIsRevolved) {
      
      if (strcmp(szGameName, "fresco3") == 0)
         _lpSceneDirector->getSequencer()->ShowImage(NULL, "inca_cartouche1_wall", false, true);
      if (strcmp(szGameName, "fresco4") == 0)
         _lpSceneDirector->getSequencer()->ShowImage(NULL, "inca_cartouche2_wall", false, true);

      _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("MIDDLEAGE_MONK_GATHERFAILED"), "", true, false);
      Init();
      return;
   }
}
开发者ID:CortlandNation9,项目名称:Gamecodeur,代码行数:38,代码来源:Scene_Inca_Passage.cpp

示例15: ResolveTask

bool Scene_Middleage_Mainscreen::ItemUsed(const char *szItemName, const char *szObjectName)
{
   if (strcmp(szItemName, "inv_middleage_sickle") == 0) {
      if (strcmp(szObjectName, "middleage_oak_zone") == 0) {
         if (!TaskResolved("task_middleage_getcork")) {
            ResolveTask("task_middleage_getcork");
            PickupMultiple("middleage_oak_zone", "inv_middleage_cork",-1);
            SetVisible("middleage_oak_zone", false);
            return true;
         }
         else {
            _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("MIDDLEAGE_MONK_ALREADY"), "", true, false);
            return true;
         }
      }

      if (strcmp(szObjectName, "middleage_ginkgo_zone") == 0) {
         if (!TaskResolved("task_middleage_gather_ginkgo")) {
            EMiniJeuBase *lpMiniJeu = new EMiniJeuMemoryPlant();
			((EMiniJeuMemoryPlant *)lpMiniJeu)->SetVariation(0);
            _lpSceneDirector->GoToMiniGame("ginkgo", lpMiniJeu);
            return true;
         }
         else if (TaskResolved("task_middleage_gather_ginkgo")) {
            _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("MIDDLEAGE_MONK_ALREADY"), "", true, false);
            return true;
         }
      }

      if (strcmp(szObjectName, "middleage_rue_zone") == 0) {
         if (!TaskResolved("task_middleage_gather_rue")) {
            EMiniJeuBase *lpMiniJeu = new EMiniJeuMemoryPlant();
			((EMiniJeuMemoryPlant *)lpMiniJeu)->SetVariation(1);
            _lpSceneDirector->GoToMiniGame("rue", lpMiniJeu);
            return true;
         }
         else if (TaskResolved("task_middleage_gather_rue")) {
            _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("MIDDLEAGE_MONK_ALREADY"), "", true, false);
            return true;
         }      
      }

      if (strcmp(szObjectName, "middleage_aneth_zone") == 0) {
         if (!TaskResolved("task_middleage_gather_dill")) {
            SetVisible("middleage_aneth_zone", false);
            PickupSimple("middleage_aneth_img", "inv_middleage_dill");
            ResolveTask("task_middleage_gather_dill");
            return true;
         }
         else if (TaskResolved("task_middleage_gather_dill")) {
            _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("MIDDLEAGE_MONK_ALREADY"), "", true, false);
            return true;
         }
      }
      
      if (strcmp(szObjectName, "middleage_cerfeuil_zone") == 0) {
         if (!TaskResolved("task_middleage_gather_chervil")) {
            SetVisible("middleage_cerfeuil_zone", false);
            PickupSimple("middleage_cerfeuil_img", "inv_middleage_chervil");
            ResolveTask("task_middleage_gather_chervil");
            return true;
         }
         else if (TaskResolved("task_middleage_gather_chervil")) {
            _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("MIDDLEAGE_MONK_ALREADY"), "", true, false);
            return true;
         }      
      }
      
      if (strcmp(szObjectName, "middleage_ail_zone") == 0) {
         if (!TaskResolved("task_middleage_gather_garlic")) {
            EMiniJeuBase *lpMiniJeu = new EMiniJeuMemoryPlant();
			((EMiniJeuMemoryPlant *)lpMiniJeu)->SetVariation(1);
            _lpSceneDirector->GoToMiniGame("ail", lpMiniJeu);
            return true;
         }
         else if (TaskResolved("task_middleage_gather_garlic")) {
            _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("MIDDLEAGE_MONK_ALREADY"), "", true, false);
            return true;
         }      
      }
      
      if (strcmp(szObjectName, "middleage_pavot_zone") == 0) {
         if (!TaskResolved("task_middleage_gather_poppy")) {
            EMiniJeuBase *lpMiniJeu = new EMiniJeuMemoryPlant();
			((EMiniJeuMemoryPlant *)lpMiniJeu)->SetVariation(2);
            _lpSceneDirector->GoToMiniGame("pavot", lpMiniJeu);
            return true;
         }
         else if (TaskResolved("task_middleage_gather_poppy")) {
            _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("MIDDLEAGE_MONK_ALREADY"), "", true, false);
            return true;
         }
      }
      
      if (strcmp(szObjectName, "middleage_fenouil_zone") == 0) {
         if (!TaskResolved("task_middleage_gather_fennel")) {
            SetVisible("middleage_fenouil_zone", false);
            PickupSimple("middleage_fenouil_img", "inv_middleage_fennel");
            ResolveTask("task_middleage_gather_fennel");
            return true;
//.........这里部分代码省略.........
开发者ID:CortlandNation9,项目名称:Gamecodeur,代码行数:101,代码来源:Scene_Middleage_Mainscreen.cpp


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