/* Copyright (c) 2002-2012 Croteam Ltd. All rights reserved. */ #include "StdH.h" #include #include "MenuPrinting.h" #include "VarList.h" #include "MVar.h" extern BOOL _bVarChanged; void CVarMenu::Initialize_t(void) { gm_mgTitle.mg_boxOnScreen = BoxTitle(); gm_mgTitle.mg_strText = ""; gm_lhGadgets.AddTail(gm_mgTitle.mg_lnNode); for (INDEX iLabel = 0; iLabel= gm_iListOffset) && (iLabel<(gm_iListOffset + VARS_ON_SCREEN))) { bHasFirst |= (iLabel == 0); bHasLast |= (iLabel == ctLabels - 1); gm_mgVar[iInMenu].mg_pvsVar = &vs; gm_mgVar[iInMenu].mg_strTip = vs.vs_strTip; gm_mgVar[iInMenu].mg_bEnabled = gm_mgVar[iInMenu].IsEnabled(); gm_mgVar[iInMenu].mg_iInList = iLabel; } iLabel++; } // enable/disable up/down arrows gm_mgArrowUp.mg_bEnabled = !bHasFirst && ctLabels>0; gm_mgArrowDn.mg_bEnabled = !bHasLast && ctLabels>0; } void CVarMenu::StartMenu(void) { LoadVarSettings(gm_fnmMenuCFG); // set default parameters for the list gm_iListOffset = 0; gm_ctListTotal = _lhVarSettings.Count(); gm_iListWantedItem = 0; CGameMenu::StartMenu(); } void CVarMenu::EndMenu(void) { // disable all items first for (INDEX i = 0; i