void WndCommand::Update(float dt) { if (m_bShow) { int id = m_pContainer->Update(dt); if (id == -1) { m_pContainer->Enter(); } else if (id == eControlID_AttackButton) { if(m_pChar) { m_pChar->SetActionStage(eActionStage_AttackStage); SetShow(false); } m_pContainer->Leave(); } else if (id == eControlID_FinishButton) { if(m_pChar) { m_pChar->SetFinish(true); SetShow(false); } m_pContainer->Leave(); } } }
// Update void EmMainRefresh(HWND hWnd, RPC *r) { RPC_ENUM_DEVICE t; // Validate arguments if (hWnd == NULL || r == NULL) { return; } Zero(&t, sizeof(t)); if (CALL(hWnd, EcEnumDevice(r, &t))) { UINT i; LVB *b; b = LvInsertStart(); for (i = 0;i < t.NumItem;i++) { wchar_t tmp[MAX_PATH]; RPC_ENUM_DEVICE_ITEM *dev = &t.Items[i]; StrToUni(tmp, sizeof(tmp), dev->DeviceName); LvInsertAdd(b, dev->Active ? ICO_NIC_ONLINE : ICO_NIC_OFFLINE, NULL, 2, tmp, dev->Active ? _UU("EM_MAIN_OK") : _UU("EM_MAIN_ERROR")); } LvInsertEnd(b, hWnd, L_LIST); FreeRpcEnumDevice(&t); SetShow(hWnd, B_LICENSE, t.IsLicenseSupported); } else { Close(hWnd); } EmMainUpdate(hWnd, r); }