public override bool combine(Tool other)
 {
     if (other is ChangeTitleTool)
     {
         ChangeTitleTool ctt = (ChangeTitleTool)other;
         if (ctt.titled == titled && ctt.oldTitle == title)
         {
             title     = ctt.title;
             timeStamp = ctt.timeStamp;
             return(true);
         }
     }
     return(false);
 }
        ///**
        // * Enables/Disables keyboard navigation - by default is set to false
        // * @param enabled
        // */
        //public bool setKeyboardNavigation(bool enabled)
        //{
        //    return Controller.getInstance().addTool(new ChangeBooleanValueTool(adventureData, enabled, "isKeyboardNavigationEnabled", "setKeyboardNavigation"));
        //}

        /**
         * Sets the title of the adventure.
         *
         * @param title
         *            New title for the adventure
         */
        public void setTitle(string title)
        {
            Tool tool = new ChangeTitleTool(adventureData, title);

            Controller.getInstance().addTool(tool);
        }
Ejemplo n.º 3
0
        /**
         * Sets the new title of the chapter.
         *
         * @param title
         *            Title of the chapter
         */
        public void setTitle(string title)
        {
            ChangeTitleTool tool = new ChangeTitleTool(chapter, title);

            controller.addTool(tool);
        }