示例#1
0
 private void OnLeaveWithoutSaveRequestClosed(PopupRequest.EResultType p_result, String p_inputString)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         BackToMainMenu();
     }
 }
示例#2
0
 public void QuitGame(PopupRequest.EResultType p_result, String p_inputString)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         Main.Instance.QuitGame();
     }
 }
示例#3
0
        private void OnErrorConfirmClosed(PopupRequest.EResultType p_result, String p_inputString)
        {
            String inputFieldText = IngameController.Instance.PopupRequest.InputFieldText;

            IngameController.Instance.PopupRequest.OpenRequest(PopupRequest.ERequestType.TEXTFIELD_CONFIRM, String.Empty, LocaManager.GetText("SAVEGAME_MENU_CREATE_NEW_SAVEGAME"), new PopupRequest.RequestCallback(OnSaveNewSlotRequestClosed));
            IngameController.Instance.PopupRequest.InputFieldText = inputFieldText;
        }
示例#4
0
        private void ResetToDefaultRequestCallback(PopupRequest.EResultType p_result, String p_inputString)
        {
            if (p_result == PopupRequest.EResultType.CONFIRMED)
            {
                switch (m_lastCategory)
                {
                case ECategory.GAME:
                    ConfigManager.Instance.LoadDefaultOptions();
                    ApplyGameOptions();
                    m_optionsGame.UpdateGUI();
                    break;

                case ECategory.INPUT:
                    KeyConfigManager.LoadDefaultSettings();
                    m_optionsInput.UpdateGUI();
                    break;

                case ECategory.GRAPHICS:
                    GraphicsConfigManager.LoadDefaultSettings();
                    GraphicsConfigManager.InitDefaultResolution();
                    GraphicsConfigManager.WriteConfigurations();
                    GraphicsConfigManager.Apply();
                    GraphicsConfigManager.ApplyBrightnessOrGamma();
                    m_optionsGraphics.UpdateGUI();
                    break;

                case ECategory.SOUND:
                    SoundConfigManager.LoadDefaultSettings();
                    m_optionsSound.UpdateGUI();
                    break;
                }
                ApplyChanges();
            }
        }
示例#5
0
 private void BackToMode(PopupRequest.EResultType p_result, String p_text)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         m_partyCreationCustom.Cleanup();
         ActivateStep(ECreationStep.STEP_SELECT_MODE);
     }
 }
 private void SellItemCallback(PopupRequest.EResultType p_result, String p_inputString)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         m_inventory.SellItem(m_itemToSell.Item, m_itemToSell.Index, 1);
     }
     m_itemToSell = null;
 }
示例#7
0
 private void SellItemCallback(PopupRequest.EResultType p_result, String p_inputString)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         m_itemToSell.ItemSlot.Parent.Inventory.SellItem(m_itemToSell.Item, m_itemToSell.ItemSlot.Index, 1);
     }
     DragDropManager.Instance.EndDragAction();
     m_itemToSell = null;
 }
 private void ItemSellSplitterCallback(PopupRequest.EResultType p_result, String p_inputString)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         Int32 count = PopupRequest.Instance.ItemSplitter.Count;
         m_inventory.SellItem(PopupRequest.Instance.ItemSplitter.Item, PopupRequest.Instance.ItemSplitter.ItemSlotIndex, count);
     }
     PopupRequest.Instance.ItemSplitter.Finish();
 }
示例#9
0
 private void PopupRequestCloseCallback(PopupRequest.EResultType p_result, String p_inputString)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         ApplyChanges();
     }
     else
     {
         ReloadConfigs();
     }
     ConfirmClose();
 }
示例#10
0
 private void OnRequestCallback(PopupRequest.EResultType p_result, String p_text)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         ItemDragObject itemDragObject = (ItemDragObject)DragDropManager.Instance.DraggedItem;
         LegacyLogic.Instance.EventManager.InvokeEvent(itemDragObject.Item, EEventType.INVENTORY_ITEM_DUMPED, EventArgs.Empty);
         DragDropManager.Instance.EndDragAction();
         AudioController.Play("SOU_ANNO4_Item_Destroy");
     }
     else
     {
         DragDropManager.Instance.CancelDragAction();
     }
 }
示例#11
0
 private void ItemSellSplitterCallback(PopupRequest.EResultType p_result, String p_inputString)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         PartyInventoryController partyInventoryController = LegacyLogic.Instance.WorldManager.Party.Inventory;
         if (partyInventoryController.GetItemAt(PopupRequest.Instance.ItemSplitter.ItemSlotIndex) != PopupRequest.Instance.ItemSplitter.Item)
         {
             partyInventoryController = LegacyLogic.Instance.WorldManager.Party.MuleInventory;
         }
         Int32 count = PopupRequest.Instance.ItemSplitter.Count;
         partyInventoryController.SellItem(PopupRequest.Instance.ItemSplitter.Item, PopupRequest.Instance.ItemSplitter.ItemSlotIndex, count);
     }
     PopupRequest.Instance.ItemSplitter.Finish();
 }
示例#12
0
 private void OnDeleteRequestClosed(PopupRequest.EResultType p_result, String p_text)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         DeleteSelectedSaveGame();
         m_selectedEntry.SetSelected(false);
         m_selectedEntry          = null;
         m_saveGameName.text      = LocaManager.GetText("SAVEGAMEMENU_SELECT_SAVEGAME");
         m_screenshot.mainTexture = m_defaultTexture;
         m_gameTimeLabel.text     = " - ";
         m_difficultyLabel.text   = String.Empty;
         LoadSaveGameList();
     }
 }
示例#13
0
 private void OnRequestClosed(PopupRequest.EResultType p_result, String p_text)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         if (m_selectedEntry != m_createNewSlotEntry || m_page > 0)
         {
             SaveGame(m_selectedEntry.name);
             ClickedEntry(null);
         }
         else
         {
             SaveGame(m_overrideName);
         }
     }
 }
示例#14
0
 private void OnRequestCallback(PopupRequest.EResultType p_result, String p_inputString)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         if (String.IsNullOrEmpty(PopupRequest.Instance.InputAreaText))
         {
             LegacyLogic.Instance.WorldManager.MapNotesController.RemoveMapNote(m_CurrentSelectedGridPosition);
         }
         else
         {
             LegacyLogic.Instance.WorldManager.MapNotesController.SetMapNoteText(m_CurrentSelectedGridPosition, PopupRequest.Instance.InputAreaText);
         }
     }
     else if (p_result == PopupRequest.EResultType.DELETE)
     {
         LegacyLogic.Instance.WorldManager.MapNotesController.RemoveMapNote(m_CurrentSelectedGridPosition);
     }
 }
示例#15
0
 private void OnLoadRequestClosed(PopupRequest.EResultType p_result, String p_text)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         LegacyLogic.Instance.WorldManager.IsSaveGame = true;
         LegacyLogic.Instance.WorldManager.Load(m_selectedEntry.name);
         if (LegacyLogic.Instance.WorldManager.SaveGameManager.CheckForError() == ESaveGameError.COULD_NOT_LOAD_SAVEGAME)
         {
             String text  = LocaManager.GetText("ERROR_POPUP_MESSAGE_CAPTION");
             String text2 = LocaManager.GetText("SAVEGAME_ERROR_LOADING_SAVEGAME");
             PopupRequest.Instance.OpenRequest(PopupRequest.ERequestType.CONFIRM, text, text2, null);
         }
         else if (OnClose != null)
         {
             OnClose(this, EventArgs.Empty);
         }
     }
 }
示例#16
0
 private void OnSaveNewSlotRequestClosed(PopupRequest.EResultType p_result, String p_saveGameName)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         if (CheckFileName(p_saveGameName))
         {
             if (LegacyLogic.Instance.WorldManager.SaveGameManager.SaveGameExists(p_saveGameName))
             {
                 m_overrideName    = p_saveGameName;
                 m_confirmOverride = true;
             }
             else
             {
                 SaveGame(p_saveGameName);
                 m_selectedEntry = null;
             }
         }
         else
         {
             Debug.Log("Wrong Filename");
         }
     }
 }
示例#17
0
 public void KeyBindRequestCallback(PopupRequest.EResultType p_result, String p_inputString)
 {
     if (p_result == PopupRequest.EResultType.CONFIRMED)
     {
         m_currentKeyView.ConfirmKeyBinding();
         Hotkey hotkey = KeyConfigManager.KeyBindings[m_currentOverrideHotkey];
         if (hotkey.Key1 == m_currentOverrideKeyCode)
         {
             hotkey.Key1 = KeyCode.None;
         }
         if (hotkey.AltKey1 == m_currentOverrideKeyCode)
         {
             hotkey.AltKey1 = KeyCode.None;
         }
         KeyConfigManager.KeyBindings[m_currentOverrideHotkey] = hotkey;
         InputManager.SetHotkeyData(hotkey);
         m_keyConfigViews[m_currentOverrideHotkey].UpdateHotkeys();
     }
     else
     {
         m_currentKeyView.CancelKeyBinding();
     }
 }