Beispiel #1
0
    public MenuImageButton NewImageButton(int Index)
    {
        MenuImageButton icon = new MenuImageButton();

        Icons.Insert(Index, icon);
        return(icon);
    }
Beispiel #2
0
        private void addSaveAndPublishButtons(ref TabPage tp)
        {
            MenuImageButton menuSave = tp.Menu.NewImageButton();

            menuSave.ID             = tp.ID + "_save";
            menuSave.ImageUrl       = _UmbracoPath + "/images/editor/Save.GIF";
            menuSave.Click         += new ImageClickEventHandler(saveClick);
            menuSave.OnClickCommand = "invokeSaveHandlers();";
            menuSave.AltText        = ui.Text("buttons", "save", null);
            if (CanPublish == publishModes.Publish)
            {
                MenuImageButton menuPublish = tp.Menu.NewImageButton();
                menuPublish.ID             = tp.ID + "_publish";
                menuPublish.ImageUrl       = _UmbracoPath + "/images/editor/SaveAndPublish.gif";
                menuPublish.OnClickCommand = "invokeSaveHandlers();";
                menuPublish.Click         += new ImageClickEventHandler(savePublish);
                menuPublish.AltText        = ui.Text("buttons", "saveAndPublish", null);
            }
            else if (CanPublish == publishModes.SendToPublish)
            {
                MenuImageButton menuToPublish = tp.Menu.NewImageButton();
                menuToPublish.ID             = tp.ID + "_topublish";
                menuToPublish.ImageUrl       = _UmbracoPath + "/images/editor/saveToPublish.gif";
                menuToPublish.OnClickCommand = "invokeSaveHandlers();";
                menuToPublish.Click         += new ImageClickEventHandler(saveToPublish);
                menuToPublish.AltText        = ui.Text("buttons", "saveToPublish", null);
            }
        }
Beispiel #3
0
    public MenuImageButton NewImageButton()
    {
        MenuImageButton icon = new MenuImageButton();

        Icons.Add(icon);
        return(icon);
    }
        /// <summary>
        /// Creates the child controls used in this page
        /// </summary>
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            TabPage relationTypeTabPage = this.tabControl.NewTabPage("Relation Type");

            relationTypeTabPage.Controls.Add(this.idPane);
            relationTypeTabPage.Controls.Add(this.nameAliasPane);
            relationTypeTabPage.Controls.Add(this.directionPane);
            relationTypeTabPage.Controls.Add(this.objectTypePane);

            MenuImageButton saveMenuImageButton = relationTypeTabPage.Menu.NewImageButton();

            saveMenuImageButton.AlternateText    = "save relation type";
            saveMenuImageButton.Click           += new ImageClickEventHandler(this.SaveMenuImageButton_Click);
            saveMenuImageButton.ImageURL         = "/umbraco/images/editor/save.gif";
            saveMenuImageButton.CausesValidation = true;
            saveMenuImageButton.ValidationGroup  = "RelationType";

            TabPage relationsTabPage = this.tabControl.NewTabPage("Relations");

            relationsTabPage.Controls.Add(this.relationsCountPane);
            relationsTabPage.Controls.Add(this.relationsPane);

            MenuImageButton refreshMenuImageButton = relationsTabPage.Menu.NewImageButton();

            refreshMenuImageButton.AlternateText    = "refresh relations";
            refreshMenuImageButton.Click           += new ImageClickEventHandler(this.RefreshMenuImageButton_Click);
            refreshMenuImageButton.ImageUrl         = "/umbraco/developer/RelationTypes/Images/Refresh.gif";
            refreshMenuImageButton.CausesValidation = false;
        }
Beispiel #5
0
    void Start()
    {
        /*get parent object GameState*/
        GameObject parentObject = GameObject.FindGameObjectWithTag("GameState");
        gState = parentObject.GetComponent(typeof(GameState)) as GameState;

        /*get buttons*/
        GameObject pauseObj = GameObject.FindGameObjectWithTag("Pause");
        _menuImageBtn = pauseObj.GetComponent(typeof(MenuImageButton)) as MenuImageButton;

        GameObject continueObj = GameObject.FindGameObjectWithTag("Continue");
        _continueAction = continueObj.GetComponent(typeof(MenuImageAction)) as MenuImageAction;
        _continueBtn = pauseObj.GetComponent(typeof(MenuImageButton)) as MenuImageButton;

        GameObject homeObj = GameObject.FindGameObjectWithTag("Home");
        _homeAction = homeObj.GetComponent(typeof(MenuImageAction)) as MenuImageAction;

        GameObject restartObj = GameObject.FindGameObjectWithTag("Restart");
        _restartAction = restartObj.GetComponent(typeof(MenuImageAction)) as MenuImageAction;
    }
	public MenuImageButton NewImageButton(int Index)
	{
		MenuImageButton icon = new MenuImageButton();
		Icons.Insert(Index, icon);
		return icon;
	}
	public MenuImageButton NewImageButton()
	{
		MenuImageButton icon = new MenuImageButton();
		Icons.Add(icon);
		return icon;
	}
Beispiel #8
0
 void Awake()
 {
     _imageButton = gameObject.GetComponent(typeof(MenuImageButton)) as MenuImageButton;
     if(_imageButton.position != origination) origination = _imageButton.position;
 }
Beispiel #9
0
        protected void AddMenuImageButton(string imgSrc, string hoverText, string onClickJavascript, bool leftSide = true)
        {
            MenuItem mi = new MenuImageButton(imgSrc, hoverText, onClickJavascript);

            AddMenuItem(mi, leftSide);
        }