mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +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 viewInit(void);
|
||||
void viewResizeView(int size);
|
||||
void UpdateFrame(void);
|
||||
void viewDrawInterface(ClockTicks arg);
|
||||
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);
|
||||
|
|
|
@ -99,6 +99,11 @@ void DImageScrollerMenu::Init(DMenu* parent, FImageScrollerDescriptor* desc)
|
|||
|
||||
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)
|
||||
{
|
||||
case MKEY_Back:
|
||||
|
@ -127,7 +132,9 @@ bool DImageScrollerMenu::MenuEvent(int mkey, bool fromcontroller)
|
|||
case MKEY_Enter:
|
||||
if (pageTransition.previous == nullptr)
|
||||
{
|
||||
int oldindex = index;
|
||||
if (++index >= (int)mDesc->mItems.Size()) index = 0;
|
||||
|
||||
auto next = newImageScreen(&mDesc->mItems[index]);
|
||||
next->canAnimate = canAnimate;
|
||||
if (!pageTransition.StartTransition(mCurrent, next, MA_Advance))
|
||||
|
|
|
@ -4179,7 +4179,7 @@ DoPlayerWadeSuperJump(PLAYERp pp)
|
|||
|
||||
SWBOOL PlayerFlyKey(void)
|
||||
{
|
||||
SWBOOL key;
|
||||
SWBOOL key = false;
|
||||
|
||||
if (!GodMode)
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue