Esempio n. 1
0
 public InputSection(KeyBindingPanel keyConfig)
 {
     Children = new Drawable[]
     {
         new MouseSettings(),
         new KeyboardSettings(keyConfig),
     };
 }
Esempio n. 2
0
 public TestCaseKeyConfiguration()
 {
     Child = panel = new KeyBindingPanel();
 }
Esempio n. 3
0
 public void ToggleKeyBindingPanel(bool active)
 {
     KeyBindingPanel.SetActive(active);
     OptionsPanel.transform.GetChild(0).GetComponent <GameOptions>().enabled = !active;
 }
Esempio n. 4
0
 public TestSceneKeyBindingPanel()
 {
     Child = panel = new KeyBindingPanel();
 }
Esempio n. 5
0
 public InputSection(KeyBindingPanel keyConfig)
 {
     this.keyConfig = keyConfig;
 }
Esempio n. 6
0
    public void Initialize()
    {
        _panels = new List <PanelBase>();

        //GameObject uiRootObj = GameObject.Instantiate(Resources.Load("UI Root")) as GameObject;

        Root = GameObject.Find("UI Root").GetComponent <UIRoot>();

        //Root.manualHeight = Screen.height;
        //Root.manualWidth = Screen.width;

        UICamera = Root.transform.Find("Camera").GetComponent <Camera>();

        if (GameManager.Inst.SceneType == SceneType.Space)
        {
            HUDPanel = UICamera.transform.Find("HUDPanel").GetComponent <HUDPanel>();
            HUDPanel.Initialize();

            _panels.Add(HUDPanel);

            KeyBindingPanel = UICamera.transform.Find("KeyBindingPanel").GetComponent <KeyBindingPanel>();
            KeyBindingPanel.Initialize();
            _panels.Add(KeyBindingPanel);

            PowerManagementPanel = UICamera.transform.Find("PowerManagement").GetComponent <PowerManagementPanel>();
            PowerManagementPanel.Initialize();
            _panels.Add(PowerManagementPanel);

            EconDebugPanel = UICamera.transform.Find("EconDebugPanel").GetComponent <EconDebugPanel>();
            EconDebugPanel.Initialize();
            _panels.Add(EconDebugPanel);
        }
        else if (GameManager.Inst.SceneType == SceneType.SpaceTest)
        {
            HUDPanel = UICamera.transform.Find("HUDPanel").GetComponent <HUDPanel>();
            HUDPanel.Initialize();


            _panels.Add(HUDPanel);
        }
        else if (GameManager.Inst.SceneType == SceneType.Station)
        {
            StationHUDPanel = UICamera.transform.Find("StationHUDPanel").GetComponent <StationHUDPanel>();
            StationHUDPanel.Initialize();
            RepairPanel = UICamera.transform.Find("RepairPanel").GetComponent <RepairPanel>();
            RepairPanel.Initialize();
            ShipInfoPanel = UICamera.transform.Find("ShipInfoPanel").GetComponent <ShipInfoPanel>();
            ShipInfoPanel.Initialize();
            TraderPanel = UICamera.transform.Find("TraderPanel").GetComponent <TraderPanel>();
            TraderPanel.Initialize();

            ErrorMessagePanel = UICamera.transform.Find("ErrorMessagePanel").GetComponent <ErrorMessagePanel>();
            ErrorMessagePanel.Initialize();

            _panels.Add(StationHUDPanel);
            _panels.Add(RepairPanel);
            _panels.Add(ShipInfoPanel);
            _panels.Add(TraderPanel);
            _panels.Add(ErrorMessagePanel);
        }

        FadePanel = UICamera.transform.Find("FadePanel").GetComponent <FadePanel>();
        FadePanel.Initialize();
        _panels.Add(FadePanel);

        UIZoom = 1;

        UIStateMachine = new UIStateMachine();
        UIStateMachine.Initialize(GameManager.Inst.SceneType);
    }