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" ); }
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); } }
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; } }
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); }
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); }
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); }
/* -- 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); }
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; } }
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); }
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; }
// // 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" ); }
//选择框消息处理 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; } }
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 ); }
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; } }
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; } else if (TaskResolved("task_middleage_gather_fennel")) { _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("MIDDLEAGE_MONK_ALREADY"), "", true, false); return true; } } if (strcmp(szObjectName, "middleage_millepertuis_zone") == 0) { if (!TaskResolved("task_middleage_gather_wort")) { SetVisible("middleage_millepertuis_zone", false); PickupSimple("middleage_millepertuis_img", "inv_middleage_wort"); ResolveTask("task_middleage_gather_wort"); return true; } else if (TaskResolved("task_middleage_gather_wort")) { _lpSceneDirector->getSequencer()->Talk(NULL, CHARACTER_POSX, CHARACTER_POSY, KStr("MIDDLEAGE_MONK_ALREADY"), "", true, false); return true; } } } return false; }
void BTextWidget::StartEdit(BRect bounds, BPoseView *view, BPose *pose) { if (!IsEditable()) return; // don't allow editing of the trash directory name if (pose->TargetModel()->IsTrash()) return; // don't allow editing of the "Disks" icon name if (pose->TargetModel()->IsRoot()) return; BEntry entry(pose->TargetModel()->EntryRef()); if (entry.InitCheck() == B_OK && !ConfirmChangeIfWellKnownDirectory(&entry, "rename")) return; // get bounds with full text length BRect rect(bounds); BRect textRect(bounds); rect.OffsetBy(-2, -1); rect.right += 1; BFont font; view->GetFont(&font); BTextView *textView = new BTextView(rect, "WidgetTextView", textRect, &font, 0, B_FOLLOW_ALL, B_WILL_DRAW); textView->SetWordWrap(false); DisallowMetaKeys(textView); fText->SetUpEditing(textView); textView->AddFilter(new BMessageFilter(B_KEY_DOWN, TextViewFilter)); rect.right = rect.left + textView->LineWidth() + 3; // center new width, if necessary if (view->ViewMode() == kIconMode || (view->ViewMode() == kListMode && fAlignment == B_ALIGN_CENTER)) { rect.OffsetBy(bounds.Width() / 2 - rect.Width() / 2, 0); } rect.bottom = rect.top + textView->LineHeight() + 1; textRect = rect.OffsetToCopy(2, 1); textRect.right -= 3; textRect.bottom--; textView->SetTextRect(textRect); textRect = view->Bounds(); bool hitBorder = false; if (rect.left < 1) rect.left = 1, hitBorder = true; if (rect.right > textRect.right) rect.right = textRect.right - 2, hitBorder = true; textView->MoveTo(rect.LeftTop()); textView->ResizeTo(rect.Width(), rect.Height()); BScrollView *scrollView = new BScrollView("BorderView", textView, 0, 0, false, false, B_PLAIN_BORDER); view->AddChild(scrollView); // configure text view switch (view->ViewMode()) { case kIconMode: textView->SetAlignment(B_ALIGN_CENTER); break; case kMiniIconMode: textView->SetAlignment(B_ALIGN_LEFT); break; case kListMode: textView->SetAlignment(fAlignment); break; } textView->MakeResizable(true, hitBorder ? NULL : scrollView); view->SetActivePose(pose); // tell view about pose SetActive(true); // for widget textView->SelectAll(); textView->MakeFocus(); // make this text widget invisible while we edit it SetVisible(false); ASSERT(view->Window()); // how can I not have a Window here??? if (view->Window()) // force immediate redraw so TextView appears instantly view->Window()->UpdateIfNeeded(); }
void OverviewThreadsWidget::closeEvent(QCloseEvent* pEvent) { SetVisible(false); }
bool CGUIControl::OnMessage(CGUIMessage& message) { if ( message.GetControlId() == GetID() ) { switch (message.GetMessage() ) { case GUI_MSG_SETFOCUS: // if control is disabled then move 2 the next control if ( !CanFocus() ) { CLog::Log(LOGERROR, "Control %u in window %u has been asked to focus, " "but it can't", GetID(), GetParentID()); return false; } SetFocus(true); { // inform our parent window that this has happened CGUIMessage message(GUI_MSG_FOCUSED, GetParentID(), GetID()); if (m_parentControl) m_parentControl->OnMessage(message); } return true; break; case GUI_MSG_LOSTFOCUS: { SetFocus(false); // and tell our parent so it can unfocus if (m_parentControl) m_parentControl->OnMessage(message); return true; } break; case GUI_MSG_VISIBLE: SetVisible(true, true); return true; break; case GUI_MSG_HIDDEN: SetVisible(false); return true; // Note that the skin <enable> tag will override these messages case GUI_MSG_ENABLED: SetEnabled(true); return true; case GUI_MSG_DISABLED: SetEnabled(false); return true; case GUI_MSG_WINDOW_RESIZE: // invalidate controls to get them to recalculate sizing information SetInvalid(); return true; } } return false; }
void Widget::Hide(bool fade) { SetVisible(false, fade); }
void Widget::Show(bool fade) { SetVisible(true, fade); }
void Sprite_Battler::Update() { if (sprite_name != battler->GetSpriteName() || hue != battler->GetHue()) { CreateSprite(); } if (!battler->IsHidden() && old_hidden != battler->IsHidden()) { SetOpacity(255); SetVisible(true); SetAnimationState(AnimationState_Idle); idling = true; } old_hidden = battler->IsHidden(); Sprite::Update(); ++cycle; if (battler->GetBattleAnimationId() <= 0) { // Animations for monster if (anim_state == AnimationState_Idle) { SetOpacity(255); idling = true; } else if (anim_state == AnimationState_Dead) { if (fade_out > 0) { fade_out -= 15; SetOpacity(std::max(0, fade_out)); } else { idling = true; } } else if (anim_state == AnimationState_Damage) { flash_counter = (flash_counter + 1) % 10; SetOpacity(flash_counter > 5 ? 50 : 255); if (cycle == 60) { SetAnimationState(AnimationState_Idle); idling = true; cycle = 0; } } else { if (cycle == 60) { SetAnimationState(AnimationState_Idle); idling = true; cycle = 0; } } } else if (anim_state > 0) { // Animations for allies if (Player::IsRPG2k3()) { if (animation) { animation->Update(); if (animation->IsDone()) { if (loop_state == LoopState_DefaultAnimationAfterFinish) { const RPG::State* state = battler->GetSignificantState(); if (state) { SetAnimationState(state->battler_animation_id + 1); } else { SetAnimationState(AnimationState_Idle); } idling = true; } animation->SetFrame(0); } return; } static const int frames[] = {0,1,2,1,0}; int frame = frames[cycle / 10]; if (frame == sprite_frame) return; const RPG::BattlerAnimation& anim = Data::battleranimations[battler->GetBattleAnimationId() - 1]; const RPG::BattlerAnimationExtension& ext = anim.base_data[anim_state - 1]; SetSrcRect(Rect(frame * 48, ext.battler_index * 48, 48, 48)); if (cycle == 40) { cycle = 0; if (loop_state == LoopState_DefaultAnimationAfterFinish) idling = true; } if (idling) { const RPG::State* state = battler->GetSignificantState(); int idling_anim = state ? state->battler_animation_id + 1 : AnimationState_Idle; if (idling_anim == 101) idling_anim = 7; if (idling_anim != anim_state) SetAnimationState(idling_anim); idling = true; } } } }
void ModelLoader::RenderDoorObjectUI(PDOOR door, bool target) { auto model = m_modelData[door->ID]; if (model) { bool visible = model->IsVisible(); ImGui::Checkbox("Render", &visible); ImGui::SameLine(); model->SetVisible(visible); bool highlight = model->IsHighlighted(); ImGui::Checkbox("Highlight", &highlight); model->SetHighlight(highlight); } else { ImGui::TextColored(ImColor(255, 0, 0), "No Model Data"); } if (target) { if (ImGui::TreeNode("Door Data")) { DumpDataUI(door, sizeof(_DOOR)); ImGui::TreePop(); } if (ImGui::TreeNode("Switch Data")) { DumpDataUI(door->pSwitch, sizeof(EQSWITCH)); ImGui::TreePop(); } } ImGui::Separator(); ImGui::Text("ID: %d Type: %d State: %d", door->ID, door->Type, door->State); if (door->ZonePoint != -1) { const char* zone = GetTeleportName(door->ZonePoint); ImGui::TextColored(ImColor(255, 255, 0), "Zone Point: %s (%d)", zone, door->ZonePoint); } ImGui::DragFloat3("Position", &door->Y); ImGui::DragFloat("Heading", &door->Heading); ImGui::DragFloat("Angle", &door->DoorAngle); ImGui::LabelText("Scale", "%.2f", GetDoorScale(door)); ImGui::DragFloat2("Top Speed 1", &door->TopSpeed1); ImGui::DragFloat3("Default Position", &door->DefaultY); ImGui::DragFloat("Default Heading", &door->DefaultHeading); ImGui::DragFloat("Default Angle", &door->DefaultDoorAngle); if (ImGui::Button("Target")) { CHAR temp[256]; sprintf_s(temp, "/doortarget id %d", door->ID); // would be nice if there was an easier way to do this. EzCommand(temp); } ImGui::SameLine(); if (ImGui::Button("Reset Position")) { door->X = door->DefaultX; door->Y = door->DefaultY; door->Z = door->DefaultZ; door->Heading = door->DefaultHeading; } ImGui::SameLine(); if (ImGui::Button("Click")) { ClickDoor(door); } }
BOOL CDiagramEntity::DoMessage( UINT msg, CDiagramEntity* /*sender*/, CWnd* from ) /* ============================================================ Function : CDiagramEntity::DoMessage Description : Message handler for the object. Return : BOOL - TRUE to stop further processing. Parameters : UINT msg - The message. CDiagramEntity* sender - Original sender of this message, or NULL if not an object. Usage : The container can send messages to all objects. The messages should lie in the range CMD_START to CMD_STOP inclusively - a few are already predefined in DiagramEntity.h. This function will be called as response to those messages. This mechanism is already used for sending back messages from CDiagramEditor to the relevant object when a object popup menu alternative is selected. ============================================================*/ { BOOL stop = FALSE; switch( msg ) { case CMD_CUT: if( m_parent && IsSelected() ) { stop = TRUE; m_parent->Cut( this ); } break; case CMD_COPY: if( m_parent && IsSelected() ) { stop = TRUE; m_parent->Copy( this ); } break; case CMD_UP: if( m_parent && IsSelected() ) { stop = TRUE; m_parent->Up( this ); } break; case CMD_DOWN: if( m_parent && IsSelected() ) { stop = TRUE; m_parent->Down( this ); } break; case CMD_FRONT: if( m_parent && IsSelected() ) { stop = TRUE; m_parent->Front( this ); } break; case CMD_BOTTOM: if( m_parent && IsSelected() ) { stop = TRUE; m_parent->Bottom( this ); } break; case CMD_DUPLICATE: if( m_parent && IsSelected() ) { stop = TRUE; m_parent->Duplicate( this ); Select( FALSE ); } break; case CMD_PROPERTIES: if( IsSelected() ) { ShowProperties( from ); // MOD stop = TRUE; } break; case CMD_FREEZE: if( IsSelected() ) { stop = FALSE; Freeze(TRUE); } break; case CMD_UNFREEZE_ALL: if( IsFreezed() ) { stop = FALSE; Freeze(FALSE); } break; case CMD_HIDE: if( IsSelected() ) { stop = FALSE; SetVisible(FALSE); } break; case CMD_HIDE_UNSEL: if( !IsSelected() ) { stop = FALSE; SetVisible(FALSE); } break; case CMD_UNHIDE_ALL: if( !IsVisible() ) { stop = FALSE; SetVisible(TRUE); } break; } return stop; }
HRESULT CXChildWnd::Create( CXFrame* pParent ) { CXFrame::Create(pParent); SetVisible(TRUE); return S_OK; }
void ReputationMgr::LoadFromDB(QueryResult* result) { // Set initial reputations (so everything is nifty before DB data load) Initialize(); // QueryResult *result = CharacterDatabase.PQuery("SELECT faction,standing,flags FROM character_reputation WHERE guid = '%u'",GetGUIDLow()); if (result) { do { Field* fields = result->Fetch(); FactionEntry const* factionEntry = sFactionStore.LookupEntry(fields[0].GetUInt32()); if (factionEntry && (factionEntry->reputationListID >= 0)) { FactionState* faction = &m_factions[factionEntry->reputationListID]; // update standing to current faction->Standing = int32(fields[1].GetUInt32()); uint32 dbFactionFlags = fields[2].GetUInt32(); if (dbFactionFlags & FACTION_FLAG_VISIBLE) SetVisible(faction); // have internal checks for forced invisibility if (dbFactionFlags & FACTION_FLAG_INACTIVE) SetInactive(faction, true); // have internal checks for visibility requirement if (dbFactionFlags & FACTION_FLAG_AT_WAR) // DB at war SetAtWar(faction, true); // have internal checks for FACTION_FLAG_PEACE_FORCED else // DB not at war { // allow remove if visible (and then not FACTION_FLAG_INVISIBLE_FORCED or FACTION_FLAG_HIDDEN) if (faction->Flags & FACTION_FLAG_VISIBLE) SetAtWar(faction, false); // have internal checks for FACTION_FLAG_PEACE_FORCED } // set atWar for hostile ForcedReactions::const_iterator forceItr = m_forcedReactions.find(factionEntry->ID); if (forceItr != m_forcedReactions.end()) { if (forceItr->second <= REP_HOSTILE) SetAtWar(faction, true); } else if (GetRank(factionEntry) <= REP_HOSTILE) SetAtWar(faction, true); // reset changed flag if values similar to saved in DB if (faction->Flags == dbFactionFlags) { faction->needSend = false; faction->needSave = false; } } } while (result->NextRow()); delete result; } }
void AWinControlBase::Hide() { SetVisible(false); }
bool HUD::Init( const std::string & texturepath, ContentManager & content, FONT & lcdfont, FONT & sansfont, FONT & sansfont_noshader, float displaywidth, float displayheight, bool debugon, std::ostream & error_output) { const float opacity = 0.8; const float screenhwratio = displayheight / displaywidth; const float barheight = 64.0 / displayheight; const float barwidth = 256.0 / displaywidth; TEXTUREINFO texinfo; texinfo.mipmap = false; texinfo.repeatu = false; texinfo.repeatv = false; float timerbox_lowery = 0; { timernode = hudroot.AddNode(); SCENENODE & timernoderef = hudroot.GetNode(timernode); float timerboxdimx = 96.0 / displaywidth; float timerboxdimy = 64.0 / displayheight; timerboxdraw = AddDrawable(timernoderef); DRAWABLE & timerboxdrawref = GetDrawable(timernoderef, timerboxdraw); TEXTUREINFO timerboxtexinfo; timerboxtexinfo.mipmap = false; timerboxtexinfo.repeatu = true; timerboxtexinfo.repeatv = false; std::tr1::shared_ptr<TEXTURE> timerboxtex; if (!content.load(texturepath, "timerbox.png", timerboxtexinfo, timerboxtex)) return false; float totalsizex = timerboxdimx * 6.05; float totalsizey = timerboxdimy * 2.0; float x = totalsizex * 0.5 - timerboxdimx * 0.65; float y = totalsizey * 0.5 - timerboxdimy * 0.25; float w = totalsizex - timerboxdimx * 2; float h = totalsizey - timerboxdimy * 2; timerboxverts.SetTo2DBox(x, y, w, h, timerboxdimx, timerboxdimy); timerbox_lowery = y + timerboxdimy * 0.5; timerboxdrawref.SetDiffuseMap(timerboxtex); timerboxdrawref.SetVertArray(&timerboxverts); timerboxdrawref.SetCull(false, false); timerboxdrawref.SetColor(1, 1, 1, opacity); timerboxdrawref.SetDrawOrder(0.1); float fontscaley = timerboxdimy * 0.4; float fontscalex = fontscaley * screenhwratio; float startx = timerboxdimx * 0.45 - timerboxdimx * 0.15; float xinc = timerboxdimx * 1.5; laptime_label.Init(timernoderef, sansfont, "Lap time:", startx, timerboxdimy*0.9-timerboxdimy*0.3, fontscalex, fontscaley); laptime_label.SetDrawOrder(timernoderef, 0.2); lastlaptime_label.Init(timernoderef, sansfont, "Last lap:", startx+xinc, timerboxdimy*.9-timerboxdimy*0.3, fontscalex, fontscaley); lastlaptime_label.SetDrawOrder(timernoderef, 0.2); bestlaptime_label.Init(timernoderef, sansfont, "Best lap:", startx+xinc*2.0, timerboxdimy*.9-timerboxdimy*0.3, fontscalex, fontscaley); bestlaptime_label.SetDrawOrder(timernoderef, 0.2); laptime.Init(timernoderef, lcdfont, "", startx, timerboxdimy*1.2-timerboxdimy*0.3, fontscalex, fontscaley); laptime.SetDrawOrder(timernoderef, 0.2); lastlaptime.Init(timernoderef, lcdfont, "", startx+xinc, timerboxdimy*1.2-timerboxdimy*0.3, fontscalex, fontscaley); lastlaptime.SetDrawOrder(timernoderef, 0.2); bestlaptime.Init(timernoderef, lcdfont, "", startx+xinc*2.0, timerboxdimy*1.2-timerboxdimy*0.3, fontscalex, fontscaley); bestlaptime.SetDrawOrder(timernoderef, 0.2); } { float fontscaley = barheight * 0.5; float fontscalex = screenhwratio * fontscaley; float x = fontscalex * 0.25; float y = timerbox_lowery + fontscaley; driftscoreindicator.Init(hudroot, sansfont, "", x, y, fontscalex, fontscaley); driftscoreindicator.SetDrawOrder(hudroot, 0.2); } { float fontscaley = barheight * 0.5; float fontscalex = screenhwratio * fontscaley; float x = fontscalex * 0.25; float y = timerbox_lowery + fontscaley * 2; lapindicator.Init(hudroot, sansfont, "", x, y, fontscalex, fontscaley); lapindicator.SetDrawOrder(hudroot, 0.2); } { float fontscaley = barheight * 0.5; float fontscalex = screenhwratio * fontscaley; float x = fontscalex * 0.25; float y = timerbox_lowery + fontscaley * 3; placeindicator.Init(hudroot, sansfont, "", x, y, fontscalex, fontscaley); placeindicator.SetDrawOrder(hudroot, 0.2); } { float fontscaley = barheight * 0.5; float fontscalex = screenhwratio * fontscaley; float x = 0.5; float y = 0.5; raceprompt.Init(hudroot, sansfont, "", x, y, fontscalex, fontscaley); raceprompt.SetDrawOrder(hudroot, 1.0); raceprompt.SetColor(hudroot, 1, 0, 0); } { float fontscaley = 0.02; float fontscalex = screenhwratio * fontscaley; debugnode = hudroot.AddNode(); SCENENODE & debugnoderef = hudroot.GetNode(debugnode); debugtextdraw1 = SetupText(debugnoderef, sansfont, debugtext1, "", 0.01, fontscaley, fontscalex, fontscaley, 1, 1, 1, 10); debugtextdraw2 = SetupText(debugnoderef, sansfont, debugtext2, "", 0.25, fontscaley, fontscalex, fontscaley, 1, 1, 1, 10); debugtextdraw3 = SetupText(debugnoderef, sansfont, debugtext3, "", 0.5, fontscaley, fontscalex, fontscaley, 1, 1, 1, 10); debugtextdraw4 = SetupText(debugnoderef, sansfont, debugtext4, "", 0.75, fontscaley, fontscalex, fontscaley, 1, 1, 1, 10); } #ifndef GAUGES std::tr1::shared_ptr<TEXTURE> bartex, progbartex; if (!content.load(texturepath, "hudbox.png", texinfo, bartex)) return false; if (!content.load(texturepath, "progressbar.png", texinfo, progbartex)) return false; rpmbar = AddDrawable(hudroot); rpmredbar = AddDrawable(hudroot); rpmbox = AddDrawable(hudroot); DRAWABLE & rpmboxref = GetDrawable(hudroot, rpmbox); rpmboxref.SetDiffuseMap(progbartex); rpmboxref.SetVertArray(&rpmboxverts); rpmboxref.SetDrawOrder(2); rpmboxref.SetCull(false, false); rpmboxref.SetColor(0.3, 0.3, 0.3, 0.4); DRAWABLE & rpmbarref = GetDrawable(hudroot, rpmbar); rpmbarref.SetDiffuseMap(progbartex); rpmbarref.SetVertArray(&rpmbarverts); rpmbarref.SetDrawOrder(3); rpmbarref.SetCull(false, false); rpmbarref.SetColor(1.0, 1.0, 1.0, 0.7); DRAWABLE & rpmredbarref = GetDrawable(hudroot, rpmredbar); rpmredbarref.SetDiffuseMap(progbartex); rpmredbarref.SetVertArray(&rpmredbarverts); rpmredbarref.SetColor(1.0, 0.2, 0.2, 0.7); rpmredbarref.SetDrawOrder(3); rpmredbarref.SetCull(false, false); //lower left bar bars.push_back(HUDBAR()); bars.back().Set(hudroot, bartex, 0.0 + barwidth * 0.5, 1.0-barheight*0.5, barwidth, barheight, opacity, false); //lower right bar bars.push_back(HUDBAR()); bars.back().Set(hudroot, bartex, 1.0 - barwidth * 0.175, 1.0-barheight*0.5, barwidth, barheight, opacity, false); { float fontscaley = barheight * 0.5; float fontscalex = screenhwratio * fontscaley; float y = 1.0 - fontscaley * 0.5; float x0 = screenhwratio * 0.02; float x1 = 1.0 - screenhwratio * 0.02; geartextdraw = SetupText(hudroot, lcdfont, geartext, "N", x0, y, fontscalex, fontscaley, 1, 1, 1, 4); mphtextdraw = SetupText(hudroot, lcdfont, mphtext, "0", x1, y, fontscalex, fontscaley, 1, 1, 1, 4); } { float fontscaley = barheight * 0.25; float fontscalex = screenhwratio * fontscaley; float x0 = 1 - barwidth * 0.6; float x1 = 1 - barwidth * 0.7; float y0 = 1 - fontscaley * 1.25; float y1 = 1 - fontscaley * 0.5; abs.Init(hudroot, sansfont, "ABS", x0, y0, fontscalex, fontscaley); abs.SetDrawOrder(hudroot, 4); abs.SetColor(hudroot, 0, 1, 0); tcs.Init(hudroot, sansfont, "TCS", x0, y1, fontscalex, fontscaley); tcs.SetDrawOrder(hudroot, 4); tcs.SetColor(hudroot, 1, 0.77, 0.23); gas.Init(hudroot, sansfont, "GAS", x1, y0, fontscalex, fontscaley); gas.SetDrawOrder(hudroot, 4); gas.SetColor(hudroot, 1, 0, 0); nos.Init(hudroot, sansfont, "NOS", x1, y1, fontscalex, fontscaley); nos.SetDrawOrder(hudroot, 4); nos.SetColor(hudroot, 0, 1, 0); } #else { FONT & gaugefont = sansfont_noshader; // gauge texture char white[] = {255, 255, 255, 255}; TEXTUREINFO tinfo; tinfo.data = white; tinfo.width = 1; tinfo.height = 1; tinfo.bytespp = 4; tinfo.mipmap = false; std::tr1::shared_ptr<TEXTURE> texture; content.load("", "white1x1", tinfo, texture); float r = 0.12; float x0 = 0.15; float x1 = 0.85; float y0 = 0.85; float h0 = r * 0.25; float w0 = screenhwratio * h0; float angle_min = 315.0 / 180.0 * M_PI; float angle_max = 45.0 / 180.0 * M_PI; rpmgauge.Set(hudroot, texture, gaugefont, screenhwratio, x0, y0, r, angle_min, angle_max, 0, maxrpm * 0.001, 1); speedgauge.Set(hudroot, texture, gaugefont, screenhwratio, x1, y0, r, angle_min, angle_max, 0, maxspeed * speedscale, 10); float w = w0; float h = h0; float x = x0 - gaugefont.GetWidth("rpm") * w * 0.5; float y = y0 - r * 0.5; DRAWABLE & rpmd = GetDrawable(hudroot, AddDrawable(hudroot)); rpmlabel.Set(rpmd, gaugefont, "rpm", x, y, w, h, 1, 1, 1); w = w0 * 0.65; h = h0 * 0.65; x = x0 - gaugefont.GetWidth("x1000") * w * 0.5; y = y0 - r * 0.5 + h; DRAWABLE & x1000d = GetDrawable(hudroot, AddDrawable(hudroot)); rpmxlabel.Set(x1000d, gaugefont, "x1000", x, y, w, h, 1, 1, 1); w = w0; h = h0; x = x1 - gaugefont.GetWidth("kph") * w * 0.5; y = y0 - r * 0.5; DRAWABLE & spdd = GetDrawable(hudroot, AddDrawable(hudroot)); speedlabel.Set(spdd, gaugefont, "kph", x, y, w, h, 1, 1, 1); w = w0 * 2; h = h0 * 2; x = x0 - w * 0.25; y = y0 + r * 0.64; geartextdraw = SetupText(hudroot, gaugefont, geartext, "N", x, y, w, h, 1, 1, 1); w = w0 * 1.5; h = h0 * 1.5; x = x1 - w * 0.3; y = y0 + r * 0.68; mphtextdraw = SetupText(hudroot, gaugefont, mphtext, "0", x, y, w, h, 1, 1, 1); } { float fontscaley = barheight * 0.25; float fontscalex = screenhwratio * fontscaley; float x0 = 1 - barwidth * 0.6; float x1 = 1 - barwidth * 0.7; float y0 = 1 - fontscaley * 1.25; float y1 = 1 - fontscaley * 0.5; abs.Init(hudroot, sansfont, "ABS", x0, y0, fontscalex, fontscaley); abs.SetDrawOrder(hudroot, 4); abs.SetColor(hudroot, 0, 1, 0); tcs.Init(hudroot, sansfont, "TCS", x0, y1, fontscalex, fontscaley); tcs.SetDrawOrder(hudroot, 4); tcs.SetColor(hudroot, 1, 0.77, 0.23); gas.Init(hudroot, sansfont, "GAS", x1, y0, fontscalex, fontscaley); gas.SetDrawOrder(hudroot, 4); gas.SetColor(hudroot, 1, 0, 0); nos.Init(hudroot, sansfont, "NOS", x1, y1, fontscalex, fontscaley); nos.SetDrawOrder(hudroot, 4); nos.SetColor(hudroot, 0, 1, 0); } #endif SetVisible(false); debug_hud_info = debugon; return true; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CDownloadSliderPanel::OnTick( void ) { SetVisible( ShouldDraw() ); }
void CServerBrowser::SetupUI( float fX, float fY, float fWidth, float fHeight ) { // Create the gui tab panel m_pTabs = m_pGUI->CreateTabPanel(); m_pTabs->SetPosition( Vector2( fX, fY ) ); m_pTabs->SetSize( Vector2( (fWidth - 260), fHeight ) ); m_pTabs->SetAlwaysOnTop( true ); // Create the players list m_pPlayers = m_pGUI->CreateTabPanel(); m_pPlayers->SetPosition( Vector2( ((fX + fWidth) - 250), fY ) ); m_pPlayers->SetSize( Vector2( 250, fHeight ) ); m_pPlayers->SetAlwaysOnTop( true ); // Create the status label m_pStatusLabel = m_pGUI->CreateLabel ( "", m_pGUI->GetDefaultFont( true ) ); m_pStatusLabel->SetSize ( Vector2 ( (fWidth - 260), 30 ) ); m_pStatusLabel->SetPosition ( Vector2 ( fX, (fY + fHeight + 10) ) ); // Create the players list tabs m_pPlayersTab = m_pPlayers->CreateTab( "Players" ); m_pRulesTab = m_pPlayers->CreateTab( "Rules" ); // Create the players grid list m_pPlayersGridList = m_pGUI->CreateGridList( m_pPlayersTab ); m_pPlayersGridList->SetPosition( Vector2( 1, 1 ) ); m_pPlayersGridList->SetSize( Vector2( 247, (fHeight - 26) ) ); m_pPlayersGridList->AddColumn ( "Name", 0.65f ); m_pPlayersGridList->AddColumn ( "Ping", 0.30f ); // Create the locked image m_pLockedImage = m_pGUI->CreateStaticImage(); m_pLockedImage->SetVisible( false ); m_pLockedImage->LoadFromFile( "locked.png", SharedUtility::GetAbsolutePath( "data\\gui\\images" ) ); m_pLockedImage->SetSize ( Vector2 ( 12, 12 ) ); // Create the tabs CreateTab( INTERNET, "Internet", (fWidth - 262), (fHeight - 26) ); CreateTab( HOSTED, "Hosted", (fWidth - 262), (fHeight - 26) ); // Hide the server browser SetVisible( false ); // Create the message box window m_pMessageBox = m_pGUI->CreateMessageBox ( "", "", "Close" ); m_pMessageBox->SetVisible ( false ); m_pMessageBox->GetWindow()->SetAlwaysOnTop ( true ); m_pMessageBox->SetButtonClickHandler ( 0, Button1ClickHandler, this ); // Create the quick connect window m_pQuickConnectWindow = m_pGUI->CreateWnd ( "Quick Connect" ); m_pQuickConnectWindow->SetSize ( Vector2 ( 260, 155 ) ); m_pQuickConnectWindow->SetPosition ( Vector2 ( (m_pGUI->GetResolution().fX / 2) - 150, (m_pGUI->GetResolution().fY / 2) - 77.5 ) ); m_pQuickConnectWindow->SetVisible ( false ); m_pQuickConnectWindow->SetAlwaysOnTop ( true ); m_pQuickConnectWindow->SetSizingEnabled ( false ); m_pQuickConnectWindow->SetAlpha ( 1.0f ); // Create the quick connect label m_pQuickConnectLabel = m_pGUI->CreateLabel ( "Enter the server IP, Port and Password:"******"last-server-ip")) != 0); // Create the quick connect IP input m_pQuickConnectAddress = m_pGUI->CreateEdit ( (bRestoreInformation ? CVAR_GET_STRING ( "last-server-ip" ) : "127.0.0.1"), m_pQuickConnectWindow ); m_pQuickConnectAddress->SetSize ( Vector2( 160, 24 ) ); m_pQuickConnectAddress->SetPosition ( Vector2 ( 18, 50 ) ); m_pQuickConnectAddress->SetClickHandler ( GUI_CALLBACK ( &CServerBrowser::Event_QuickConnectInputFocus, this ) ); // Create the quick connect port input m_pQuickConnectPort = m_pGUI->CreateEdit ( (bRestoreInformation ? String ( "%d", CVAR_GET_INTEGER ( "last-server-port" ) ) : "27015"), m_pQuickConnectWindow ); m_pQuickConnectPort->SetSize ( Vector2( 55, 24 ) ); m_pQuickConnectPort->SetPosition ( Vector2 ( 183, 50 ) ); m_pQuickConnectPort->SetClickHandler ( GUI_CALLBACK ( &CServerBrowser::Event_QuickConnectInputFocus, this ) ); // Create the quick connect password input m_pQuickConnectPassword = m_pGUI->CreateEdit ( (bRestoreInformation ? CVAR_GET_STRING ( "last-server-password" ) : ""), m_pQuickConnectWindow ); m_pQuickConnectPassword->SetSize ( Vector2( 220, 24 ) ); m_pQuickConnectPassword->SetPosition ( Vector2( 18, 85 ) ); m_pQuickConnectPassword->SetClickHandler ( GUI_CALLBACK ( &CServerBrowser::Event_QuickConnectInputFocus, this ) ); m_pQuickConnectPassword->SetMasked ( true ); // Create the quick connect submit button m_pQuickConnectSubmit = m_pGUI->CreateButton ( "Connect", m_pQuickConnectWindow ); m_pQuickConnectSubmit->SetSize ( Vector2 ( 75, 20 ) ); m_pQuickConnectSubmit->SetPosition ( Vector2 ( 18, 120 ) ); m_pQuickConnectSubmit->SetClickHandler ( GUI_CALLBACK( &CServerBrowser::Event_QuickConnectSubmitClick, this ) ); // Create the quick connect cancel button m_pQuickConnectCancel = m_pGUI->CreateButton ( "Cancel", m_pQuickConnectWindow ); m_pQuickConnectCancel->SetSize ( Vector2 ( 75, 20 ) ); m_pQuickConnectCancel->SetPosition ( Vector2 ( 100, 120 ) ); m_pQuickConnectCancel->SetClickHandler ( GUI_CALLBACK( &CServerBrowser::Event_QuickConnectCancelClick, this ) ); }
void ComicUIObject::Close() { SetVisible(false); SetEnabled(false); }