Daikon Forge GUI Library (Dfgui) event Binding

Source: Internet
Author: User

The project with Dfgui, each used the same will be the same, and then a few days and gorgeous forget the light.

Hehe, it's time to take note.

---------------------------the split line of Moe------------------------------------------

Well, now say the event binding in Dfgui.

For example, I need to click the button and pop up the dialog box, just use the big question button below.

  

1, check button, Component/daikon forge/data binding/event Binding

  

Create a dfpanel on the 2,ui and remove the visible tick from its behavior.

  

3, create a new empty game object, Gameobject/create empty, named Uievents_demo.

4, create a new script Uievents_demo, and hang it in Uievents_demo.

1 usingUnityengine;2 usingSystem.Collections;3 4  Public classUievents_demo:monobehaviour5 {6     //Dfpanel7      PublicDfpanel DfPanel1;8 9     /// <summary>Ten     ///Control Dfpanel One     /// </summary> A      Public voiddfpanl_event () -     { -Dfpanel1.isvisible =!dfpanel1.isvisible; the     } -}

5, and then assign the previous dfpanel created in unity to the public variable dfPanel1 of the code above.

6, then go back to our big button and find the event Binding that was mentioned earlier, such as Operation

  

Then run the program, click the button to control the Dfpanel display and hide the La la la ...

Other than that:

Df Event Binding (Script):

  Data Source

Event: This provides a lot of events, such as the click,mousedown here, as well as the previously written ondragstart, Ondragend, etc.

  Event Handler

Component: This is an object that can mount a method that handles event events (a bit around the mouth, and I don't know if that's right)

Event Handler: This is all public methods that can be selected above component This component has mounted scripts.

Automatic Binding

Auto bind: Auto bind

Auto Unbind: Auto Release

------------------------------the small line of the Moe--------------------------------------------------------------

A record of personal notes

Daikon Forge GUI Library (Dfgui) event Binding

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.