mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-06 22:00:54 +00:00
- do not restart one-page image scrollers with Enter
Instead go back one menu level. Fixed #129
This commit is contained in:
parent
c7e664d3a6
commit
d3df4e580c
3 changed files with 8 additions and 2 deletions
|
@ -163,7 +163,6 @@ void InitStatusBar(void);
|
||||||
void UpdateStatusBar(ClockTicks arg);
|
void UpdateStatusBar(ClockTicks arg);
|
||||||
void viewInit(void);
|
void viewInit(void);
|
||||||
void viewResizeView(int size);
|
void viewResizeView(int size);
|
||||||
void UpdateFrame(void);
|
|
||||||
void viewDrawInterface(ClockTicks arg);
|
void viewDrawInterface(ClockTicks arg);
|
||||||
void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t smooth);
|
void viewProcessSprites(int32_t cX, int32_t cY, int32_t cZ, int32_t cA, int32_t smooth);
|
||||||
void CalcOtherPosition(spritetype *pSprite, int *pX, int *pY, int *pZ, int *vsectnum, int nAng, int zm);
|
void CalcOtherPosition(spritetype *pSprite, int *pX, int *pY, int *pZ, int *vsectnum, int nAng, int zm);
|
||||||
|
|
|
@ -99,6 +99,11 @@ void DImageScrollerMenu::Init(DMenu* parent, FImageScrollerDescriptor* desc)
|
||||||
|
|
||||||
bool DImageScrollerMenu::MenuEvent(int mkey, bool fromcontroller)
|
bool DImageScrollerMenu::MenuEvent(int mkey, bool fromcontroller)
|
||||||
{
|
{
|
||||||
|
if (mDesc->mItems.Size() <= 1)
|
||||||
|
{
|
||||||
|
if (mkey == MKEY_Enter) mkey = MKEY_Back;
|
||||||
|
else if (mkey == MKEY_Right || mkey == MKEY_Left) return true;
|
||||||
|
}
|
||||||
switch (mkey)
|
switch (mkey)
|
||||||
{
|
{
|
||||||
case MKEY_Back:
|
case MKEY_Back:
|
||||||
|
@ -127,7 +132,9 @@ bool DImageScrollerMenu::MenuEvent(int mkey, bool fromcontroller)
|
||||||
case MKEY_Enter:
|
case MKEY_Enter:
|
||||||
if (pageTransition.previous == nullptr)
|
if (pageTransition.previous == nullptr)
|
||||||
{
|
{
|
||||||
|
int oldindex = index;
|
||||||
if (++index >= (int)mDesc->mItems.Size()) index = 0;
|
if (++index >= (int)mDesc->mItems.Size()) index = 0;
|
||||||
|
|
||||||
auto next = newImageScreen(&mDesc->mItems[index]);
|
auto next = newImageScreen(&mDesc->mItems[index]);
|
||||||
next->canAnimate = canAnimate;
|
next->canAnimate = canAnimate;
|
||||||
if (!pageTransition.StartTransition(mCurrent, next, MA_Advance))
|
if (!pageTransition.StartTransition(mCurrent, next, MA_Advance))
|
||||||
|
|
|
@ -4179,7 +4179,7 @@ DoPlayerWadeSuperJump(PLAYERp pp)
|
||||||
|
|
||||||
SWBOOL PlayerFlyKey(void)
|
SWBOOL PlayerFlyKey(void)
|
||||||
{
|
{
|
||||||
SWBOOL key;
|
SWBOOL key = false;
|
||||||
|
|
||||||
if (!GodMode)
|
if (!GodMode)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue