mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Implement Refresh
This commit is contained in:
parent
f8bf8c33c6
commit
3964960d31
2 changed files with 12 additions and 5 deletions
|
@ -61,11 +61,12 @@ Event EV_UIInstantAction_Refresh
|
|||
"Refresh the server list"
|
||||
);
|
||||
|
||||
|
||||
CLASS_DECLARATION(UIWidget, UIInstantAction, NULL) {
|
||||
{&EV_UIInstantAction_AcceptServer, &UIInstantAction::Connect },
|
||||
{&EV_UIInstantAction_RejectServer, &UIInstantAction::Reject },
|
||||
{&EV_UIInstantAction_Cancel, &UIInstantAction::CancelRefresh},
|
||||
{&EV_UIInstantAction_Refresh, NULL },
|
||||
{&EV_UIInstantAction_Refresh, &UIInstantAction::Refresh },
|
||||
{NULL, NULL }
|
||||
};
|
||||
|
||||
|
@ -542,6 +543,11 @@ void UIInstantAction::CancelRefresh(Event *ev)
|
|||
ServerListHalt(serverList[1]);
|
||||
}
|
||||
|
||||
void UIInstantAction::Refresh(Event *ev)
|
||||
{
|
||||
state = IA_INITIALIZE;
|
||||
}
|
||||
|
||||
void UIInstantAction::EnableServerInfo(bool enable)
|
||||
{
|
||||
if (enable) {
|
||||
|
|
|
@ -28,11 +28,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include "../gamespy/goaceng.h"
|
||||
|
||||
typedef struct {
|
||||
int serverType;
|
||||
int serverType;
|
||||
} ServerGame_t;
|
||||
|
||||
typedef struct {
|
||||
GServer server;
|
||||
GServer server;
|
||||
ServerGame_t serverGame;
|
||||
bool rejected;
|
||||
} IAServer_t;
|
||||
|
@ -65,12 +65,13 @@ public:
|
|||
void Reject(Event *ev);
|
||||
void Draw();
|
||||
void Update();
|
||||
int AddServer(GServer server, const ServerGame_t& serverGame);
|
||||
int AddServer(GServer server, const ServerGame_t& serverGame);
|
||||
void CancelRefresh(Event *ev);
|
||||
void Refresh(Event *ev);
|
||||
void EnableServerInfo(bool enable);
|
||||
|
||||
private:
|
||||
static void IAServerListCallBack(GServerList serverlist, int msg, void* instance, void* param1, void* param2);
|
||||
static void IAServerListCallBack(GServerList serverlist, int msg, void *instance, void *param1, void *param2);
|
||||
|
||||
private:
|
||||
bool doneList[2];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue