mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-05-30 00:41:19 +00:00
* Updated to ZDoom 4301:
- Fixed parameter type for Floatbobphase property. - Added AFADoomer's patch to set a text highlight color for the list menu. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1583 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
61fe9b46b1
commit
86e1081184
5 changed files with 15 additions and 13 deletions
|
@ -495,12 +495,13 @@ bool FListMenuItemSelectable::MouseEvent(int type, int x, int y)
|
|||
//
|
||||
//=============================================================================
|
||||
|
||||
FListMenuItemText::FListMenuItemText(int x, int y, int height, int hotkey, const char *text, FFont *font, EColorRange color, FName child, int param)
|
||||
FListMenuItemText::FListMenuItemText(int x, int y, int height, int hotkey, const char *text, FFont *font, EColorRange color, EColorRange color2, FName child, int param)
|
||||
: FListMenuItemSelectable(x, y, height, child, param)
|
||||
{
|
||||
mText = ncopystring(text);
|
||||
mFont = font;
|
||||
mColor = color;
|
||||
mColorSelected = color2;
|
||||
mHotkey = hotkey;
|
||||
}
|
||||
|
||||
|
@ -518,7 +519,7 @@ void FListMenuItemText::Drawer(bool selected)
|
|||
if (text != NULL)
|
||||
{
|
||||
if (*text == '$') text = GStrings(text+1);
|
||||
screen->DrawText(mFont, mColor, mXpos, mYpos, text, DTA_Clean, true, TAG_DONE);
|
||||
screen->DrawText(mFont, selected ? mColorSelected : mColor, mXpos, mYpos, text, DTA_Clean, true, TAG_DONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -393,8 +393,9 @@ class FListMenuItemText : public FListMenuItemSelectable
|
|||
const char *mText;
|
||||
FFont *mFont;
|
||||
EColorRange mColor;
|
||||
EColorRange mColorSelected;
|
||||
public:
|
||||
FListMenuItemText(int x, int y, int height, int hotkey, const char *text, FFont *font, EColorRange color, FName child, int param = 0);
|
||||
FListMenuItemText(int x, int y, int height, int hotkey, const char *text, FFont *font, EColorRange color, EColorRange color2, FName child, int param = 0);
|
||||
~FListMenuItemText();
|
||||
void Drawer(bool selected);
|
||||
int GetWidth();
|
||||
|
|
|
@ -324,7 +324,7 @@ static void ParseListMenuBody(FScanner &sc, FListMenuDescriptor *desc)
|
|||
param = sc.Number;
|
||||
}
|
||||
|
||||
FListMenuItem *it = new FListMenuItemText(desc->mXpos, desc->mYpos, desc->mLinespacing, hotkey, text, desc->mFont, desc->mFontColor, action, param);
|
||||
FListMenuItem *it = new FListMenuItemText(desc->mXpos, desc->mYpos, desc->mLinespacing, hotkey, text, desc->mFont, desc->mFontColor, desc->mFontColor2, action, param);
|
||||
desc->mItems.Push(it);
|
||||
desc->mYpos += desc->mLinespacing;
|
||||
if (desc->mSelectedItem == -1) desc->mSelectedItem = desc->mItems.Size()-1;
|
||||
|
@ -976,7 +976,7 @@ static void BuildEpisodeMenu()
|
|||
else
|
||||
{
|
||||
it = new FListMenuItemText(ld->mXpos, posy, ld->mLinespacing, AllEpisodes[i].mShortcut,
|
||||
AllEpisodes[i].mEpisodeName, ld->mFont, ld->mFontColor, NAME_Skillmenu, i);
|
||||
AllEpisodes[i].mEpisodeName, ld->mFont, ld->mFontColor, ld->mFontColor2, NAME_Skillmenu, i);
|
||||
}
|
||||
ld->mItems.Push(it);
|
||||
posy += ld->mLinespacing;
|
||||
|
@ -1065,7 +1065,7 @@ static void BuildPlayerclassMenu()
|
|||
{
|
||||
// create a dummy item that auto-chooses the default class.
|
||||
FListMenuItemText *it = new FListMenuItemText(0, 0, 0, 'p', "player",
|
||||
ld->mFont,ld->mFontColor, NAME_Episodemenu, -1000);
|
||||
ld->mFont,ld->mFontColor, ld->mFontColor2, NAME_Episodemenu, -1000);
|
||||
ld->mAutoselect = ld->mItems.Push(it);
|
||||
success = true;
|
||||
}
|
||||
|
@ -1091,7 +1091,7 @@ static void BuildPlayerclassMenu()
|
|||
if (pname != NULL)
|
||||
{
|
||||
FListMenuItemText *it = new FListMenuItemText(ld->mXpos, ld->mYpos, ld->mLinespacing, *pname,
|
||||
pname, ld->mFont,ld->mFontColor, NAME_Episodemenu, i);
|
||||
pname, ld->mFont,ld->mFontColor,ld->mFontColor2, NAME_Episodemenu, i);
|
||||
ld->mItems.Push(it);
|
||||
ld->mYpos += ld->mLinespacing;
|
||||
n++;
|
||||
|
@ -1101,7 +1101,7 @@ static void BuildPlayerclassMenu()
|
|||
if (n > 1 && !gameinfo.norandomplayerclass)
|
||||
{
|
||||
FListMenuItemText *it = new FListMenuItemText(ld->mXpos, ld->mYpos, ld->mLinespacing, 'r',
|
||||
"$MNU_RANDOM", ld->mFont,ld->mFontColor, NAME_Episodemenu, -1);
|
||||
"$MNU_RANDOM", ld->mFont,ld->mFontColor,ld->mFontColor2, NAME_Episodemenu, -1);
|
||||
ld->mItems.Push(it);
|
||||
}
|
||||
if (n == 0)
|
||||
|
@ -1110,7 +1110,7 @@ static void BuildPlayerclassMenu()
|
|||
if (pname != NULL)
|
||||
{
|
||||
FListMenuItemText *it = new FListMenuItemText(ld->mXpos, ld->mYpos, ld->mLinespacing, *pname,
|
||||
pname, ld->mFont,ld->mFontColor, NAME_Episodemenu, 0);
|
||||
pname, ld->mFont,ld->mFontColor,ld->mFontColor2, NAME_Episodemenu, 0);
|
||||
ld->mItems.Push(it);
|
||||
}
|
||||
}
|
||||
|
@ -1369,7 +1369,7 @@ void M_StartupSkillMenu(FGameStartup *gs)
|
|||
EColorRange color = (EColorRange)skill.GetTextColor();
|
||||
if (color == CR_UNTRANSLATED) color = ld->mFontColor;
|
||||
li = new FListMenuItemText(x, y, ld->mLinespacing, skill.Shortcut,
|
||||
pItemText? *pItemText : skill.MenuName, ld->mFont, color, action, i);
|
||||
pItemText? *pItemText : skill.MenuName, ld->mFont, color,ld->mFontColor2, action, i);
|
||||
}
|
||||
ld->mItems.Push(li);
|
||||
y += ld->mLinespacing;
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
// This file was automatically generated by the
|
||||
// updaterevision tool. Do not edit by hand.
|
||||
|
||||
#define ZD_SVN_REVISION_STRING "4299"
|
||||
#define ZD_SVN_REVISION_NUMBER 4299
|
||||
#define ZD_SVN_REVISION_STRING "4301"
|
||||
#define ZD_SVN_REVISION_NUMBER 4301
|
||||
|
|
|
@ -627,7 +627,7 @@ DEFINE_PROPERTY(scale, F, Actor)
|
|||
//==========================================================================
|
||||
//
|
||||
//==========================================================================
|
||||
DEFINE_PROPERTY(floatbobphase, F, Actor)
|
||||
DEFINE_PROPERTY(floatbobphase, I, Actor)
|
||||
{
|
||||
PROP_INT_PARM(id, 0);
|
||||
if (id < -1 || id >= 64) I_Error ("FloatBobPhase must be in range [-1,63]");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue