private void Settings_Click(object sender, RoutedEventArgs e) { if (_log.IsDebugEnabled) { _log.DebugFormat("Starting {0}", MethodBase.GetCurrentMethod().ToString()); } List <ISettingsPanel> list = new List <ISettingsPanel>(); SettingsPanel pnl = new SettingsPanel(); list.Add(pnl); ArtemisEngineeringPresets.Manager pnl2 = new ArtemisEngineeringPresets.Manager(); list.Add(pnl2); AudioSettingsPanel pnl3 = new AudioSettingsPanel(); list.Add(pnl3); SettingsWindow.Show(list, Locations.DataPath); //ImageBrush brsh = ArtemisModLoader.Helpers.FileHelper.GetRandomSkybox(); //if (brsh != null) //{ // this.Background = brsh; //} if (_log.IsDebugEnabled) { _log.DebugFormat("Ending {0}", MethodBase.GetCurrentMethod().ToString()); } }
private void Start() { if (SceneManager.GetActiveScene().name == "Menu") { _ = new SettingsPanel(dataSettings); } }
private void OnApplicationFocus(bool focus) { if (!focus && enabled) { SettingsPanel.Show(); } }
public void GoToSettings() { MainMenuPanel.SetActive(false); LevelSelectPanel.SetActive(false); ScenarioPanel.SetActive(false); SettingsPanel.SetActive(true); }
private void Awake() { StartCoroutine(OnGameWasOpened()); DontDestroyOnLoad(this); Background = new Background(); MainMenu = new UI.PanelMain(); Pause = new PausePanel(); PauseWindow = new PauseWindow(); ProfilePanel = new ProfilePanel(); SinglePanel = new SinglePanel(); ServerList = new ServerListPanel(); SettingsPanel = new SettingsPanel(); DebugPanel = new DebugPanel(); CharacterSelectionPanel = new CharacterSelectionPanel(); Chat = new Chat(); Log = new Log(); DontDestroyOnLoad(new GameObject("DiscordManager").AddComponent <Network.Discord.DiscordManager>()); DestroyMainScene(); GameModes.ResetOnLoad(); //Antis.Spam.EventsCounter.OnEventsSpamDetected += (sender, args) => //{ // if(args.SpammedObject == 200 || args.SpammedObject == 253 && args.Count < 130) // { // return; // } // PhotonPlayer player = PhotonPlayer.Find(args.Sender); // if (player.RCIgnored) // { // return; // } // Log.AddLine("eventSpam", args.SpammedObject.ToString(), args.Sender.ToString(), args.Count.ToString()); //}; //Antis.Spam.RPCCounter.OnRPCSpamDetected += (sender, args) => //{ // if(args.SpammedObject == "netPauseAnimation" || args.SpammedObject == "netCrossFade" && args.Count < 75) // { // return; // } // PhotonPlayer player = PhotonPlayer.Find(args.Sender); // if (player.RCIgnored) // { // return; // } // Log.AddLine("rpcSpam", args.SpammedObject.ToString(), args.Sender.ToString(), args.Count.ToString()); //}; //Antis.Spam.InstantiateCounter.OnInstantiateSpamDetected += (sender, args) => //{ // if (args.SpammedObject.Contains("TITAN") && args.Count <= 50) // { // return; // } // PhotonPlayer player = PhotonPlayer.Find(args.Sender); // if (player.RCIgnored) // { // return; // } // Log.AddLine("instantiateSpam", args.SpammedObject.ToString(), args.Sender.ToString(), args.Count.ToString()); //}; Network.BanList.Load(); }
private void WindowAddedHandler(object sender, GlobalWindowManagerEventArgs e) { if (e.Form is SettingsForm settingsForm) { settingsForm.Shown += delegate { try { var imageIndex = settingsForm.SettingsTabControl.ImageList.Images.Add(Properties.Resources.icon, Color.Transparent); var newTab = new TabPage("Unreal Engine") { UseVisualStyleBackColor = true, ImageIndex = imageIndex }; var optionsPanel = new SettingsPanel(this); newTab.Controls.Add(optionsPanel); optionsPanel.Dock = DockStyle.Fill; settingsForm.SettingsTabControl.TabPages.Add(newTab); } catch (Exception ex) { Debug.Fail(ex.ToString()); } }; } }
public void OnSettingsClick() { SettingsPanel.Load(); UMengPlugin.UMengEvent(EventId.HOME_SETTING, new Dictionary <string, object> { { "exp", CommonData.MyUser.Exp } }); }
private void AddHeader() { Header = SettingsPanel.AddUIComponent <StyleHeaderPanel>(); Header.Init(Manager.Style.StyleType.Filler, false); Header.OnSaveTemplate += OnSaveTemplate; Header.OnSelectTemplate += OnSelectTemplate; }
private void ClearStyleProperties() { foreach (var property in StyleProperties) { SettingsPanel.RemoveUIComponent(property); Destroy(property); } }
private void AddStyleTypeProperty() { Style = SettingsPanel.AddUIComponent <FillerStylePropertyPanel>(); Style.Text = NodeMarkup.Localize.LineEditor_Style; Style.Init(); Style.SelectedObject = EditObject.Style.Type; Style.OnSelectObjectChanged += StyleChanged; }
private void bLoadGame_Click(object sender, EventArgs e) { var gameLoader = new GameLoader(); gameLoader.StartMenu = this; gameLoader.LoadGame(); SettingsPanel.Hide(); }
private void bStart_Click(object sender, EventArgs e) { var newGame = new GameForm(numberOfPlayers, numberOfTurns, numberOfSpells); newGame.engine.startForm = this; newGame.Show(); Visible = false; SettingsPanel.Hide(); }
void SetKingdom_Click(object sender, EventArgs e) { StartGameButton.Text = "Start"; SetKingdomPanel.Show(); GamePanel.Hide(); SettingsPanel.Hide(); ShowCurrentKingdomCards(); ShowExtensionCards(); }
private void AddTemplateName() { NameProperty = SettingsPanel.AddUIComponent <StringPropertyPanel>(); NameProperty.Text = NodeMarkup.Localize.TemplateEditor_Name; NameProperty.FieldWidth = 230; NameProperty.UseWheel = false; NameProperty.Init(); NameProperty.Value = EditObject.Name; NameProperty.OnValueChanged += NameSubmitted; }
protected override void OnObjectSelect() { Offset = SettingsPanel.AddUIComponent <FloatPropertyPanel>(); Offset.Text = NodeMarkup.Localize.PointEditor_Offset; Offset.UseWheel = true; Offset.WheelStep = 0.1f; Offset.Init(); Offset.Value = EditObject.Offset; Offset.OnValueChanged += OffsetChanged; }
void createLosePanel() { //Знайти батьківський елемент GameObject parent = UICamera.first.transform.parent.gameObject; //Створити Prefab GameObject obj = NGUITools.AddChild(parent, losePrefab); //Отримати доступ до компоненту (щоб передати параметри) SettingsPanel popup = obj.GetComponent <SettingsPanel>(); Time.timeScale = 0; }
public TestCaseSettings() { settings = new SettingsOverlay { State = Visibility.Visible }; Add(dialogOverlay = new DialogOverlay { Depth = -1 }); }
public TestSceneSettingsPanel() { settings = new SettingsOverlay { State = { Value = Visibility.Visible } }; Add(dialogOverlay = new DialogOverlay { Depth = -1 }); }
/// <summary> /// 설정 버튼이 눌렸을 때의 처리 /// </summary> public void OnSettingsBtn() { // 버튼음 재생 GameManager.Instance.SoundManager.PlaySFX(AudioNameConstant.BUTTON_SOUND); SettingsPanel settingsPanel = PanelManager.GetPanel(typeof(SettingsPanel)) as SettingsPanel; settingsPanel.Show(); Time.timeScale = 0; }
public void SetUpSteps() { AddStep("create settings", () => { settings?.Expire(); Add(settings = new SettingsOverlay { State = { Value = Visibility.Visible } }); }); }
protected override void OnObjectSelect() { Log.Debug("LaneEditor.OnObjectSelect()"); //ToolInstance.OnLaneUISelect(SelectItem.Object.Index); HideEmptySelected(); PositionField = SettingsPanel.AddUIComponent <FloatPropertyPanel>(); PositionField.Text = "Position"; PositionField.UseWheel = true; PositionField.WheelStep = 0.1f; PositionField.Init(); PositionField.Value = EditObject.Position; PositionField.OnValueChanged += PositionChanged; }
public static void SelectPanel(string name) { if (selected_panel != null) { if (selected_panel == panels[name]) { return; } selected_panel.Disable(); } panels[name].Enable(); selected_panel = panels[name]; }
private void Init() { (DataContext as MainWindowViewModel).View = this; TableButtons = new List <TableDetails>(); DataGridTablePanel = new DataGridTable(); SettingsPanel = new SettingsPanel() { Visibility = Visibility.Collapsed }; ActivePanel = DataGridTablePanel; DPBasePanel.Children.Add(DataGridTablePanel); }
void Update() { if (mainCatagories) { if (!axisDown) { if (InputManager.GetAxis("Vertical", 0) > 0.5f) { if (selectedMenuItem > 0) { selectedMenuItem--; StartCoroutine(DelayButtonPress()); } } else if (InputManager.GetAxis("Vertical", 0) < -0.5f) { if (selectedMenuItem < Settings.settings.Count - 1) { selectedMenuItem++; StartCoroutine(DelayButtonPress()); } } } if (InputManager.GetButtonDown("a", 0)) { if (introAnim == 0) { StartCoroutine(BackToMenu()); } } } else { if (InputManager.GetButtonDown("a", 0)) { mainCatagories = true; settingsPanel = null; } else { settingsPanel.Do(); } } if (InputManager.GetButtonDown("o", 0)) { mainCatagories = false; settingsPanel = GetSettingsCatagory(selectedCatagory); } }
public static void Show() { if (Instance != null) { Instance.gameObject.SetActive(true); } else { Instance = UISystem.InstantiateUI("SettingsPanel").GetComponent <SettingsPanel>(); } InputManager.enabled = false; PlayerController.LockCursor(false); }
public void SettingsButton() { if (!SettingsPanelActivity) { Debug.Log("c"); SettingsPanel.GetComponent <CanvasGroup>().DOFade(1f, 0.5f); } else { Debug.Log("d"); SettingsPanel.GetComponent <CanvasGroup>().DOFade(0f, 0.5f); } SettingsPanelActivity = !SettingsPanelActivity; }
public void SetUpSteps() { AddStep("create settings", () => { settings?.Expire(); Add(settings = new SettingsOverlay { State = { Value = Visibility.Visible } }); }); AddStep("reset mouse", () => InputManager.MoveMouseTo(settings)); }
private void SettingsOK_Click(object sender, EventArgs e) { if (SettingsTextBox1.Text.Length > 0 && SettingsTextBox2.Text.Length > 0) { city = SettingsTextBox1.Text; countryCode = SettingsTextBox2.Text; Properties.Settings.Default.city = city; Properties.Settings.Default.countryCode = countryCode; Properties.Settings.Default.Save(); web_request(); } SettingsPanel.Hide(); tableLayoutPanel2.Show(); }
///<summary> Открытие вкладки настроек. </summary> public void OpenSettingTab(object sender, EventArgs e) { string tabName = "Settings"; if (tabMap.ContainsKey(tabName)) { Dispatcher.BeginInvoke((Action)(() => tabMap[tabName].IsSelected = true)); return; } var setPanel = new SettingsPanel(); var targetTab = new ClosableTab(tabName, setPanel, CloseTab); AddTab(targetTab, tabName); }
private void Settings_Load(object sender, EventArgs e) { SettingsPanel.Visible = true; CamInertiaUpDown.Value = (decimal)render.CameraInertiaFactor; ChbFps.Checked = render.ShowFps; ChbTriCount.Checked = render.ShowTriangleCount; ChbDebugInfo.Checked = render.ShowDebugInfo; cbCameraMode.SelectedIndex = render.CamMode == HelixToolkit.Wpf.CameraMode.Inspect ? 0 : 1; ZoomSenUpDown.Value = (decimal)render.ZoomSensitivity; RotSenUpDown.Value = (decimal)render.RotationSensitivity; ChbStartupUpdate.Checked = Properties.Settings.Default.CheckUpdates; ChbStartupDb.Checked = Properties.Settings.Default.DownloadDb; tbUrl.Text = Properties.Settings.Default.DownloadDbLink; SettingsPanel.Focus(); }
/// <summary> Create a GUI-Instance for Jamocha. /// /// </summary> /// <param name="">engine /// The Jamocha-engine that will be used in the GUI. /// /// </param> public JamochaGui(Rete engine) { InitBlock(); // set up the frame //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' this.ContentPane.setLayout(new BorderLayout()); this.setTitle("Jamocha"); setSizeAndLocation(); // show logo //UPGRADE_ISSUE: Constructor 'java.awt.BorderLayout.BorderLayout' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' JPanel logoPanel = new JPanel(new BorderLayout()); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.EAST' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' logoPanel.add(new JLabel(IconLoader.getImageIcon("jamocha")), BorderLayout.EAST); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.NORTH' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' this.ContentPane.add(logoPanel, BorderLayout.NORTH); // create a tabbed pane tabbedPane = new JTabbedPane(); //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.CENTER' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' this.ContentPane.add(tabbedPane, BorderLayout.CENTER); // add MenuBar menuBar = new JamochaMenuBar(this); this.setJMenuBar(menuBar); // create a rete engine this.engine = engine; // create a shell tab and add it to the tabbed pane ShellPanel shellPanel = new ShellPanel(this); tabbedPane.addTab("Shell", IconLoader.getImageIcon("application_osx_terminal"), shellPanel, "Jamocha Shell"); panels.add(shellPanel); FactsPanel factsPanel = new FactsPanel(this); tabbedPane.addTab("Facts", IconLoader.getImageIcon("database"), factsPanel, "View or modify Facts"); panels.add(factsPanel); TemplatesPanel templatesPanel = new TemplatesPanel(this); tabbedPane.addTab("Templates", IconLoader.getImageIcon("brick"), templatesPanel, "View or modify Templates"); panels.add(templatesPanel); FunctionsPanel functionsPanel = new FunctionsPanel(this); tabbedPane.addTab("Functions", IconLoader.getImageIcon("cog"), functionsPanel, "View Functions"); panels.add(functionsPanel); RetePanel retePanel = new RetePanel(this); tabbedPane.addTab("Rete", IconLoader.getImageIcon("eye"), retePanel, "View the Rete-network"); panels.add(retePanel); LogPanel logPanel = new LogPanel(this); tabbedPane.addTab("Log", IconLoader.getImageIcon("monitor"), logPanel, "View alle messages from or to the Rete-engine"); panels.add(logPanel); SettingsPanel settingsPanel = new SettingsPanel(this); tabbedPane.addTab("Settings", IconLoader.getImageIcon("wrench"), settingsPanel, "Settings for Jamocha"); panels.add(settingsPanel); // add the tab pane to the frame //UPGRADE_ISSUE: Field 'java.awt.BorderLayout.CENTER' was not converted. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1000_javaawtBorderLayout"' this.ContentPane.add(tabbedPane, BorderLayout.CENTER); tabbedPane.addChangeListener(this); // add a listener to the frame to kill the engine when the GUI is closed addWindowListener(new AnonymousClassWindowAdapter(this)); }