Exemplo n.º 1
0
 protected override void OnInitialize()
 {
     base.OnInitialize();
     _viewModel     = new CESettingsVM();
     _gauntletLayer = new GauntletLayer(1, "GauntletLayer");
     _gauntletLayer.LoadMovie("CaptivityEventsConfigScreen", _viewModel);
     _gauntletLayer.InputRestrictions.SetInputRestrictions(true, InputUsageMask.All);
     base.AddLayer(_gauntletLayer);
 }
Exemplo n.º 2
0
 protected CEGenericOptionDataVM(CESettingsVM optionsVM, ICEOptionData option, TextObject name, TextObject description, OptionsVM.OptionsDataType typeID)
 {
     _nameObj        = name;
     _descriptionObj = description;
     _optionsVM      = optionsVM;
     Option          = option;
     OptionTypeID    = (int)typeID;
     RefreshValues();
 }
Exemplo n.º 3
0
 public CESettingsVMCategory(CESettingsVM options, TextObject name, IEnumerable <ICEOptionData> targetList, bool isNative)
 {
     _options = new MBBindingList <CEGenericOptionDataVM>();
     IsNative = isNative;
     _nameObj = name;
     foreach (ICEOptionData optionData in targetList)
     {
         string     text       = optionData.GetName().ToString();
         TextObject name2      = new TextObject(text);
         TextObject textObject = new TextObject(text);
         textObject.SetTextVariable("newline", "\n");
         CEActionOptionData actionOptionData;
         if (optionData is ICEBooleanOptionData)
         {
             CEBooleanOptionDataVM booleanOptionDataVM = new CEBooleanOptionDataVM(options, optionData as ICEBooleanOptionData, name2, textObject)
             {
                 ImageIDs = new string[]
                 {
                     text + "_0",
                     text + "_1"
                 }
             };
             _options.Add(booleanOptionDataVM);
         }
         else if (optionData is ICENumericOptionData)
         {
             CENumericOptionDataVM item = new CENumericOptionDataVM(options, optionData as ICENumericOptionData, name2, textObject);
             _options.Add(item);
         }
         else if (optionData is ICESelectionOptionData)
         {
             ICESelectionOptionData selectionOptionData = optionData as ICESelectionOptionData;
             CEStringOptionDataVM   stringOptionDataVM  = new CEStringOptionDataVM(options, selectionOptionData, name2, textObject);
             string[] array = new string[selectionOptionData.GetSelectableOptionsLimit()];
             for (int i = 0; i < array.Length; i++)
             {
                 array[i] = text + "_" + i;
             }
             stringOptionDataVM.ImageIDs = array;
             _options.Add(stringOptionDataVM);
         }
         else if ((actionOptionData = (optionData as CEActionOptionData)) != null)
         {
             TextObject           optionActionName = Module.CurrentModule.GlobalTextManager.FindText("str_options_type_action", text);
             CEActionOptionDataVM item2            = new CEActionOptionDataVM(actionOptionData.OnAction, options, actionOptionData, name2, optionActionName, textObject);
             _options.Add(item2);
         }
     }
     RefreshValues();
 }