How can I change the demo menu?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
PinkPanther
Posts: 12
Joined: Sun Aug 06, 2023 7:43 pm

How can I change the demo menu?

Post by PinkPanther »

I added a demo menu to the scene, but I don't understand how I can add a new button to this menu or remove a button? how can I change the appearance of the menu?
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I change the demo menu?

Post by Tony Li »

Hi,

The DemoMenu script is only designed to run the Dialogue System's demo scene. However, you can adapt it for your own use if you want. To change the look, create and assign a new GUI Skin. To add or remove buttons, you'll need to modify the script. If you do this, I recommend making a copy of the script and using & modifying the copy. That way you won't accidentally overwrite your customizations when you update the Dialogue System.
PinkPanther
Posts: 12
Joined: Sun Aug 06, 2023 7:43 pm

Re: How can I change the demo menu?

Post by PinkPanther »

yes, but I don't understand how I can remove the buttons because the demo menu of the script is empty. I can't work with the GUI. I want to create my own menu with a user interface, which I will do. How can I add to the buttons the method of saving the game or loading the game and other methods that are in the demo menu?Image
if the image dont loading:

Demo menu script:
// Copyright (c) Pixel Crushers. All rights reserved.

using UnityEngine;

namespace PixelCrushers.DialogueSystem.Demo.Wrappers
{

/// <summary>
/// This wrapper class keeps references intact if you switch between the
/// compiled assembly and source code versions of the original class.
/// </summary>
[AddComponentMenu("Pixel Crushers/Dialogue System/Actor/Demo/Demo Menu")]
public class DemoMenu : PixelCrushers.DialogueSystem.Demo.DemoMenu
{
}

}
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I change the demo menu?

Post by Tony Li »

Hi,

You're looking at the wrapper class, as explained in the comment at the top of the script. Please open the other DemoMenu.cs, which is located in Plugins > Pixel Crushers > Dialogue System > Scripts > Demo Scripts.
PinkPanther
Posts: 12
Joined: Sun Aug 06, 2023 7:43 pm

Re: How can I change the demo menu?

Post by PinkPanther »

Thank you so much!
User avatar
Tony Li
Posts: 21679
Joined: Thu Jul 18, 2013 1:27 pm

Re: How can I change the demo menu?

Post by Tony Li »

Glad to help!
Post Reply