home *** CD-ROM | disk | FTP | other *** search
/ PC PowerPlay 56 / CDPowerplay56Disc2.iso / demos / blade / data1.cab / Program_Executable_Files / Scripts / Menu.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2000-10-27  |  50.5 KB  |  1,754 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 1.5)
  3.  
  4. import MenuWidget
  5. import WidgetsExtra
  6. import Bladex
  7. import BBLib
  8. import netgame
  9. import Raster
  10. import BIPCx
  11. import Sounds
  12. import GotoMapVars
  13. import acts
  14. import SaveGame
  15. import MemPersistence
  16. if netgame.GetNetState() == 0:
  17.     import KeybWidget
  18. else:
  19.     import NetScorer
  20. import Raster
  21. import BInput
  22. import BUIx
  23. import pdb
  24. import Reference
  25. import MenuText
  26. import NetMisc
  27. import netwidgets
  28. import os
  29. MenuFontSmall = '../../Data/Letras menu peq.bmp'
  30. MenuFontMed = '../../Data/Letras menu med.bmp'
  31. MenuFontBig = '../../Data/Letras menu gra.bmp'
  32. Character = -1
  33. EscapeFunction = None
  34. SndCorreGema = Bladex.CreateSound('..\\..\\Sounds\\golpe-2.wav', 'Risoto1')
  35. SndCorreGema.Volume = 0.5
  36. SndCorreGema.MinDistance = 1000000.0
  37. SndCorreGema.MaxDistance = 2000000
  38. SndNewMenu = Bladex.CreateSound('..\\..\\Sounds\\golpe-madera-pesada.wav', 'Risoto2')
  39. SndNewMenu.Volume = 1.0
  40. SndNewMenu.MinDistance = 1000000.0
  41. SndNewMenu.MaxDistance = 2000000
  42. last_ss_quality = -1
  43. sound_cfg_changed = 0
  44.  
  45. def PlaySound(Chound):
  46.     cam = Bladex.GetEntity('Camera')
  47.     Chound.Position = cam.Position
  48.     Chound.Stop()
  49.     Chound.PlaySound(0)
  50.  
  51.  
  52. def BackMenu(option):
  53.     _MainMenu.DeActivateMenuItem()
  54.  
  55. BackOption = {
  56.     'Name': MenuText.GetMenuText('Back'),
  57.     'VSep': 65,
  58.     'Command': BackMenu,
  59.     'Font': MenuFontBig }
  60.  
  61. def Load2DMap(option):
  62.     Bladex.LoadLevel('2DMap')
  63.  
  64.  
  65. def LoadPlayerSelect(option):
  66.     global EscapeFunction, EscapeFunction
  67.     if 'Casa' != Bladex.GetCurrentMap():
  68.         MemPersistence.Store('MapAlreadyLoaded', 'pepepotamo')
  69.         Bladex.LoadLevel('Casa')
  70.     else:
  71.         aux = EscapeFunction
  72.         EscapeFunction = None
  73.         _MainMenu.DeActivateMenuItem()
  74.         _MainMenu.DeActivateMenuItem()
  75.         EscapeFunction = aux
  76.         aux = None
  77.         EscapeFunction(1)
  78.  
  79.  
  80. def LoadTutorial(option):
  81.     Bladex.LoadLevel('Tutorial')
  82.  
  83.  
  84. def SaveGame1(option):
  85.     Bladex.SetRunString("import GameState;state=GameState.WorldState();state.GetState();state.SaveState('../../Save/SaveGame1.py');state=None")
  86.  
  87.  
  88. def SaveGame2(option):
  89.     Bladex.SetRunString("import GameState;state=GameState.WorldState();state.GetState();state.SaveState('../../Save/SaveGame2.py');state=None")
  90.  
  91.  
  92. def SaveGame3(option):
  93.     Bladex.SetRunString("import GameState;state=GameState.WorldState();state.GetState();state.SaveState('../../Save/SaveGame3.py');state=None")
  94.  
  95.  
  96. def SaveGame4(option):
  97.     Bladex.SetRunString("import GameState;state=GameState.WorldState();state.GetState();state.SaveState('../../Save/SaveGame4.py');state=None")
  98.  
  99.  
  100. def LoadGameAux(name):
  101.     path = '../../Save/%s_files' % (name,)
  102.     execfile = "execfile('../../Scripts/sys_init.py');execfile('../../Save/%s.py')" % (name,)
  103.     file_data_aux = open('%s/%saux' % (path, 'aux'), 'rt')
  104.     text = file_data_aux.read()
  105.     print text
  106.     file_data_aux.close()
  107.     Bladex.BeginLoadGame()
  108.     Bladex.CloseLevel(execfile, text)
  109.  
  110.  
  111. def LoadGame(option):
  112.     LoadGameAux('SaveGame1')
  113.  
  114.  
  115. def LoadGame2(option):
  116.     LoadGameAux('SaveGame2')
  117.  
  118.  
  119. def LoadGame3(option):
  120.     LoadGameAux('SaveGame3')
  121.  
  122.  
  123. def LoadGame4(option):
  124.     LoadGameAux('SaveGame4')
  125.  
  126.  
  127. def CmdQuit(menu_class):
  128.     Bladex.Quit()
  129.  
  130.  
  131. def CommandPrb(menu_class):
  132.     print 'Hola'
  133.  
  134.  
  135. def OptionCommandPrb(menu_class, option):
  136.     print 'Received', option
  137.  
  138.  
  139. def SetOptionCommandPrb():
  140.     return 'Off'
  141.  
  142.  
  143. def SetFullScreenMode(option):
  144.     print option
  145.     if option == 'Full Screen':
  146.         Raster.SetVideoMode(0)
  147.     else:
  148.         Raster.SetWindowSize(640, 480)
  149.  
  150.  
  151. def FullScreenModeSettings():
  152.     print 'FullScreenModeSettings'
  153.     if Raster.FullScreen():
  154.         return 0
  155.     else:
  156.         return 1
  157.  
  158.  
  159. def SetFacing(option):
  160.     if option == 'Yes':
  161.         Bladex.SetAutoEngageCombat(1)
  162.     else:
  163.         Bladex.SetAutoEngageCombat(0)
  164.     SaveConfiguration()
  165.  
  166.  
  167. def GetFacing():
  168.     return Bladex.GetAutoEngageCombat()
  169.  
  170.  
  171. def FacingSettings():
  172.     if Bladex.GetAutoEngageCombat():
  173.         return 1
  174.     else:
  175.         return 0
  176.  
  177. GORE_PASSWORD = ''
  178. NEW_GORE_PASSWORD = ''
  179. CONFIRM_GORE_PASSWORD = ''
  180. CORRECT_GORE_PASSWORD = ''
  181.  
  182. def LoadPasswordFile():
  183.     global CORRECT_GORE_PASSWORD
  184.     import rotor
  185.     
  186.     try:
  187.         passwordfile = open('..\\..\\Bin\\Password.txt', 'r')
  188.     except:
  189.         return None
  190.  
  191.     encrpass = passwordfile.read()
  192.     passwordfile.close()
  193.     rt = rotor.newrotor('key', 12)
  194.     CORRECT_GORE_PASSWORD = rt.decrypt(encrpass)
  195.     del rt
  196.  
  197. LoadPasswordFile()
  198.  
  199. def SavePasswordFile():
  200.     import rotor
  201.     rt = rotor.newrotor('key', 12)
  202.     encrpass = rt.encrypt(CORRECT_GORE_PASSWORD)
  203.     del rt
  204.     passwordfile = open('..\\..\\Bin\\Password.txt', 'w')
  205.     passwordfile.write(encrpass)
  206.     passwordfile.close()
  207.  
  208.  
  209. def GetMouseInvert():
  210.     MouseData = Bladex.GetMouseState()
  211.     return MouseData[0]
  212.  
  213.  
  214. def SetMouseInvert(option):
  215.     MouseData = Bladex.GetMouseState()
  216.     if option == 'Yes':
  217.         Bladex.SetMouseState(0, MouseData[1], MouseData[2])
  218.     else:
  219.         Bladex.SetMouseState(1, MouseData[1], MouseData[2])
  220.     KeybWidget.SaveListConfig()
  221.  
  222.  
  223. def GetMouseXSens():
  224.     MouseData = Bladex.GetMouseState()
  225.     return MouseData[1]
  226.  
  227.  
  228. def SetMouseXSens(v):
  229.     MouseData = Bladex.GetMouseState()
  230.     Bladex.SetMouseState(MouseData[0], v, MouseData[2])
  231.     KeybWidget.SaveListConfig()
  232.  
  233.  
  234. def GetMouseYSens():
  235.     MouseData = Bladex.GetMouseState()
  236.     return MouseData[2]
  237.  
  238.  
  239. def SetMouseYSens(v):
  240.     MouseData = Bladex.GetMouseState()
  241.     Bladex.SetMouseState(MouseData[0], MouseData[1], v)
  242.     KeybWidget.SaveListConfig()
  243.  
  244.  
  245. def ResetKeyB(option):
  246.     _MainMenu.DeActivateMenuItem()
  247.     acts.ResetDefaultControls()
  248.     if KeybWidget.AdditionalKeysCallBack:
  249.         KeybWidget.AdditionalKeysCallBack()
  250.     
  251.     _MainMenu.ActivateMenuItem()
  252.  
  253.  
  254. def SetDeFacingValue(v):
  255.     return Bladex.SetAecGap(v)
  256.  
  257. CurrentScorerVar = 'Full'
  258.  
  259. def CurrentScorer():
  260.     if CurrentScorerVar == 'Full':
  261.         return 0
  262.     
  263.     if CurrentScorerVar == 'Auto':
  264.         return 1
  265.     
  266.  
  267.  
  268. def SetScorer(option):
  269.     global CurrentScorerVar
  270.     import Scorer
  271.     if option == 'Full':
  272.         Scorer.PowDefWidgets.Activate()
  273.         Scorer.wKeysFrame.SetVisible(1)
  274.         Scorer.wKeysRFrame.SetVisible(1)
  275.         Scorer.wSpecialsFrame.SetVisible(1)
  276.         Scorer.wEnemiesFrame.SetVisible(1)
  277.         Scorer.wObjectsFrame.SetVisible(1)
  278.         Scorer.wArrowInfo.SetVisible(1)
  279.     elif option == 'Auto':
  280.         Scorer.wLeftHand.SetVisible(0)
  281.         Scorer.wRightHand.SetVisible(0)
  282.         Scorer.PowDefWidgets.Deactivate()
  283.         Scorer.wKeysFrame.SetVisible(0)
  284.         Scorer.wKeysRFrame.SetVisible(0)
  285.         Scorer.wSpecialsFrame.SetVisible(0)
  286.         Scorer.wEnemiesFrame.SetVisible(0)
  287.         Scorer.wObjectsFrame.SetVisible(0)
  288.         Scorer.wArrowInfo.SetVisible(0)
  289.     
  290.     CurrentScorerVar = option
  291.     SaveConfiguration()
  292.  
  293.  
  294. def CheckGorePassWord():
  295.     print 'Checking Password'
  296.     return CORRECT_GORE_PASSWORD == GORE_PASSWORD
  297.  
  298.  
  299. def Empty():
  300.     return ''
  301.  
  302.  
  303. def SetPass(name):
  304.     global GORE_PASSWORD
  305.     GORE_PASSWORD = name
  306.  
  307.  
  308. def SetNewPass(name):
  309.     global NEW_GORE_PASSWORD
  310.     NEW_GORE_PASSWORD = name
  311.  
  312.  
  313. def SetConfNewPass(name):
  314.     global CONFIRM_GORE_PASSWORD
  315.     CONFIRM_GORE_PASSWORD = name
  316.  
  317.  
  318. def SavePassword(xx):
  319.     global CORRECT_GORE_PASSWORD
  320.     if CORRECT_GORE_PASSWORD == GORE_PASSWORD:
  321.         if NEW_GORE_PASSWORD == CONFIRM_GORE_PASSWORD:
  322.             CORRECT_GORE_PASSWORD = NEW_GORE_PASSWORD
  323.             SavePasswordFile()
  324.             _MainMenu.DeActivateMenuItem()
  325.         else:
  326.             print MenuText.GetMenuText('Password confirmation differs')
  327.     else:
  328.         print MenuText.GetMenuText('Wrong password')
  329.  
  330.  
  331. def SaveConfiguration():
  332.     cfgfile = open('..\\..\\Scripts\\GameCfg.py', 'w')
  333.     cfgfile.write('\n# Configuration settings... be carefull!\n\n\n')
  334.     cfgfile.write('Bladex.SetBloodLevel(' + `Bladex.GetBloodLevel()` + ')\n')
  335.     cfgfile.write('Bladex.SetMutilationLevel(' + `Bladex.GetMutilationLevel()` + ')\n')
  336.     cfgfile.write('Bladex.SetDrawObjectShadows(' + `Bladex.GetDrawObjectShadows()` + ')\n')
  337.     cfgfile.write('Bladex.SetAutoEngageCombat(' + `Bladex.GetAutoEngageCombat()` + ')\n')
  338.     cfgfile.write('Bladex.SetAecGap(' + `Bladex.GetAecGap()` + ')\n')
  339.     cfgfile.write('SetScorer(' + `CurrentScorerVar` + ')\n')
  340.     cfgfile.write('\n# Achalay my brother!.\n\n\n')
  341.     cfgfile.close()
  342.     print 'Game options Saved.'
  343.  
  344.  
  345. def SetBlood(option):
  346.     if option == 'Yes':
  347.         Bladex.SetBloodLevel(1)
  348.     else:
  349.         Bladex.SetBloodLevel(0)
  350.     SaveConfiguration()
  351.  
  352.  
  353. def BloodSettings():
  354.     if Bladex.GetBloodLevel():
  355.         return 0
  356.     else:
  357.         return 1
  358.  
  359.  
  360. def SetMutilation(option):
  361.     if option == 'Yes':
  362.         Bladex.SetMutilationLevel(1)
  363.     else:
  364.         Bladex.SetMutilationLevel(0)
  365.     SaveConfiguration()
  366.  
  367.  
  368. def MutilationSettings():
  369.     if Bladex.GetMutilationLevel():
  370.         return 0
  371.     else:
  372.         return 1
  373.  
  374.  
  375. def SetShadows(option):
  376.     if option == 'Yes':
  377.         Bladex.SetDrawObjectShadows(1)
  378.     else:
  379.         Bladex.SetDrawObjectShadows(0)
  380.     SaveConfiguration()
  381.  
  382.  
  383. def ShadowsSettings():
  384.     if Bladex.GetDrawObjectShadows():
  385.         return 0
  386.     else:
  387.         return 1
  388.  
  389.  
  390. def GetGammaValue():
  391.     return Raster.GetGammaCorrection()
  392.  
  393.  
  394. def SetGammaValue(v):
  395.     Raster.SetGammaCorrection(v)
  396.  
  397.  
  398. def GetBrightnessValue():
  399.     return Raster.GetBrightness()
  400.  
  401.  
  402. def SetBrightnessValue(v):
  403.     Raster.SetBrightness(v)
  404.  
  405.  
  406. def GetContrastValue():
  407.     return Raster.GetContrast()
  408.  
  409.  
  410. def SetContrastValue(v):
  411.     Raster.SetContrast(v)
  412.  
  413.  
  414. def GetSoundValue():
  415.     return int(10 * Bladex.GetSoundVolume())
  416.  
  417.  
  418. def SetSoundValue(v):
  419.     global sound_cfg_changed
  420.     sound_cfg_changed = 1
  421.     return Bladex.SetSoundVolume(v * 0.1)
  422.  
  423.  
  424. def GetMusicValue():
  425.     return int(10 * Bladex.GetMusicVolume())
  426.  
  427.  
  428. def SetMusicValue(v):
  429.     global sound_cfg_changed
  430.     sound_cfg_changed = 1
  431.     return Bladex.SetMusicVolume(v * 0.1)
  432.  
  433.  
  434. def GetSoundQuality():
  435.     global last_ss_quality
  436.     last_ss_quality = Bladex.GetSSQuality()
  437.     return Bladex.GetSSQuality()
  438.  
  439.  
  440. def SetSoundQuality(option):
  441.     global last_ss_quality, last_ss_quality, last_ss_quality
  442.     if option == 'High':
  443.         last_ss_quality = 2
  444.         return 2
  445.     
  446.     if option == 'Med':
  447.         last_ss_quality = 1
  448.         return 1
  449.     
  450.     if option == 'Low':
  451.         last_ss_quality = 0
  452.         return 0
  453.     
  454.  
  455.  
  456. def GetEAX():
  457.     return Bladex.GetEAXOverride()
  458.  
  459.  
  460. def SetEAX(option):
  461.     global sound_cfg_changed
  462.     sound_cfg_changed = 1
  463.     if option == 'Enabled':
  464.         Bladex.SetEAXOverride(0)
  465.     
  466.     if option == 'Disabled':
  467.         Bladex.SetEAXOverride(1)
  468.     
  469.  
  470.  
  471. def GetSpeakerConfig():
  472.     return Bladex.GetSpeakerConfig()
  473.  
  474.  
  475. def SetSpeakerConfig(option):
  476.     global sound_cfg_changed
  477.     sound_cfg_changed = 1
  478.     if option == '4':
  479.         Bladex.SetSpeakerConfig(3)
  480.         return 3
  481.     
  482.     if option == '2':
  483.         Bladex.SetSpeakerConfig(1)
  484.         return 1
  485.     
  486.     if option == '2 + Subwoofer':
  487.         Bladex.SetSpeakerConfig(2)
  488.         return 2
  489.     
  490.     if option == 'Earphones':
  491.         Bladex.SetSpeakerConfig(0)
  492.         return 0
  493.     
  494.  
  495.  
  496. def GetDeFacingValue():
  497.     return int(Bladex.GetAecGap())
  498.  
  499.  
  500. def SetDeFacingValue(v):
  501.     i = Bladex.SetAecGap(v)
  502.     SaveConfiguration()
  503.     return i
  504.  
  505.  
  506. def ExecTravelBook(menu_class):
  507.     if Reference.DEMO_MODE == 1:
  508.         return None
  509.     
  510.     import Scorer
  511.     Scorer.HideTBS()
  512.     hWnd = Bladex.GetWindowId()
  513.     print 'Executing Travel Book...'
  514.     StatusFile = open('..\\..\\TravelBook\\status.txt', 'w')
  515.     BarbEquipementFile = None
  516.     AmazonEquipementFile = None
  517.     DwarfEquipementFile = None
  518.     KnightEquipementFile = None
  519.     char = Bladex.GetEntity('Player1')
  520.     Inventory = char.GetInventory()
  521.     if char.Kind == 'Barbarian_N':
  522.         StatusFile.write('Barbarian\n')
  523.     
  524.     if char.Kind == 'Amazon_N':
  525.         StatusFile.write('Amazon\n')
  526.     
  527.     if char.Kind == 'Dwarf_N':
  528.         StatusFile.write('Dwarf\n')
  529.     
  530.     if char.Kind == 'Knight_N':
  531.         StatusFile.write('Knight\n')
  532.     
  533.     StatusFile.write('cc\n')
  534.     if Inventory.nTablets > 0:
  535.         StatusFile.write('ch\n')
  536.     
  537.     if len(GotoMapVars.BaList):
  538.         StatusFile.write('ba\n')
  539.     
  540.     StatusFile.close()
  541.     SkillFile = open('..\\..\\TravelBook\\Character Characteristics\\Skills\\Character Skills.txt', 'w')
  542.     list = Bladex.GetCombos('Player1')
  543.     for i in range(len(list)):
  544.         SkillFile.write(list[i][0])
  545.         SkillFile.write('\n')
  546.     
  547.     SkillFile.close()
  548.     BarbEquipementFile = open('..\\..\\TravelBook\\Character Characteristics\\Equipement\\Barb\\Carried Equipement.txt', 'w')
  549.     AmazonEquipementFile = open('..\\..\\TravelBook\\Character Characteristics\\Equipement\\Amazon\\Carried Equipement.txt', 'w')
  550.     DwarfEquipementFile = open('..\\..\\TravelBook\\Character Characteristics\\Equipement\\Dwarf\\Carried Equipement.txt', 'w')
  551.     KnightEquipementFile = open('..\\..\\TravelBook\\Character Characteristics\\Equipement\\Knight\\Carried Equipement.txt', 'w')
  552.     BarbShieldsFile = open('..\\..\\TravelBook\\Character Characteristics\\Equipement\\Barb\\Carried Shields.txt', 'w')
  553.     AmazonShieldsFile = open('..\\..\\TravelBook\\Character Characteristics\\Equipement\\Amazon\\Carried Shields.txt', 'w')
  554.     DwarfShieldsFile = open('..\\..\\TravelBook\\Character Characteristics\\Equipement\\Dwarf\\Carried Shields.txt', 'w')
  555.     KnightShieldsFile = open('..\\..\\TravelBook\\Character Characteristics\\Equipement\\Knight\\Carried Shields.txt', 'w')
  556.     KnightWeaps = [
  557.         'QueenSword',
  558.         'IceSword',
  559.         'FireSword',
  560.         'Gladius',
  561.         'Orksword',
  562.         'Espadaelfica',
  563.         'Espadaromana',
  564.         'Espadacurva',
  565.         'Dagesse',
  566.         'Cimitarra',
  567.         'EgyptSword',
  568.         'Espadafilo',
  569.         'Espada',
  570.         'Maza',
  571.         'Maza2',
  572.         'Maza3']
  573.     DwarfWeaps = [
  574.         'CrushHammer',
  575.         'FireAxe',
  576.         'IceHammer',
  577.         'Hacha',
  578.         'Hacha5',
  579.         'Hacha4',
  580.         'Hacha3',
  581.         'Hacha6',
  582.         'Hacha2',
  583.         'Garrote',
  584.         'Martillo',
  585.         'Martillo2',
  586.         'Garropin',
  587.         'MazaDoble',
  588.         'Garrote2',
  589.         'Martillo3']
  590.     AmazonWeaps = [
  591.         'TaiSword',
  592.         'SteelFeather',
  593.         'FireBo',
  594.         'LightEdge',
  595.         'Ninjato',
  596.         'HookSword',
  597.         'Katana',
  598.         'DoubleSword',
  599.         'Bo',
  600.         'Lanza',
  601.         'Naginata',
  602.         'Tridente',
  603.         'Hachacuchilla',
  604.         'Naginata2',
  605.         'DeathBo',
  606.         'CrushBo']
  607.     BarbWeaps = [
  608.         'FireBigSword',
  609.         'IceAxe',
  610.         'DalWeapon',
  611.         'Sablazo',
  612.         'Chaosword',
  613.         'DeathSword',
  614.         'LongSword',
  615.         'Alfanje',
  616.         'BigSword',
  617.         'SawSword',
  618.         'FlatSword',
  619.         'Eclipse',
  620.         'Guadanya',
  621.         'Hacha2hojas',
  622.         'RhinoClub',
  623.         'Hacharrajada']
  624.     ShowableItems = []
  625.     InventoryList = []
  626.     for i in range(Inventory.nWeapons):
  627.         Weapon = Inventory.GetWeapon(i)
  628.         RootWeapon = Bladex.GetEntity(Weapon)
  629.         InventoryList.append(RootWeapon.Kind)
  630.     
  631.     TakenObjects = char.Data.GetObjectsTaken()
  632.     ItemsFile = open('..\\..\\TravelBook\\Character Characteristics\\Items\\Carried Items.txt', 'w')
  633.     for i in range(Inventory.nKindObjects):
  634.         Object = Inventory.GetObject(i)
  635.         RootObject = Bladex.GetEntity(Object)
  636.         ItemsFile.write(RootObject.Kind)
  637.         ItemsFile.write('\n')
  638.     
  639.     ItemsFile.close()
  640.     for i in TakenObjects:
  641.         pass
  642.     
  643.     WrittenWeapons = []
  644.     for i in range(Inventory.nWeapons):
  645.         Weapon = Inventory.GetWeapon(i)
  646.         RootWeapon = Bladex.GetEntity(Weapon)
  647.     
  648.     WrittenShields = []
  649.     for i in range(Inventory.nShields):
  650.         Shield = Inventory.GetShield(i)
  651.         RootShield = Bladex.GetEntity(Shield)
  652.     
  653.     Shield = [
  654.         'Escudo1',
  655.         'Escudo2',
  656.         'Escudo3',
  657.         'Escudo4',
  658.         'Escudo5',
  659.         'Escudo6',
  660.         'Escudo7',
  661.         'Escudo8',
  662.         'Escudo9',
  663.         'Escudon',
  664.         'VampShield',
  665.         'DalShield',
  666.         'KingShield']
  667.     for Obj in TakenObjects:
  668.         pass
  669.     
  670.     BarbEquipementFile.close()
  671.     AmazonEquipementFile.close()
  672.     DwarfEquipementFile.close()
  673.     KnightEquipementFile.close()
  674.     BarbShieldsFile.close()
  675.     AmazonShieldsFile.close()
  676.     DwarfShieldsFile.close()
  677.     KnightShieldsFile.close()
  678.     count = 1
  679.     for imapa in range(len(GotoMapVars.MText)):
  680.         MFile = open('..\\..\\TravelBook\\Kingdom History\\M' + `imapa + 1` + '.txt', 'w')
  681.         for texto in GotoMapVars.MText[imapa]:
  682.             MFile.write('.htm')
  683.             MFile.write('\n')
  684.         
  685.         MFile.close()
  686.     
  687.     count = 1
  688.     MFile = open('..\\..\\TravelBook\\Creation History\\status.txt', 'w')
  689.     for imapa in range(len(GotoMapVars.MText)):
  690.         for texto in GotoMapVars.MText[imapa]:
  691.             pass
  692.         
  693.     
  694.     MFile.close()
  695.     MFile = open('..\\..\\TravelBook\\The Blade Athem\\status.txt', 'w')
  696.     for mapp in GotoMapVars.BaList:
  697.         MFile.write(mapp)
  698.         MFile.write('\n')
  699.     
  700.     MFile.close()
  701.     Bladex.SetInputMode('Mouse', 'UNACQUIRE')
  702.     Bladex.SetInputMode('Keyboard', 'UNACQUIRE')
  703.     BIPCx.CreateNewProcess('..\\..\\TravelBook\\BladeTBW.exe', hWnd)
  704.     BIPCx.CreateNewProcess('..\\..\\TravelBook\\TravelBook.exe', hWnd)
  705.     print 'Waiting...'
  706.     print BIPCx.WaitCommand()
  707.     Bladex.SetInputMode('Mouse', 'ACQUIRE')
  708.     Bladex.SetInputMode('Keyboard', 'ACQUIRE')
  709.  
  710. _MainMenu = None
  711.  
  712. def ActivateMenu():
  713.     global _MainMenu
  714.     
  715.     try:
  716.         AppMode = Bladex.GetAppMode()
  717.     except x:
  718.         print 'Error getting AppMode', x
  719.  
  720.     if AppMode == 'Game' or AppMode == 'Demo':
  721.         if AppMode == 'Demo':
  722.             import Demo_Stuff
  723.             if Demo_Stuff.demo_is_active == 1:
  724.                 print 'ERROR - Menu.ActivateMenu()'
  725.                 print 'Fix with a path but should NOT happen!!!'
  726.                 Demo_Stuff.DemoLoop()
  727.                 return None
  728.             
  729.         
  730.         _MainMenu = MainMenu('Menu Principal', Desc1)
  731.         NetMisc.SetMainMenu(_MainMenu)
  732.         _MainMenu.MenuStack.Push(_MainMenu.wMenu)
  733.         InputManager = BInput.GetInputManager()
  734.         oldInputActionsSet = InputManager.GetInputActionsSet()
  735.         InputManager.SetInputActionsSet('Menu')
  736.         Bladex.AddInputAction('Menu Next', 0)
  737.         Bladex.AddInputAction('Menu Prev', 0)
  738.         Bladex.AddInputAction('Menu Inc', 0)
  739.         Bladex.AddInputAction('Menu Dec', 0)
  740.         Bladex.AddInputAction('Menu ActivateItem', 0)
  741.         Bladex.AddInputAction('Menu DeActivateItem', 0)
  742.         Bladex.AddInputAction('Menu Supr', 0)
  743.         Bladex.AddInputAction('Menu Next Strong', 0)
  744.         Bladex.AssocKey('Menu Next', 'Keyboard', 'Down')
  745.         Bladex.AddBoundFunc('Menu Next', _MainMenu.MenuNextItem)
  746.         Bladex.AssocKey('Menu Prev', 'Keyboard', 'Up')
  747.         Bladex.AddBoundFunc('Menu Prev', _MainMenu.MenuPrevItem)
  748.         Bladex.AssocKey('Menu Inc', 'Keyboard', 'Right')
  749.         Bladex.AddBoundFunc('Menu Inc', _MainMenu.MenuIncItem)
  750.         Bladex.AssocKey('Menu Dec', 'Keyboard', 'Left')
  751.         Bladex.AddBoundFunc('Menu Dec', _MainMenu.MenuDecItem)
  752.         Bladex.AssocKey('Menu Supr', 'Keyboard', 'Delete')
  753.         Bladex.AddBoundFunc('Menu Supr', _MainMenu.MenuSuprItem)
  754.         Bladex.AssocKey('Menu ActivateItem', 'Keyboard', 'Enter')
  755.         Bladex.AddBoundFunc('Menu ActivateItem', _MainMenu.ActivateMenuItem)
  756.         Bladex.AssocKey('Menu DeActivateItem', 'Keyboard', 'Esc')
  757.         Bladex.AddBoundFunc('Menu DeActivateItem', _MainMenu.DeActivateMenuItem)
  758.         Bladex.AssocKey('Menu Next Strong', 'Keyboard', 'Tab')
  759.         Bladex.AddBoundFunc('Menu Next Strong', _MainMenu.MenuNextItemStrong)
  760.         InputManager = BInput.GetInputManager()
  761.         InputManager.SetInputActionsSet('Menu')
  762.         if Reference.DEMO_MODE == 0:
  763.             SaveGame.CreateSaveMenu()
  764.         
  765.     elif AppMode == 'Menu':
  766.         Bladex.AddScheduledFunc(Bladex.GetTime(), ClearMenuKeyb, ())
  767.         Bladex.SetAppMode('Game')
  768.         if netgame.GetNetState() == 0:
  769.             import Scorer
  770.             Scorer.ActivateScorer()
  771.         else:
  772.             NetScorer.ActivateScorer()
  773.         Raster.SetTextMode(3)
  774.     else:
  775.         print 'Invalid AppMode'
  776.     print 'End ActivateMenu()'
  777.  
  778.  
  779. def PreActivateMenu():
  780.     Bladex.AddScheduledFunc(Bladex.GetTime(), ActivateMenu, (), 'ActivateMenu')
  781.  
  782.  
  783. def ClearMenuKeyb():
  784.     global _MainMenu
  785.     InputManager = BInput.GetInputManager()
  786.     InputManager.SetInputActionsSet('Menu')
  787.     Bladex.RemoveInputAction('Menu Next')
  788.     Bladex.RemoveInputAction('Menu Prev')
  789.     Bladex.RemoveInputAction('Menu Inc')
  790.     Bladex.RemoveInputAction('Menu Dec')
  791.     Bladex.RemoveInputAction('Menu ActivateItem')
  792.     Bladex.RemoveInputAction('Menu DeActivateItem')
  793.     Bladex.RemoveInputAction('Menu Supr')
  794.     Bladex.RemoveInputAction('Menu Next Strong')
  795.     _MainMenu = None
  796.     InputManager.SetInputActionsSet('Default')
  797.  
  798. wNULL_MenuParent = BUIx.CreateNULLWidget()
  799.  
  800. class MainMenu:
  801.     
  802.     def __init__(self, Name, MenuDescription):
  803.         self.Name = Name
  804.         self.MenuDescription = MenuDescription
  805.         self.MenuStack = MenuWidget.MenuStack(ActivateMenu)
  806.         self.wMenu = MenuWidget.B_MenuTree(wNULL_MenuParent, self.MenuDescription, self.MenuStack)
  807.         self.wMenu.SetAutoScale(1)
  808.  
  809.     
  810.     def __del__(self):
  811.         self.MenuStack.Reset()
  812.         self.MenuStack = None
  813.         self.wMenu = None
  814.  
  815.     
  816.     def ActivateMenuItem(self):
  817.         if Bladex.GetAppMode() == 'Menu':
  818.             wActiveMenuElement = self.MenuStack.Top().GetFocus()
  819.             
  820.             try:
  821.                 sw = wActiveMenuElement.GetFocus()
  822.                 sw.ActivateItem(1)
  823.             except:
  824.                 wActiveMenuElement.ActivateItem(1)
  825.  
  826.             SndNewMenu.PlayStereo()
  827.         
  828.  
  829.     
  830.     def DeActivateMenuItem(self):
  831.         global sound_cfg_changed
  832.         if Bladex.GetAppMode() == 'Menu':
  833.             if self.MenuStack.nItems() == 1 and EscapeFunction != None:
  834.                 if EscapeFunction(0):
  835.                     return None
  836.                 
  837.             
  838.             wActiveMenuElement = self.MenuStack.Top().GetFocus()
  839.             
  840.             try:
  841.                 sw = wActiveMenuElement.GetFocus()
  842.                 sw.ActivateItem(0)
  843.             except:
  844.                 wActiveMenuElement.ActivateItem(0)
  845.  
  846.             if last_ss_quality != -1 and last_ss_quality != Bladex.GetSSQuality():
  847.                 print 'Reseting sound quality'
  848.                 Bladex.SetSSQuality(last_ss_quality)
  849.             elif sound_cfg_changed == 1:
  850.                 Bladex.SaveSSConfig()
  851.                 sound_cfg_changed = 0
  852.             
  853.             SndNewMenu.PlayStereo()
  854.         
  855.  
  856.     
  857.     def MenuNextItemStrong(self):
  858.         w = self.MenuStack.Top()
  859.         w.NextFocus()
  860.  
  861.     
  862.     def MenuNextItem(self):
  863.         w = self.MenuStack.Top()
  864.         sw = w.GetFocus()
  865.         SndCorreGema.PlayStereo()
  866.         
  867.         try:
  868.             sw.NextFocus()
  869.         except:
  870.             w.NextFocus()
  871.  
  872.  
  873.     
  874.     def MenuPrevItem(self):
  875.         w = self.MenuStack.Top()
  876.         sw = w.GetFocus()
  877.         SndCorreGema.PlayStereo()
  878.         
  879.         try:
  880.             sw.PrevFocus()
  881.         except:
  882.             w.PrevFocus()
  883.  
  884.  
  885.     
  886.     def MenuIncItem(self):
  887.         w = self.MenuStack.Top()
  888.         sw = w.GetFocus()
  889.         
  890.         try:
  891.             sw.IncMenuItem()
  892.         except AttributeError:
  893.             
  894.             try:
  895.                 w.IncMenuItem()
  896.             except AttributeError:
  897.                 pass
  898.  
  899.  
  900.  
  901.     
  902.     def MenuDecItem(self):
  903.         w = self.MenuStack.Top()
  904.         sw = w.GetFocus()
  905.         
  906.         try:
  907.             sw.DecMenuItem()
  908.         except AttributeError:
  909.             
  910.             try:
  911.                 w.DecMenuItem()
  912.             except AttributeError:
  913.                 pass
  914.  
  915.  
  916.  
  917.     
  918.     def MenuSuprItem(self):
  919.         print 'MenuSuprItem(self)'
  920.         w = self.MenuStack.Top().GetFocus()
  921.         sw = w.GetFocus()
  922.         
  923.         try:
  924.             sw.SuprMenuItem()
  925.         except:
  926.             w.SuprMenuItem()
  927.  
  928.  
  929.     
  930.     def CommandPrb(self):
  931.         print 'Method CommandPrb'
  932.  
  933.     
  934.     def EndMenu(self):
  935.         while len(self.MenuStack.Top()) > 0:
  936.             self.DeActivateMenuItem()
  937.  
  938.  
  939. CtrlsPosition = (70, BUIx.B_FrameWidget.B_FR_AbsoluteLeft, BUIx.B_FrameWidget.B_FR_Left)
  940.  
  941. def GoTo2d(menu_class):
  942.     import GotoMapVars
  943.     GotoMapVars.EndOfLevel()
  944.  
  945. vsepexit = 200 - int(46 * ((600 - Raster.GetSize()[1]) / 120))
  946. if Reference.DEMO_MODE:
  947.     QuitMenu = {
  948.         'VSep': 30,
  949.         'Name': MenuText.GetMenuText('Exit'),
  950.         'Font': MenuFontBig,
  951.         'iFocus': 2,
  952.         'ListDescr': [
  953.             {
  954.                 'Name': MenuText.GetMenuText('Exit, Are you sure?'),
  955.                 'VSep': vsepexit,
  956.                 'Font': MenuFontBig,
  957.                 'Kind': MenuWidget.B_MenuItemTextNoFXNoFocus },
  958.             {
  959.                 'Name': MenuText.GetMenuText('Yes'),
  960.                 'VSep': 20,
  961.                 'Font': MenuFontMed,
  962.                 'ListDescr': [
  963.                     {
  964.                         'Name': 'Features',
  965.                         'Kind': MenuWidget.B_BackFeatures },
  966.                     {
  967.                         'Name': ' ' }] },
  968.             {
  969.                 'Name': MenuText.GetMenuText('No'),
  970.                 'VSep': 10,
  971.                 'Font': MenuFontMed,
  972.                 'Command': BackMenu },
  973.             {
  974.                 'Name': 'Back',
  975.                 'Kind': MenuWidget.B_BackBlank }] }
  976. else:
  977.     QuitMenu = {
  978.         'VSep': 30,
  979.         'Name': MenuText.GetMenuText('Exit'),
  980.         'Font': MenuFontBig,
  981.         'iFocus': 1,
  982.         'ListDescr': [
  983.             {
  984.                 'Name': MenuText.GetMenuText('Exit, Are you sure?'),
  985.                 'VSep': vsepexit,
  986.                 'Font': MenuFontBig,
  987.                 'Kind': MenuWidget.B_MenuItemTextNoFXNoFocus },
  988.             {
  989.                 'Name': MenuText.GetMenuText('Yes'),
  990.                 'VSep': 20,
  991.                 'Command': CmdQuit,
  992.                 'Font': MenuFontMed },
  993.             {
  994.                 'Name': MenuText.GetMenuText('No'),
  995.                 'VSep': 10,
  996.                 'Font': MenuFontMed,
  997.                 'Command': BackMenu },
  998.             {
  999.                 'Name': 'Back',
  1000.                 'Kind': MenuWidget.B_BackBlank }] }
  1001. PlayerConfigMenu = [
  1002.     {
  1003.         'Name': MenuText.GetMenuText('Name:'),
  1004.         'VSep': 30,
  1005.         'Kind': netwidgets.B_InputBox,
  1006.         'MaxSize': 16,
  1007.         'GetInput': NetMisc.GetPlayerName,
  1008.         'SetInput': NetMisc.SetPlayerName },
  1009.     {
  1010.         'Name': MenuText.GetMenuText('Character:'),
  1011.         'Font': MenuFontMed,
  1012.         'Kind': MenuWidget.B_MenuItemOption,
  1013.         'Options': [
  1014.             MenuText.GetMenuText('Knight'),
  1015.             MenuText.GetMenuText('Barbarian'),
  1016.             MenuText.GetMenuText('Dwarf'),
  1017.             MenuText.GetMenuText('Amazon')],
  1018.         'SelOptionFunc': NetMisc.GetCharType,
  1019.         'Command': NetMisc.SetCharType },
  1020.     {
  1021.         'Name': 'Lista de jugadores',
  1022.         'Kind': netwidgets.B_ImageListWidget,
  1023.         'ImageList': NetMisc.CharBitmaps,
  1024.         'GetCharType': NetMisc.GetCharStatus,
  1025.         'VSep': 30 },
  1026.     {
  1027.         'Name': MenuText.GetMenuText('Next Skin'),
  1028.         'VSep': 30,
  1029.         'Command': NetMisc.NextSkin },
  1030.     {
  1031.         'Name': MenuText.GetMenuText('Handicap:'),
  1032.         'Kind': MenuWidget.B_MenuSpin,
  1033.         'SpinValues': (1, 4, 3),
  1034.         'SpinGetValue': NetMisc.GetHandicap,
  1035.         'SpinSetValueEnd': NetMisc.SetHandicap },
  1036.     {
  1037.         'Name': MenuText.GetMenuText('Save'),
  1038.         'Command': NetMisc.SavePlayerConfiguration },
  1039.     {
  1040.         'Name': 'Back',
  1041.         'Kind': MenuWidget.B_BackBlank }]
  1042.  
  1043. def MapLoading(option):
  1044.     if Character == 0:
  1045.         Bladex.LoadLevel('Ruins_M4')
  1046.     
  1047.     if Character == 1:
  1048.         Bladex.LoadLevel('Barb_M1')
  1049.     
  1050.     if Character == 2:
  1051.         Bladex.LoadLevel('Ragnar_M2')
  1052.     
  1053.     if Character == 3:
  1054.         Bladex.LoadLevel('Dwarf_M3')
  1055.     
  1056.  
  1057. TutGameChoosing = {
  1058.     'Name': 'TopMenu',
  1059.     'Kind': MenuWidget.B_MenuItemTextNoFX,
  1060.     'ListDescr': [
  1061.         {
  1062.             'Name': MenuText.GetMenuText('Enter Tutorial'),
  1063.             'VSep': 250,
  1064.             'Font': MenuFontBig,
  1065.             'Command': LoadTutorial },
  1066.         {
  1067.             'Name': MenuText.GetMenuText('Continue'),
  1068.             'Font': MenuFontBig,
  1069.             'Command': MapLoading },
  1070.         BackOption,
  1071.         {
  1072.             'Name': 'Back',
  1073.             'Kind': MenuWidget.B_BackImageWidget }] }
  1074. NormalMenu = 1
  1075.  
  1076. def SwitchCasaByGlobalMenu():
  1077.     global Desc1, TutGameChoosing
  1078.     DescAux = Desc1
  1079.     Desc1 = TutGameChoosing
  1080.     TutGameChoosing = DescAux
  1081.     DescAux = None
  1082.  
  1083.  
  1084. def SwitchToCasaMenu():
  1085.     global NormalMenu
  1086.     if NormalMenu:
  1087.         NormalMenu = 0
  1088.         SwitchCasaByGlobalMenu()
  1089.         if Reference.DEMO_MODE:
  1090.             GetMenuItem([
  1091.                 'Enter Tutorial'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
  1092.         
  1093.     
  1094.  
  1095.  
  1096. def SwitchToGlobalMenu():
  1097.     global NormalMenu
  1098.     if not NormalMenu:
  1099.         NormalMenu = 1
  1100.         SwitchCasaByGlobalMenu()
  1101.     
  1102.  
  1103. if netgame.GetNetState() != 0:
  1104.     PlayerConfigMenu.insert(6, {
  1105.         'Name': MenuText.GetMenuText('This modification will take effect in the next arena'),
  1106.         'VSep': 20,
  1107.         'Font': MenuFontSmall,
  1108.         'Kind': MenuWidget.B_MenuItemTextNoFXNoFocus })
  1109.     Desc1 = {
  1110.         'Name': 'TopMenu',
  1111.         'Kind': MenuWidget.B_MenuItemTextNoFX,
  1112.         'ListDescr': [
  1113.             {
  1114.                 'Name': MenuText.GetMenuText('Disconnect'),
  1115.                 'VSep': 220,
  1116.                 'Font': MenuFontBig,
  1117.                 'Command': NetMisc.Disconnect },
  1118.             {
  1119.                 'Name': MenuText.GetMenuText('Modify Player'),
  1120.                 'Font': MenuFontBig,
  1121.                 'ListDescr': PlayerConfigMenu },
  1122.             QuitMenu,
  1123.             {
  1124.                 'Name': 'Back',
  1125.                 'Kind': MenuWidget.B_BackImageWidget }] }
  1126. else:
  1127.     Desc1 = {
  1128.         'Name': 'TopMenu',
  1129.         'Size': (640, 480),
  1130.         'Kind': MenuWidget.B_MenuItemTextNoFX,
  1131.         'ListDescr': [
  1132.             {
  1133.                 'Name': MenuText.GetMenuText('Game'),
  1134.                 'Font': MenuFontBig,
  1135.                 'VSep': 200,
  1136.                 'ListDescr': [
  1137.                     {
  1138.                         'Name': MenuText.GetMenuText('Start New Game'),
  1139.                         'Font': MenuFontBig,
  1140.                         'VSep': 220,
  1141.                         'Command': LoadPlayerSelect },
  1142.                     {
  1143.                         'Name': MenuText.GetMenuText('Save Current'),
  1144.                         'Font': MenuFontBig,
  1145.                         'ListDescr': [
  1146.                             {
  1147.                                 'Name': MenuText.GetMenuText('Savegame Slot 1:'),
  1148.                                 'Font': MenuFontBig,
  1149.                                 'VSep': 200,
  1150.                                 'Command': SaveGame1 },
  1151.                             {
  1152.                                 'Name': MenuText.GetMenuText('Savegame Slot 2:'),
  1153.                                 'Font': MenuFontBig,
  1154.                                 'VSep': 20,
  1155.                                 'Command': SaveGame2 },
  1156.                             {
  1157.                                 'Name': MenuText.GetMenuText('Savegame Slot 3:'),
  1158.                                 'Font': MenuFontBig,
  1159.                                 'VSep': 20,
  1160.                                 'Command': SaveGame3 },
  1161.                             {
  1162.                                 'Name': MenuText.GetMenuText('Savegame Slot 4:'),
  1163.                                 'Font': MenuFontBig,
  1164.                                 'VSep': 20,
  1165.                                 'Command': SaveGame4 },
  1166.                             {
  1167.                                 'Name': 'Back',
  1168.                                 'Kind': MenuWidget.B_BackImageWidget }] },
  1169.                     {
  1170.                         'Name': MenuText.GetMenuText('Load Saved'),
  1171.                         'Font': MenuFontBig,
  1172.                         'ListDescr': [
  1173.                             {
  1174.                                 'Name': MenuText.GetMenuText('Load Game at Slot 1:'),
  1175.                                 'Font': MenuFontBig,
  1176.                                 'VSep': 200,
  1177.                                 'Command': LoadGame },
  1178.                             {
  1179.                                 'Name': MenuText.GetMenuText('Load Game at Slot 2:'),
  1180.                                 'Font': MenuFontBig,
  1181.                                 'VSep': 20,
  1182.                                 'Command': LoadGame2 },
  1183.                             {
  1184.                                 'Name': MenuText.GetMenuText('Load Game at Slot 3:'),
  1185.                                 'Font': MenuFontBig,
  1186.                                 'VSep': 20,
  1187.                                 'Command': LoadGame3 },
  1188.                             {
  1189.                                 'Name': MenuText.GetMenuText('Load Game at Slot 4:'),
  1190.                                 'Font': MenuFontBig,
  1191.                                 'VSep': 20,
  1192.                                 'Command': LoadGame4 },
  1193.                             {
  1194.                                 'Name': 'Back',
  1195.                                 'Kind': MenuWidget.B_BackImageWidget }] },
  1196.                     {
  1197.                         'Name': MenuText.GetMenuText('Arena'),
  1198.                         'Font': MenuFontBig,
  1199.                         'VSep': 20,
  1200.                         'ListDescr': [
  1201.                             {
  1202.                                 'Name': MenuText.GetMenuText('Connection:'),
  1203.                                 'Font': MenuFontMed,
  1204.                                 'VSep': 250,
  1205.                                 'Kind': MenuWidget.B_MenuItemOption,
  1206.                                 'Options': [
  1207.                                     MenuText.GetMenuText('IPX (Local network)'),
  1208.                                     MenuText.GetMenuText('TCP/IP (Internet)')],
  1209.                                 'SelOptionFunc': NetMisc.GetProtocol,
  1210.                                 'Command': NetMisc.SetProtocol },
  1211.                             {
  1212.                                 'Name': MenuText.GetMenuText('New arena'),
  1213.                                 'Font': MenuFontBig,
  1214.                                 'ListDescr': [
  1215.                                     {
  1216.                                         'Name': MenuText.GetMenuText('Name:'),
  1217.                                         'VSep': 20,
  1218.                                         'Kind': netwidgets.B_InputBox,
  1219.                                         'MaxSize': 16,
  1220.                                         'GetInput': NetMisc.GetArenaName,
  1221.                                         'SetInput': NetMisc.SetArenaName },
  1222.                                     {
  1223.                                         'Name': 'Lista de mapas',
  1224.                                         'Kind': netwidgets.B_MapListWidget,
  1225.                                         'LeftMap': '..\\..\\Data\\net\\MapL.bmp',
  1226.                                         'RightMap': '..\\..\\Data\\net\\MapR.bmp',
  1227.                                         'SelMap': '..\\..\\Data\\net\\MapM.bmp',
  1228.                                         'MarkMap': '..\\..\\Data\\net\\MapS.bmp',
  1229.                                         'MapGetValue': NetMisc.GetArenaMaps,
  1230.                                         'MapSetValue': NetMisc.SetArenaMaps,
  1231.                                         'VSep': 15 },
  1232.                                     {
  1233.                                         'Name': MenuText.GetMenuText('The bad place'),
  1234.                                         'VSep': 1,
  1235.                                         'Kind': netwidgets.B_DescriptorLabel },
  1236.                                     {
  1237.                                         'Name': MenuText.GetMenuText('Max players:'),
  1238.                                         'Kind': MenuWidget.B_MenuSpin,
  1239.                                         'SpinValues': (2, 10, 8),
  1240.                                         'SpinGetValue': NetMisc.GetMaxPlayers,
  1241.                                         'SpinSetValueEnd': NetMisc.SetMaxPlayers,
  1242.                                         'VSep': 30 },
  1243.                                     {
  1244.                                         'Name': MenuText.GetMenuText('Max handicap:'),
  1245.                                         'Kind': MenuWidget.B_MenuSpin,
  1246.                                         'SpinValues': (1, 4, 3),
  1247.                                         'SpinGetValue': NetMisc.GetArenaHandicap,
  1248.                                         'SpinSetValueEnd': NetMisc.SetArenaHandicap },
  1249.                                     {
  1250.                                         'Name': MenuText.GetMenuText('Packets per second:'),
  1251.                                         'Font': MenuFontMed,
  1252.                                         'Kind': MenuWidget.B_MenuItemOption,
  1253.                                         'Options': [
  1254.                                             MenuText.GetMenuText('Variable'),
  1255.                                             '10',
  1256.                                             '20',
  1257.                                             '30',
  1258.                                             '40',
  1259.                                             '50',
  1260.                                             '60'],
  1261.                                         'SelOptionFunc': NetMisc.GetPPS,
  1262.                                         'Command': NetMisc.SetPPS },
  1263.                                     {
  1264.                                         'Name': MenuText.GetMenuText('Player configuration'),
  1265.                                         'ListDescr': PlayerConfigMenu },
  1266.                                     {
  1267.                                         'Name': MenuText.GetMenuText('Death Limit:'),
  1268.                                         'Kind': MenuWidget.B_MenuSpin,
  1269.                                         'SpinValues': (1, 51, 50),
  1270.                                         'SpinGetValue': NetMisc.GetFragLimit,
  1271.                                         'SpinSetValueEnd': NetMisc.SetFragLimit },
  1272.                                     {
  1273.                                         'Name': MenuText.GetMenuText('Start'),
  1274.                                         'Command': NetMisc.StartServer },
  1275.                                     {
  1276.                                         'Name': 'Back',
  1277.                                         'Kind': MenuWidget.B_BackBlank }] },
  1278.                             {
  1279.                                 'Name': MenuText.GetMenuText('Join game'),
  1280.                                 'Font': MenuFontBig,
  1281.                                 'ListDescr': [
  1282.                                     {
  1283.                                         'Name': MenuText.GetMenuText('Address:'),
  1284.                                         'Kind': netwidgets.B_InputBox,
  1285.                                         'MaxSize': 32,
  1286.                                         'GetInput': NetMisc.GetIp,
  1287.                                         'SetInput': NetMisc.SetIp,
  1288.                                         'Locked': NetMisc.IpLooked,
  1289.                                         'VSep': 120 },
  1290.                                     {
  1291.                                         'Name': MenuText.GetMenuText('Search'),
  1292.                                         'Command': NetMisc.BrowseServers },
  1293.                                     {
  1294.                                         'Name': MenuText.GetMenuText("Server's list"),
  1295.                                         'Kind': netwidgets.B_ServerListWidget,
  1296.                                         'Size': (610, 200),
  1297.                                         'ListDescr': [] },
  1298.                                     {
  1299.                                         'Name': MenuText.GetMenuText('Player configuration'),
  1300.                                         'ListDescr': PlayerConfigMenu },
  1301.                                     {
  1302.                                         'Name': 'Back',
  1303.                                         'Kind': MenuWidget.B_BackBlank }] },
  1304.                             {
  1305.                                 'Name': MenuText.GetMenuText('Player configuration'),
  1306.                                 'Font': MenuFontBig,
  1307.                                 'ListDescr': PlayerConfigMenu },
  1308.                             {
  1309.                                 'Name': 'Back',
  1310.                                 'Kind': MenuWidget.B_BackImageWidget }] },
  1311.                     BackOption,
  1312.                     {
  1313.                         'Name': 'Back',
  1314.                         'Kind': MenuWidget.B_BackImageWidget }] },
  1315.             {
  1316.                 'Name': MenuText.GetMenuText('Travel Book'),
  1317.                 'Font': MenuFontBig,
  1318.                 'Command': ExecTravelBook },
  1319.             {
  1320.                 'Name': MenuText.GetMenuText('Options'),
  1321.                 'Font': MenuFontBig,
  1322.                 'ListDescr': [
  1323.                     {
  1324.                         'Name': MenuText.GetMenuText('Video'),
  1325.                         'VSep': 230,
  1326.                         'Font': MenuFontBig,
  1327.                         'ListDescr': [
  1328.                             {
  1329.                                 'Name': MenuText.GetMenuText('Gamma Level'),
  1330.                                 'VSep': 240,
  1331.                                 'Font': MenuFontMed,
  1332.                                 'Kind': MenuWidget.B_MenuSpin,
  1333.                                 'SpinValues': (0.0, 1.0, 20),
  1334.                                 'SpinGetValue': GetGammaValue,
  1335.                                 'SpinOnChange': SetGammaValue,
  1336.                                 'SpinSetValue': SetGammaValue },
  1337.                             {
  1338.                                 'Name': MenuText.GetMenuText('Contrast Level'),
  1339.                                 'VSep': 15,
  1340.                                 'Font': MenuFontMed,
  1341.                                 'Kind': MenuWidget.B_MenuSpin,
  1342.                                 'SpinValues': (0.5, 4.0, 35),
  1343.                                 'SpinGetValue': GetContrastValue,
  1344.                                 'SpinOnChange': SetContrastValue,
  1345.                                 'SpinSetValue': SetContrastValue },
  1346.                             {
  1347.                                 'Name': MenuText.GetMenuText('Brightness Level'),
  1348.                                 'VSep': 15,
  1349.                                 'Font': MenuFontMed,
  1350.                                 'Kind': MenuWidget.B_MenuSpin,
  1351.                                 'SpinValues': (0.0, 50.0, 25),
  1352.                                 'SpinGetValue': GetBrightnessValue,
  1353.                                 'SpinOnChange': SetBrightnessValue,
  1354.                                 'SpinSetValue': SetBrightnessValue },
  1355.                             BackOption,
  1356.                             {
  1357.                                 'Name': 'Back',
  1358.                                 'Kind': MenuWidget.B_BackImageWidget }] },
  1359.                     {
  1360.                         'Name': MenuText.GetMenuText('Sound'),
  1361.                         'Font': MenuFontBig,
  1362.                         'ListDescr': [
  1363.                             {
  1364.                                 'Name': MenuText.GetMenuText('FX Volume'),
  1365.                                 'VSep': 230,
  1366.                                 'Font': MenuFontMed,
  1367.                                 'Kind': MenuWidget.B_MenuSpin,
  1368.                                 'SpinValues': (int(0), int(10), int(10)),
  1369.                                 'SpinGetValue': GetSoundValue,
  1370.                                 'SpinSetValueEnd': SetSoundValue },
  1371.                             {
  1372.                                 'Name': MenuText.GetMenuText('Music Volume'),
  1373.                                 'VSep': 10,
  1374.                                 'Font': MenuFontMed,
  1375.                                 'Kind': MenuWidget.B_MenuSpin,
  1376.                                 'SpinValues': (int(0), int(10), int(10)),
  1377.                                 'SpinGetValue': GetMusicValue,
  1378.                                 'SpinSetValueEnd': SetMusicValue },
  1379.                             {
  1380.                                 'Name': MenuText.GetMenuText('Sound Quality:'),
  1381.                                 'VSep': 10,
  1382.                                 'Font': MenuFontMed,
  1383.                                 'Kind': MenuWidget.B_MenuItemOption,
  1384.                                 'Options': [
  1385.                                     MenuText.GetMenuText('Low'),
  1386.                                     MenuText.GetMenuText('Med'),
  1387.                                     MenuText.GetMenuText('High')],
  1388.                                 'SelOptionFunc': GetSoundQuality,
  1389.                                 'Command': SetSoundQuality },
  1390.                             {
  1391.                                 'Name': MenuText.GetMenuText('EAX:'),
  1392.                                 'VSep': 10,
  1393.                                 'Font': MenuFontMed,
  1394.                                 'Options': [
  1395.                                     MenuText.GetMenuText('Disabled'),
  1396.                                     MenuText.GetMenuText('Enabled')],
  1397.                                 'Kind': MenuWidget.B_MenuItemOption,
  1398.                                 'SelOptionFunc': GetEAX,
  1399.                                 'Command': SetEAX },
  1400.                             {
  1401.                                 'Name': MenuText.GetMenuText('EAX is sound alteration system for improved environment realism'),
  1402.                                 'VSep': 5,
  1403.                                 'Font': MenuFontSmall,
  1404.                                 'Kind': MenuWidget.B_MenuItemTextNoFXNoFocus },
  1405.                             {
  1406.                                 'Name': MenuText.GetMenuText('Speaker Configuration:'),
  1407.                                 'VSep': 10,
  1408.                                 'Font': MenuFontMed,
  1409.                                 'Options': [
  1410.                                     MenuText.GetMenuText('Earphones'),
  1411.                                     MenuText.GetMenuText('2'),
  1412.                                     MenuText.GetMenuText('2 + Subwoofer'),
  1413.                                     MenuText.GetMenuText('4')],
  1414.                                 'Kind': MenuWidget.B_MenuItemOption,
  1415.                                 'SelOptionFunc': GetSpeakerConfig,
  1416.                                 'Command': SetSpeakerConfig },
  1417.                             BackOption,
  1418.                             {
  1419.                                 'Name': 'Back',
  1420.                                 'Kind': MenuWidget.B_BackImageWidget }] },
  1421.                     {
  1422.                         'Name': MenuText.GetMenuText('Controls'),
  1423.                         'Font': MenuFontBig,
  1424.                         'ListDescr': [
  1425.                             {
  1426.                                 'Name': MenuText.GetMenuText('General Actions'),
  1427.                                 'VSep': 230,
  1428.                                 'Font': MenuFontBig,
  1429.                                 'ListDescr': [
  1430.                                     {
  1431.                                         'Name': MenuText.GetMenuText('Configure Actions'),
  1432.                                         'VSep': 240,
  1433.                                         'Font': MenuFontBig,
  1434.                                         'ListDescr': [
  1435.                                             {
  1436.                                                 'Name': 'KeybList',
  1437.                                                 'Kind': KeybWidget.B_KeybListWidget,
  1438.                                                 'VSep': 170,
  1439.                                                 'Size': (610, 200),
  1440.                                                 'ListDescr': KeybActions },
  1441.                                             BackOption,
  1442.                                             {
  1443.                                                 'Name': 'Back',
  1444.                                                 'Kind': MenuWidget.B_BackImageWidget }] },
  1445.                                     {
  1446.                                         'Name': MenuText.GetMenuText('Reset'),
  1447.                                         'VSep': 10,
  1448.                                         'Font': MenuFontBig,
  1449.                                         'Command': ResetKeyB },
  1450.                                     BackOption,
  1451.                                     {
  1452.                                         'Name': 'Back',
  1453.                                         'Kind': MenuWidget.B_BackImageWidget }] },
  1454.                             {
  1455.                                 'Name': MenuText.GetMenuText('Mouse'),
  1456.                                 'Font': MenuFontBig,
  1457.                                 'ListDescr': [
  1458.                                     {
  1459.                                         'Name': MenuText.GetMenuText('Invert'),
  1460.                                         'VSep': 250,
  1461.                                         'Font': MenuFontMed,
  1462.                                         'Kind': MenuWidget.B_MenuItemOption,
  1463.                                         'Options': [
  1464.                                             MenuText.GetMenuText('Yes'),
  1465.                                             MenuText.GetMenuText('No')],
  1466.                                         'SelOptionFunc': GetMouseInvert,
  1467.                                         'Command': SetMouseInvert },
  1468.                                     {
  1469.                                         'Name': MenuText.GetMenuText('X Speed'),
  1470.                                         'Font': MenuFontMed,
  1471.                                         'Kind': MenuWidget.B_MenuSpin,
  1472.                                         'SpinValues': (int(0), int(10), int(10)),
  1473.                                         'SpinGetValue': GetMouseXSens,
  1474.                                         'SpinSetValueEnd': SetMouseXSens },
  1475.                                     {
  1476.                                         'Name': MenuText.GetMenuText('Y Speed'),
  1477.                                         'Font': MenuFontMed,
  1478.                                         'Kind': MenuWidget.B_MenuSpin,
  1479.                                         'SpinValues': (int(0), int(10), int(10)),
  1480.                                         'SpinGetValue': GetMouseYSens,
  1481.                                         'SpinSetValueEnd': SetMouseYSens },
  1482.                                     BackOption,
  1483.                                     {
  1484.                                         'Name': 'Back',
  1485.                                         'Kind': MenuWidget.B_BackImageWidget }] },
  1486.                             {
  1487.                                 'Name': MenuText.GetMenuText('(Gamepad)'),
  1488.                                 'Font': MenuFontBig,
  1489.                                 'ListDescr': [
  1490.                                     {
  1491.                                         'Name': MenuText.GetMenuText('Invert'),
  1492.                                         'VSep': 250,
  1493.                                         'Font': MenuFontMed,
  1494.                                         'Kind': MenuWidget.B_MenuItemOption,
  1495.                                         'Options': [
  1496.                                             MenuText.GetMenuText('Yes'),
  1497.                                             MenuText.GetMenuText('No')],
  1498.                                         'SelOptionFunc': GetMouseInvert,
  1499.                                         'Command': SetMouseInvert },
  1500.                                     {
  1501.                                         'Name': MenuText.GetMenuText('X Speed'),
  1502.                                         'Font': MenuFontMed,
  1503.                                         'Kind': MenuWidget.B_MenuSpin,
  1504.                                         'SpinValues': (int(0), int(10), int(10)),
  1505.                                         'SpinGetValue': GetMouseXSens,
  1506.                                         'SpinSetValueEnd': SetMouseXSens },
  1507.                                     {
  1508.                                         'Name': MenuText.GetMenuText('Y Speed'),
  1509.                                         'Font': MenuFontMed,
  1510.                                         'Kind': MenuWidget.B_MenuSpin,
  1511.                                         'SpinValues': (int(0), int(10), int(10)),
  1512.                                         'SpinGetValue': GetMouseYSens,
  1513.                                         'SpinSetValueEnd': SetMouseYSens },
  1514.                                     BackOption,
  1515.                                     {
  1516.                                         'Name': 'Back',
  1517.                                         'Kind': MenuWidget.B_BackImageWidget }] },
  1518.                             BackOption,
  1519.                             {
  1520.                                 'Name': 'Back',
  1521.                                 'Kind': MenuWidget.B_BackImageWidget }] },
  1522.                     {
  1523.                         'Name': MenuText.GetMenuText('Game Options'),
  1524.                         'Font': MenuFontBig,
  1525.                         'ListDescr': [
  1526.                             {
  1527.                                 'Name': MenuText.GetMenuText('Auto-Facing:'),
  1528.                                 'VSep': 240,
  1529.                                 'Font': MenuFontMed,
  1530.                                 'Kind': MenuWidget.B_MenuItemOption,
  1531.                                 'Options': [
  1532.                                     MenuText.GetMenuText('No'),
  1533.                                     MenuText.GetMenuText('Yes')],
  1534.                                 'Command': SetFacing,
  1535.                                 'SelOptionFunc': GetFacing },
  1536.                             {
  1537.                                 'Name': MenuText.GetMenuText('De-Facing Time'),
  1538.                                 'Kind': MenuWidget.B_MenuSpin,
  1539.                                 'SpinValues': (int(1), int(30), int(29)),
  1540.                                 'SpinGetValue': GetDeFacingValue,
  1541.                                 'SpinSetValueEnd': SetDeFacingValue },
  1542.                             {
  1543.                                 'Name': MenuText.GetMenuText('Character Shadows:'),
  1544.                                 'VSep': 15,
  1545.                                 'Font': MenuFontMed,
  1546.                                 'Kind': MenuWidget.B_MenuItemOption,
  1547.                                 'Options': [
  1548.                                     MenuText.GetMenuText('Yes'),
  1549.                                     MenuText.GetMenuText('No')],
  1550.                                 'SelOptionFunc': ShadowsSettings,
  1551.                                 'Command': SetShadows },
  1552.                             {
  1553.                                 'Name': MenuText.GetMenuText('Gore'),
  1554.                                 'Font': MenuFontMed,
  1555.                                 'VSep': 30,
  1556.                                 'ListDescr': [
  1557.                                     {
  1558.                                         'Name': MenuText.GetMenuText('Parental Lock'),
  1559.                                         'Font': MenuFontBig,
  1560.                                         'VSep': 250,
  1561.                                         'ListDescr': [
  1562.                                             {
  1563.                                                 'Name': MenuText.GetMenuText('Password:'),
  1564.                                                 'VSep': 200,
  1565.                                                 'Kind': netwidgets.B_InputBox,
  1566.                                                 'MaxSize': 8,
  1567.                                                 'GetInput': Empty,
  1568.                                                 'SetInput': SetPass,
  1569.                                                 'PasswordChar': '#' },
  1570.                                             {
  1571.                                                 'Name': MenuText.GetMenuText('Change Password'),
  1572.                                                 'ListDescr': [
  1573.                                                     {
  1574.                                                         'Name': MenuText.GetMenuText('Change Password'),
  1575.                                                         'VSep': 200,
  1576.                                                         'Font': MenuFontBig,
  1577.                                                         'Kind': MenuWidget.B_MenuItemTextNoFXNoFocus },
  1578.                                                     {
  1579.                                                         'Name': MenuText.GetMenuText('Current Password:'),
  1580.                                                         'Kind': netwidgets.B_InputBox,
  1581.                                                         'MaxSize': 8,
  1582.                                                         'GetInput': Empty,
  1583.                                                         'SetInput': SetPass,
  1584.                                                         'PasswordChar': '#',
  1585.                                                         'VSep': 20 },
  1586.                                                     {
  1587.                                                         'Name': MenuText.GetMenuText('New Password:'),
  1588.                                                         'Kind': netwidgets.B_InputBox,
  1589.                                                         'MaxSize': 8,
  1590.                                                         'GetInput': Empty,
  1591.                                                         'SetInput': SetNewPass,
  1592.                                                         'PasswordChar': '#' },
  1593.                                                     {
  1594.                                                         'Name': MenuText.GetMenuText('Confirm New Password:'),
  1595.                                                         'Kind': netwidgets.B_InputBox,
  1596.                                                         'MaxSize': 8,
  1597.                                                         'GetInput': Empty,
  1598.                                                         'SetInput': SetConfNewPass,
  1599.                                                         'PasswordChar': '#' },
  1600.                                                     {
  1601.                                                         'Name': MenuText.GetMenuText('OK'),
  1602.                                                         'Command': SavePassword,
  1603.                                                         'VSep': 40 },
  1604.                                                     {
  1605.                                                         'Name': 'Back',
  1606.                                                         'Kind': MenuWidget.B_BackBlank }] },
  1607.                                             BackOption,
  1608.                                             {
  1609.                                                 'Name': 'Back',
  1610.                                                 'Kind': MenuWidget.B_BackBlank }] },
  1611.                                     {
  1612.                                         'VSep': 20,
  1613.                                         'Name': MenuText.GetMenuText('Blood:'),
  1614.                                         'Font': MenuFontBig,
  1615.                                         'Kind': MenuWidget.B_MenuItemOption,
  1616.                                         'Options': [
  1617.                                             MenuText.GetMenuText('Yes'),
  1618.                                             MenuText.GetMenuText('No')],
  1619.                                         'Command': SetBlood,
  1620.                                         'SelOptionFunc': BloodSettings,
  1621.                                         'CheckPass': CheckGorePassWord },
  1622.                                     {
  1623.                                         'Name': MenuText.GetMenuText('Mutilations:'),
  1624.                                         'Font': MenuFontBig,
  1625.                                         'Kind': MenuWidget.B_MenuItemOption,
  1626.                                         'Options': [
  1627.                                             MenuText.GetMenuText('Yes'),
  1628.                                             MenuText.GetMenuText('No')],
  1629.                                         'Command': SetMutilation,
  1630.                                         'SelOptionFunc': MutilationSettings,
  1631.                                         'CheckPass': CheckGorePassWord },
  1632.                                     BackOption,
  1633.                                     {
  1634.                                         'Name': 'Back',
  1635.                                         'Kind': MenuWidget.B_BackImageWidget }] },
  1636.                             BackOption,
  1637.                             {
  1638.                                 'Name': 'Back',
  1639.                                 'Kind': MenuWidget.B_BackImageWidget }] },
  1640.                     BackOption,
  1641.                     {
  1642.                         'Name': 'Back',
  1643.                         'Kind': MenuWidget.B_BackImageWidget }] },
  1644.             {
  1645.                 'Name': MenuText.GetMenuText('Credits'),
  1646.                 'Font': MenuFontBig,
  1647.                 'ListDescr': [
  1648.                     {
  1649.                         'Name': MenuText.GetMenuText('Sub SubMenu51') },
  1650.                     {
  1651.                         'Name': MenuText.GetMenuText('Sub SubMenu52') }] },
  1652.             QuitMenu,
  1653.             {
  1654.                 'Name': 'Back',
  1655.                 'Kind': MenuWidget.B_BackImageWidget }] }
  1656.     if 'Casa' != Bladex.GetCurrentMap():
  1657.         Desc1['ListDescr'].insert(1, {
  1658.             'Name': MenuText.GetMenuText('Back To Game'),
  1659.             'Font': MenuFontBig,
  1660.             'Command': BackMenu })
  1661.     
  1662.  
  1663. def BackMap():
  1664.     Desc1['ListDescr'].insert(len(Desc1['ListDescr']) - 1, {
  1665.         'Name': MenuText.GetMenuText('Leave Rune Quest'),
  1666.         'Font': MenuFontBig,
  1667.         'Command': GoTo2d,
  1668.         'VSep': 20 })
  1669.  
  1670.  
  1671. def GetMenuItem(way):
  1672.     idx = 0
  1673.     continueflag = 1
  1674.     MenuLevel = Desc1
  1675.     ReturnValue = 1
  1676.     while continueflag:
  1677.         continueflag = 0
  1678.         for val in MenuLevel['ListDescr']:
  1679.             if val.has_key('Name'):
  1680.                 print 'see', val['Name']
  1681.                 if MenuText.GetInverseMenuText(val['Name']) == way[idx]:
  1682.                     idx = idx + 1
  1683.                     if len(way) == idx:
  1684.                         ReturnValue = val
  1685.                     elif val.has_key('ListDescr'):
  1686.                         continueflag = 1
  1687.                         MenuLevel = val
  1688.                         print 'Searching at', val['Name']
  1689.                     else:
  1690.                         print val['Name'], 'is not a list'
  1691.                     break
  1692.                 
  1693.             
  1694.         
  1695.     MenuLevel = None
  1696.     return ReturnValue
  1697.  
  1698.  
  1699. def InitMenuKeys():
  1700.     Raster.SetTextMode(3)
  1701.     InputManager = BInput.GetInputManager()
  1702.     InputManager.AddInputActionsSet('MenuRedefine')
  1703.     InputManager.AddInputActionsSet('Menu')
  1704.     oldInputActionsSet = InputManager.GetInputActionsSet()
  1705.     InputManager.SetInputActionsSet('Menu')
  1706.     InputManager.SetInputActionsSet('Default')
  1707.     Bladex.AddInputAction('Activate Menu', 0)
  1708.     Bladex.AssocKey('Activate Menu', 'Keyboard', 'Esc')
  1709.     Bladex.AddBoundFunc('Activate Menu', PreActivateMenu)
  1710.     InputManager.SetInputActionsSet(oldInputActionsSet)
  1711.     print 'Activadas!'
  1712.     if Reference.DEMO_MODE == 1:
  1713.         GetMenuItem([
  1714.             'Travel Book'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
  1715.         GetMenuItem([
  1716.             'Credits'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
  1717.         del GetMenuItem([
  1718.             'Credits'])['ListDescr']
  1719.         GetMenuItem([
  1720.             'Game',
  1721.             'Save Current'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
  1722.         del GetMenuItem([
  1723.             'Game',
  1724.             'Save Current'])['ListDescr']
  1725.         GetMenuItem([
  1726.             'Game',
  1727.             'Load Saved'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
  1728.         del GetMenuItem([
  1729.             'Game',
  1730.             'Load Saved'])['ListDescr']
  1731.         GetMenuItem([
  1732.             'Game',
  1733.             'Arena'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
  1734.         del GetMenuItem([
  1735.             'Game',
  1736.             'Arena'])['ListDescr']
  1737.         GetMenuItem([
  1738.             'Options',
  1739.             'Controls',
  1740.             '(Gamepad)'])['Kind'] = MenuWidget.B_MenuItemTextNoFXNoFocus
  1741.         del GetMenuItem([
  1742.             'Options',
  1743.             'Controls',
  1744.             '(Gamepad)'])['ListDescr']
  1745.     
  1746.  
  1747.  
  1748. try:
  1749.     execfile('..\\..\\Scripts\\GameCfg.py')
  1750.     print 'Menu.py -> Executed GameCfg.py'
  1751. except:
  1752.     print 'Menu.py -> No GameCfg.py found'
  1753.  
  1754.