[Lgame 007 007] desktop with simple controls
SlaveAt the beginning of this chapter, let's play with some simple controls ~ However, I want to install Daniel first and tell you how lgame manages controls ~
FirstI didn't go into the code in depth, so I really explained it in a simple way (well, I have a lot of nonsense and hope it won't make everyone angry ...).
MeLet's imagine what the controls are? It's an object ~ Okay, I am not talking anymore. How can controls be displayed in the game? Of course, the draw step is indispensable ~ Try again. The number of controls in the game is not only one or two, right?
Well, there will still be dozens of hundreds of controls. So many controls cannot be either east or west ~ Of course, unified management is required. So we have it -- Desktop
InstituteSome controls will be thrown into the desktop, and the desktop will call the rendering functions of each control to draw the control to the mobile phone screen. Some touch-screen events and click events are transmitted to various controls through desktop.
ItsCan I think of a desktop as a desktop name? Top desktop? Yes ~ Desktop is like a desktop, which is filled with various controls.
Okay, I just understood the desktop. I hope you can give me some advice ~ Xi
Alas, this chapter has a little bit of content, not like my nagging style ~
Okay, I will spare you this time ~ Next time I try to get a bit more nagging ~
The original Article was first published on the Android-fans Forum:
Http://www.android-fans.net/thread-1563-1-1.html