Skip to content

A message box for unity, with built-in actions for yes and no handling.

Notifications You must be signed in to change notification settings

HaimBendanan/Simple-Message-Box-Unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Simple-Message-Box-Unity

A message box for unity (IOS/Android/...). You can easily set the text, choose to have no buttons, or 2 buttons with custom labels. The background around the textbox is automatically blurred. You can easily suply actions for 'On Yes' , 'On No' or 'On out of textBox' clicked. You can easily change the background of the box, the buttons, the fonts etc'. Be aware that you should not prompt more than one message at the same time.

Screenshot 1

Screenshot 2

Screenshot 3

##Add the package to your Unity project: Import the SimpleMessageBox package to your project (How to Here). All the files are under ressources/SimpleMessageBox so it should be easy to locate the import location of the files. You can also open the SimpleMessageBox project if you want to have a look a the files and test the message box before importing the package.

##Create a message box:

var messageBox = Helpers.BringMessageBox();

##Set the text of the message box:

messageBox.SetMessage(Consts.StringsForUser.Example1);

##Add buttons(optional) with custom text

messageBox.EnableYesAndNo("Yes!","No...");

##Supply actions for button press, close or clicks outside of the box

messageBox.onYes = () =>
{
	Debug.Log("Handling Yes response...");
};
messageBox.onNo = () =>
{
	Debug.Log("Handling No response...");
};
messageBox.onOutOfMessage = () =>
{
	Debug.Log("Handling Out of message.");
	// For example you can choose to make the message dissapear
	messageBox.Dissapear();
}

About

A message box for unity, with built-in actions for yes and no handling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages