/// <summary> /// 添加友情连接 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Button1_Click(object sender, EventArgs e) { string name = this.txtLinkName.Text.Trim(); string title = txtTitle.Text.Trim(); string content = this.content1.Value; if (name.Length == 0 || content.Length == 0) { lblError.Text = "各项不能为空"; return; } AboutMenu item = new AboutMenu(); item.proName = name; item.proValue = content; item.infoType = 0; item.remark = title; if (lblId.Text != "") { item.id = Convert.ToInt32(lblId.Text.Trim()); AboutMenuService.Update(item); } else { AboutMenuService.Add(item); } pnlAdd.Visible = false; pnlList.Visible = true; sp.InitBindData(repInfo, pager1, "AboutMenu", "id", sear()); }
//////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Use this for initialization void Start() { var k = ResizeHelper.k; _settings = this.GetComponent <SettingsMenu>(); _settings.enabled = false; _about = this.GetComponent <AboutMenu>(); _about.enabled = false; _help = this.GetComponent <HelpMenu>(); _help.enabled = false; _fader = this.GetComponent <Fader>(); var lw = 120f * k; _epsonLogoRect = new Rect(0, 0, lw, lw * Epson.height / Epson.width); _logoRect = new Rect(Screen.width - lw, 0, lw, lw * Logo.height / Logo.width); _captionRect = new Rect(0, 20f * k, Screen.width, 80f * k); _menuRect = new Rect[5]; for (int i = 0; i < _menuRect.Length; i++) { _menuRect[i] = new Rect(0, 140f * k + 55f * k * i, Screen.width, 55f * k); } _hintRect = new Rect(0, Screen.height - 30f * k, Screen.width, 30f * k); }
public static void About() { //EditorWindow window = GetWindow<AboutMenu>(); AboutMenu window = CreateInstance(typeof(AboutMenu)) as AboutMenu; window.titleContent = new GUIContent("About HKEdit"); window.minSize = new Vector2(460, 250); window.maxSize = new Vector2(460, 250); window.ShowUtility(); //window.Show(); }
public static void Init() { thisWindowReference = EditorWindow.GetWindow(typeof(EditorWindowBase)); windowWidth = EditorWindow.focusedWindow.position.width; windowHeight = EditorWindow.focusedWindow.position.height; buttonMenuRect = new Rect(0.01f * windowWidth, 0.01f * windowHeight, windowWidth * 0.98f, windowHeight * 0.10f); leftMenuRect = new Rect(0.01f * windowWidth, 0.12f * windowHeight, windowWidth * 0.14f, windowHeight * 0.87f); windowRect = new Rect(0.16f * windowWidth, 0.12f * windowHeight, windowWidth * 0.83f, windowHeight * 0.85f); leftSubMenuSkin = (GUISkin)Resources.Load("Editor/EditorLeftMenuItemSkin", typeof(GUISkin)); leftSubMenuConcreteItemSkin = (GUISkin)Resources.Load("Editor/EditorLeftMenuItemSkinConcreteOptions", typeof(GUISkin)); redoTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/redo", typeof(Texture2D)); undoTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/undo", typeof(Texture2D)); addTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/addNode", typeof(Texture2D)); deleteImg = (Texture2D)Resources.Load("EAdventureData/img/icons/deleteContent", typeof(Texture2D)); duplicateImg = (Texture2D)Resources.Load("EAdventureData/img/icons/duplicateNode", typeof(Texture2D)); sceneTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/scenes", typeof(Texture2D)); cutsceneTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/cutscenes", typeof(Texture2D)); bookTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/books", typeof(Texture2D)); itemTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/items", typeof(Texture2D)); setItemTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/Atrezzo-List-1", typeof(Texture2D)); playerTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/player", typeof(Texture2D)); characterTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/npcs", typeof(Texture2D)); conversationTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/conversations", typeof(Texture2D)); advancedTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/advanced", typeof(Texture2D)); adaptationTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/adaptationProfiles", typeof(Texture2D)); assessmentTexture = (Texture2D)Resources.Load("EAdventureData/img/icons/assessmentProfiles", typeof(Texture2D)); thisWindowReference.Show(); fileMenu = new FileMenu(); editMenu = new EditMenu(); adventureMenu = new AdventureMenu(); chaptersMenu = new ChaptersMenu(); runMenu = new RunMenu(); configurationMenu = new ConfigurationMenu(); aboutMenu = new AboutMenu(); InitGUI(); }
// Use this for initialization void Start() { _mainMenu = gameObject.FindComponentInChildren <MainMenu>(true); _optionsMenu = gameObject.FindComponentInChildren <OptionsMenu>(true); _gameMenu = gameObject.FindComponentInChildren <GameMenu>(true); _pauseMenu = gameObject.FindComponentInChildren <PauseMenu>(true); _gameOverMenu = gameObject.FindComponentInChildren <GameOverMenu>(true); _shareMenu = gameObject.FindComponentInChildren <ShareMenu>(true); _levelSelectMenu = gameObject.FindComponentInChildren <LevelSelectMenu>(true); _aboutMenu = gameObject.FindComponentInChildren <AboutMenu>(true); HideAllMenus(); currentMenu = CrossSceneMenuInfo.use.nextMenuOnReload; ShowMenu(currentMenu); }
/// <summary> /// Instantiates Menu_Manager and setups the menu item positions. /// </summary> /// <param name="graphics"></param> public Menu_Manager(GraphicsDeviceManager graphics) { CenterPos = new Vector2(graphics.GraphicsDevice.Viewport.Width / 2, graphics.GraphicsDevice.Viewport.Height / 2); menu_item1_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y - 100); menu_item2_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y - 50); menu_item3_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y + 0); menu_item4_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y + 50); menu_item5_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y + 100); New_menu_item1_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y - 50); New_menu_item2_Pos = new Vector2(CenterPos.X - 100, CenterPos.Y + 0); aboutmenu = new AboutMenu(CenterPos); optionsmenu = new OptionsMenu(CenterPos); helpmenu = new HelpMenu(CenterPos); failmenu = new FailMenu(CenterPos); }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Button1_Click(object sender, EventArgs e) { if (id == 6 || id == 7) { AboutMenu item = AboutMenuService.GetModel(id); if (item != null) { item.proValue = content1.Value; AboutMenuService.Update(item); } } else { AboutMenuService.SetValue(id, content1.Value); } ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('保存成功!');", true); }
protected override void Awake() { base.Awake(); blurBackground = true; aboutMenu = GetComponent <AboutMenu>(); int currentSceneIndex = SceneManager.GetActiveScene().buildIndex; foreach (Button button in buttons) { if (button.name == "Scene Change 01") { button.GetComponentInChildren <Text>().text = currentSceneIndex == 0 ? "Load Cave Scene" : "Load Cliffs Scene"; } else if (button.name == "Scene Change 02") { button.GetComponentInChildren <Text>().text = currentSceneIndex == 2 ? "Load Cave Scene" : "Load Snow Scene"; } } Paused = false; }
/// <summary> /// 控件行命令事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void repInfo_ItemCommand(object source, RepeaterCommandEventArgs e) { if (e.CommandName.Equals("del")) { int id = Convert.ToInt32(e.CommandArgument); AboutMenuService.Delete(id); } if (e.CommandName.Equals("mod")) { int id = Convert.ToInt32(e.CommandArgument); AboutMenu item = AboutMenuService.GetModel(id); if (item != null) { ; txtLinkName.Text = item.proName; txtTitle.Text = item.remark; lblId.Text = item.id.ToString(); content1.Value = item.proValue; pnlAdd.Visible = true; pnlList.Visible = false; } } sp.InitBindData(repInfo, pager1, "AboutMenu", "id", sear()); }
void ExitOnClick() { MiniGamesMenu.SetActive(false); AboutMenu.SetActive(false); CreditsMenu.SetActive(false); }
void CreditsOnClick() { MiniGamesMenu.SetActive(false); AboutMenu.SetActive(false); CreditsMenu.SetActive(true); }
public void OnAboutButtonPressed() { OptionsMenu.Close(); AboutMenu.Show(); }
public override void OnBackPressed() { AboutMenu.Close(); }