Giter VIP home page Giter VIP logo

Comments (6)

GaoKaiHaHa avatar GaoKaiHaHa commented on August 19, 2024 1

If you use UIBase.AddEventListener, then OnRefesh will be called when this event is called, and you can also put UI update logic in this method and initiative call it.:)

from myunityframework.

GaoKaiHaHa avatar GaoKaiHaHa commented on August 19, 2024 1

OnInit () is called when the UI is created. This method is called only once during the life of the UI
OnOpen () is called when the UI is opened, for performance reasons, we can create a UI and wait until the right time to open it,
OnClose (), called when the UI is closed
OnHide () is called when the UI is hidden,
OnShow () Called when the UI is redisplaying, as opposed to OnHide ()
We can override the Show() method and Hide() method of UIBase, the default is to change the active

from myunityframework.

GaoKaiHaHa avatar GaoKaiHaHa commented on August 19, 2024

AddOnClickListener will be automatically removed in the OnClose.
The reason for this is

  1. Simplify the code.
  2. Avoid clicking on the UI when close animation

ps: OpenUI by IApplicationStatus also the same

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

Hi @GaoKaiHaHa
Aha i understand now. How about OnRefresh? Is this method for updating, refresh data or logic when user come back to ui window from other window? Can you give me an example how to use it?
Thank so much!

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

@GaoKaiHaHa Can you explain more about OnRefesh and how to use it (some example when to use it) in the real game?

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

Hi @GaoKaiHaHa
Now I completely understand it! Thank so much!
Going to ask another question about Popup he he

from myunityframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.