- cleaned out some cruft from the menu code, now that ListMenu is fully scripted.

This commit is contained in:
Christoph Oelckers 2017-02-18 19:11:53 +01:00
commit 1b4c9e13b8
11 changed files with 47 additions and 365 deletions

View file

@ -49,32 +49,6 @@
#include "menu/menu.h"
//=============================================================================
//
//
//
//=============================================================================
void DOptionMenuDescriptor::CalcIndent()
{
// calculate the menu indent
int widest = 0, thiswidth;
for (unsigned i = 0; i < mItems.Size(); i++)
{
thiswidth = mItems[i]->GetIndent();
if (thiswidth > widest) widest = thiswidth;
}
mIndent = widest + 4;
}
DEFINE_ACTION_FUNCTION(DOptionMenuDescriptor, CalcIndent)
{
PARAM_SELF_PROLOGUE(DOptionMenuDescriptor);
self->CalcIndent();
return 0;
}
//=============================================================================
//
//
@ -85,7 +59,7 @@ DMenuItemBase *DOptionMenuDescriptor::GetItem(FName name)
{
for(unsigned i=0;i<mItems.Size(); i++)
{
FName nm = mItems[i]->GetAction(NULL);
FName nm = mItems[i]->mAction;
if (nm == name) return mItems[i];
}
return NULL;