mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Added reload button in ghost menu
This commit is contained in:
parent
5b3e9e4bbf
commit
1e845a4020
|
@ -85,7 +85,6 @@ private:
|
||||||
static void GetNetObjCharacter(CNetObj_Character *pChar, const CGhostCharacter *pGhostChar);
|
static void GetNetObjCharacter(CNetObj_Character *pChar, const CGhostCharacter *pGhostChar);
|
||||||
|
|
||||||
void AddInfos(const CNetObj_Character *pChar);
|
void AddInfos(const CNetObj_Character *pChar);
|
||||||
int GetSlot() const;
|
|
||||||
|
|
||||||
void StartRecord();
|
void StartRecord();
|
||||||
void StopRecord(int Time = -1);
|
void StopRecord(int Time = -1);
|
||||||
|
@ -107,6 +106,7 @@ public:
|
||||||
virtual void OnMessage(int MsgType, void *pRawMsg);
|
virtual void OnMessage(int MsgType, void *pRawMsg);
|
||||||
virtual void OnMapLoad();
|
virtual void OnMapLoad();
|
||||||
|
|
||||||
|
int GetSlot() const;
|
||||||
int Load(const char *pFilename);
|
int Load(const char *pFilename);
|
||||||
void Unload(int Slot);
|
void Unload(int Slot);
|
||||||
|
|
||||||
|
|
|
@ -1138,8 +1138,9 @@ void CMenus::RenderGhost(CUIRect MainView)
|
||||||
static int s_GhostButton = 0;
|
static int s_GhostButton = 0;
|
||||||
static int s_DeleteButton = 0;
|
static int s_DeleteButton = 0;
|
||||||
static int s_SaveButton = 0;
|
static int s_SaveButton = 0;
|
||||||
|
static int s_ReloadButton = 0;
|
||||||
|
|
||||||
if(pGhost->HasFile())
|
if(pGhost->HasFile() && (pGhost->Active() || m_pClient->m_pGhost->GetSlot() != -1))
|
||||||
{
|
{
|
||||||
Status.VSplitRight(120.0f, &Status, &Button);
|
Status.VSplitRight(120.0f, &Status, &Button);
|
||||||
|
|
||||||
|
@ -1176,4 +1177,12 @@ void CMenus::RenderGhost(CUIRect MainView)
|
||||||
if(DoButton_Menu(&s_SaveButton, Localize("Save"), 0, &Button))
|
if(DoButton_Menu(&s_SaveButton, Localize("Save"), 0, &Button))
|
||||||
m_pClient->m_pGhost->SaveGhost(pGhost);
|
m_pClient->m_pGhost->SaveGhost(pGhost);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Status.VSplitLeft(120.0f, &Button, &Status);
|
||||||
|
|
||||||
|
if(DoButton_Menu(&s_ReloadButton, Localize("Reload"), 0, &Button))
|
||||||
|
{
|
||||||
|
m_pClient->m_pGhost->UnloadAll();
|
||||||
|
GhostlistPopulate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue