InvexGames / MaterialUI

MaterialUI is a UI kit for Unity that follows Google's official material design guidelines.
http://invexgames.com/materialUI.html
Other
771 stars 200 forks source link

Close Selection Box #52

Open pietruh00s opened 8 years ago

pietruh00s commented 8 years ago

Hi! How to close selection box using script when user open it but didnt select anything and pressed another button? Is there any function in Selection Box Config?

vhatsura commented 8 years ago

Hi! If user pressed another button selection box will be hidden automatically. You can check it in example xx - SelectionBoxes. Also you can call method ContractList().

pietruh00s commented 8 years ago

Calling ContractList() when SelectionBox is closed gives me errors like:

NullReferenceException: Object reference not set to an instance of an object MaterialUI.SelectionBoxConfig.ContractList () (at Assets/MaterialUI/Scripts/SelectionBoxConfig.cs:317)

I have button and selectionbox. Pressing button moves selection box out of screen and close it (if its open). So Im looking for something like: if (selectionbox is open) ContractList()...

ddutchie commented 8 years ago

Declare.

Public SelectionBoxConfig BoxBox;

Then later...

BoxBox.ContractList();

Sent from my iPhone

On 22 Sep 2015, at 1:08 PM, pietruh00s notifications@github.com wrote:

Calling ContractList() when SelectionBox is closed gives me errors like:

NullReferenceException: Object reference not set to an instance of an object MaterialUI.SelectionBoxConfig.ContractList () (at Assets/MaterialUI/Scripts/SelectionBoxConfig.cs:317)

I have button and selectionbox. Pressing button moves selection box out of screen and close it (if its open). So Im looking for something like: if (selectionbox is open) ContractList()...

— Reply to this email directly or view it on GitHub.