mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +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()));
|
||||
}
|
||||
|
||||
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()
|
||||
{
|
||||
for (auto item : mItems) GC::Mark(item);
|
||||
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()
|
||||
{
|
||||
for (auto item : mItems) GC::Mark(item);
|
||||
|
|
|
@ -89,23 +89,7 @@ public:
|
|||
bool mCenter;
|
||||
bool mFromEngine;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
void Reset();
|
||||
size_t PropagateMark() override;
|
||||
};
|
||||
|
||||
|
@ -138,20 +122,9 @@ public:
|
|||
|
||||
void CalcIndent();
|
||||
DMenuItemBase *GetItem(FName name);
|
||||
void Reset()
|
||||
{
|
||||
// Reset the default settings (ignore all other values in the struct)
|
||||
mPosition = 0;
|
||||
mScrollTop = 0;
|
||||
mIndent = 0;
|
||||
mDontDim = 0;
|
||||
mFont = BigUpper;
|
||||
|
||||
}
|
||||
void Reset();
|
||||
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);
|
||||
void M_MarkMenus();
|
||||
FTextureID GetMenuTexture(const char* const name);
|
||||
void DeinitMenus();
|
||||
bool M_Active();
|
||||
|
||||
|
||||
struct IJoystickConfig;
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
**
|
||||
*/
|
||||
|
||||
#include "doomdef.h"
|
||||
#include "doomstat.h"
|
||||
#include "c_dispatch.h"
|
||||
#include "c_cvars.h"
|
||||
#include "v_video.h"
|
||||
|
|
Loading…
Reference in a new issue