mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- fixed some issues in the menu code.
This commit is contained in:
parent
82e4104900
commit
46dc77cc64
3 changed files with 33 additions and 32 deletions
|
@ -132,12 +132,40 @@ DEFINE_ACTION_FUNCTION_NATIVE(DMenuDescriptor, GetDescriptor, GetMenuDescriptor)
|
||||||
ACTION_RETURN_OBJECT(GetMenuDescriptor(name.GetIndex()));
|
ACTION_RETURN_OBJECT(GetMenuDescriptor(name.GetIndex()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DListMenuDescriptor::Reset()
|
||||||
|
{
|
||||||
|
// Reset the default settings (ignore all other values in the struct)
|
||||||
|
mSelectOfsX = 0;
|
||||||
|
mSelectOfsY = 0;
|
||||||
|
mSelector.SetInvalid();
|
||||||
|
mDisplayTop = 0;
|
||||||
|
mXpos = 0;
|
||||||
|
mYpos = 0;
|
||||||
|
mLinespacing = 0;
|
||||||
|
mNetgameMessage = "";
|
||||||
|
mFont = NULL;
|
||||||
|
mFontColor = CR_UNTRANSLATED;
|
||||||
|
mFontColor2 = CR_UNTRANSLATED;
|
||||||
|
mFromEngine = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
size_t DListMenuDescriptor::PropagateMark()
|
size_t DListMenuDescriptor::PropagateMark()
|
||||||
{
|
{
|
||||||
for (auto item : mItems) GC::Mark(item);
|
for (auto item : mItems) GC::Mark(item);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DOptionMenuDescriptor::Reset()
|
||||||
|
{
|
||||||
|
// Reset the default settings (ignore all other values in the struct)
|
||||||
|
mPosition = 0;
|
||||||
|
mScrollTop = 0;
|
||||||
|
mIndent = 0;
|
||||||
|
mDontDim = 0;
|
||||||
|
mFont = BigUpper;
|
||||||
|
}
|
||||||
|
|
||||||
size_t DOptionMenuDescriptor::PropagateMark()
|
size_t DOptionMenuDescriptor::PropagateMark()
|
||||||
{
|
{
|
||||||
for (auto item : mItems) GC::Mark(item);
|
for (auto item : mItems) GC::Mark(item);
|
||||||
|
|
|
@ -89,23 +89,7 @@ public:
|
||||||
bool mCenter;
|
bool mCenter;
|
||||||
bool mFromEngine;
|
bool mFromEngine;
|
||||||
|
|
||||||
void Reset()
|
void Reset();
|
||||||
{
|
|
||||||
// Reset the default settings (ignore all other values in the struct)
|
|
||||||
mSelectOfsX = 0;
|
|
||||||
mSelectOfsY = 0;
|
|
||||||
mSelector.SetInvalid();
|
|
||||||
mDisplayTop = 0;
|
|
||||||
mXpos = 0;
|
|
||||||
mYpos = 0;
|
|
||||||
mLinespacing = 0;
|
|
||||||
mNetgameMessage = "";
|
|
||||||
mFont = NULL;
|
|
||||||
mFontColor = CR_UNTRANSLATED;
|
|
||||||
mFontColor2 = CR_UNTRANSLATED;
|
|
||||||
mFromEngine = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t PropagateMark() override;
|
size_t PropagateMark() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -138,20 +122,9 @@ public:
|
||||||
|
|
||||||
void CalcIndent();
|
void CalcIndent();
|
||||||
DMenuItemBase *GetItem(FName name);
|
DMenuItemBase *GetItem(FName name);
|
||||||
void Reset()
|
void Reset();
|
||||||
{
|
|
||||||
// Reset the default settings (ignore all other values in the struct)
|
|
||||||
mPosition = 0;
|
|
||||||
mScrollTop = 0;
|
|
||||||
mIndent = 0;
|
|
||||||
mDontDim = 0;
|
|
||||||
mFont = BigUpper;
|
|
||||||
|
|
||||||
}
|
|
||||||
size_t PropagateMark() override;
|
size_t PropagateMark() override;
|
||||||
~DOptionMenuDescriptor()
|
~DOptionMenuDescriptor() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -289,6 +262,8 @@ void M_StartMessage(const char *message, int messagemode, FName action = NAME_No
|
||||||
DMenu *StartPickerMenu(DMenu *parent, const char *name, FColorCVar *cvar);
|
DMenu *StartPickerMenu(DMenu *parent, const char *name, FColorCVar *cvar);
|
||||||
void M_MarkMenus();
|
void M_MarkMenus();
|
||||||
FTextureID GetMenuTexture(const char* const name);
|
FTextureID GetMenuTexture(const char* const name);
|
||||||
|
void DeinitMenus();
|
||||||
|
bool M_Active();
|
||||||
|
|
||||||
|
|
||||||
struct IJoystickConfig;
|
struct IJoystickConfig;
|
||||||
|
|
|
@ -32,8 +32,6 @@
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "doomdef.h"
|
|
||||||
#include "doomstat.h"
|
|
||||||
#include "c_dispatch.h"
|
#include "c_dispatch.h"
|
||||||
#include "c_cvars.h"
|
#include "c_cvars.h"
|
||||||
#include "v_video.h"
|
#include "v_video.h"
|
||||||
|
|
Loading…
Reference in a new issue