CN106126268A - A kind of window creation method and system - Google Patents
A kind of window creation method and system Download PDFInfo
- Publication number
- CN106126268A CN106126268A CN201610688566.7A CN201610688566A CN106126268A CN 106126268 A CN106126268 A CN 106126268A CN 201610688566 A CN201610688566 A CN 201610688566A CN 106126268 A CN106126268 A CN 106126268A
- Authority
- CN
- China
- Prior art keywords
- window
- template
- module
- creation method
- function class
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/20—Software design
- G06F8/22—Procedural
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The present invention relates to development of games field, particularly relate to a kind of window creation method and system.Described window creation method, comprises the steps:, according to functions of modules, the UI element of Unity is packaged into function class in combination;Described function class is fabricated to precast body;Preset window template uniquely identifies;Described template window is uniquely identified and precast body one_to_one corresponding, obtains template window;One template window of selecting inheritance creates window.The present invention also provides for a kind of window creation system.The present invention is by becoming window by UI component encapsulation, it is achieved create the UI element combination needed for functional module the most easily, is conducive to making programmed logic clear, improves the maintainability of program.And can realize UI element is managed collectively by unified management window, effectively reduce UI development amount, improve UI development efficiency.
Description
Technical field
The present invention relates to development of games field, particularly relate to a kind of window creation method and system.
Background technology
UI (user interface) exploitation is the important step of development of games, how to enable UI element be managed collectively, thus
The work efficiency of the effective UI of raising exploitation is to improve the emphasis of development of games efficiency.Unity is one allows player easily create
The multi-platform comprehensive game of the type interaction contents such as such as 3 D video game, building visualization, realtime three dimensional animation is opened
The instrument of sending out.UI in Unity is independent element, including button, picture, text etc..At present, when using Unity exploitation, logical
The most directly use UI element.This mode can cause programmed logic scattered, investigation problem hard, code readability difference and configuration
The problems such as information easily loss.
Along with the development of technology, the most certain methods carries out multiplexing to general UI element, to reach reduction
The purpose of UI development amount, such as the patent documentation of Application No. 201110460269.4 " a kind of UI multiplexing method and device ",
Disclose by inheriting the method that UI parent page obtains UI subpage frame, it is achieved the UI content that multiplexing repeats, thus improve UI exploitation
Efficiency.But, the method is only applicable to WEB application program based on B/S framework.
Summary of the invention
The technical problem to be solved is: the invention provides a kind of window creation method, it is achieved the most convenient
Ground creates the UI element combination needed for functional module, thus improves UI development efficiency.
In order to solve above-mentioned technical problem, the technical solution used in the present invention is:
A kind of window creation method, including:
According to functions of modules, the UI element of Unity is packaged into function class in combination;
Described function class is fabricated to precast body;
Preset window template uniquely identifies;
Described template window is uniquely identified and precast body one_to_one corresponding, obtains template window;
One template window of selecting inheritance creates window.
The present invention also provides for a kind of window creation system, including package module, make module, mark module, respective modules,
Creation module;
Described package module, is packaged into function class according to functions of modules in combination by the UI element of Unity;
Described making module, for being fabricated to precast body by described function class;
Described mark module, uniquely identifies for preset window template;
Described respective modules, for uniquely being identified and precast body one_to_one corresponding by described template window, obtains template window;
Described creation module, one template window of selecting inheritance creates window.
The beneficial effects of the present invention is: the present invention provides a kind of window creation method and system, by the need of functional module
Seek the UI element of encapsulation Unity, and packaged UI element combination is fabricated to template window, by inheriting the side of template window
Formula creates window, thus the efficiently UI element of multiplexing easily, reduce UI development amount, improve UI development efficiency.
Accompanying drawing explanation
Fig. 1 is the FB(flow block) of the present invention a kind of window creation method detailed description of the invention;
Fig. 2 is the structured flowchart of the present invention a kind of window creation system detailed description of the invention;
Label declaration:
1, package module;2, module is made;3, mark module;4, respective modules;5, creation module.
Detailed description of the invention
By describing the technology contents of the present invention in detail, being realized purpose and effect, below in conjunction with embodiment and coordinate attached
Figure is explained.
The design of most critical of the present invention is: the present invention provides a kind of window creation method, by by the UI unit in Unity
Part is packaged into window by functional module demand, it is achieved creates the UI element combination needed for functional module the most easily, is conducive to
Make programmed logic clear, improve the maintainability of program.And can realize UI element is unified by unified management window
Management, reduces UI development amount effectively, improves UI development efficiency.
Refer to Fig. 1, the present invention provides a kind of window creation method, including:
According to functions of modules, the UI element of Unity is packaged into function class in combination;
Described function class is fabricated to precast body;
Preset window template uniquely identifies;
Described template window is uniquely identified and precast body one_to_one corresponding, obtains template window;
One template window of selecting inheritance creates window.
Having the beneficial effects that of a kind of above-mentioned window creation method: encapsulate the UI element of Unity by the demand of functional module,
And packaged UI element combination is fabricated to template window, by the way of inheriting template window, create window, it is achieved efficiently
Create the UI element combination needed for functional module easily, be conducive to making programmed logic clear, improve the maintainability of program.
Further, described " the UI element of Unity is packaged into function class in combination " particularly as follows:
Judge whether a system UI element is required UI element;
Judge whether a self-defined UI element is required UI element;
Required UI element is tied in function class object.
Seen from the above description, by required UI element is tied in corresponding function class object, it is achieved by merit
The demand encapsulation UI element of energy module.
Further, also include: a described window is hung on the precast body bound with a template window.
Seen from the above description, by newly created window is hung on corresponding precast body, to ensure that window can be just
Often run.
Further, also include: open window operation, close window operation and destroy window operation.
Further, described " opening window operation " particularly as follows:
The template receiving first window uniquely identifies;
Inquiry uniquely identifies when the template that whether there is described first window in front opening windows cache, if existing, then:
Return first window, otherwise:
Inquire about and whether all opened windows caches exist the template of first window uniquely identify, if existing, then:
First window is added when front opening windows cache, otherwise:
Inherit the template establishment first window of first window;
Described first window is added when front opening windows cache and all opened windows caches;
Process described first window opens specially good effect;
Show described first window.
Further, described " closedown window operation " particularly as follows:
Process the closedown specially good effect of described first window;
Hide described first window;
By described first window from when front opening windows cache removes.
Further, described " destruction window operation " particularly as follows:
Perform described closedown window operation and close described first window;
Described first window is removed from all opened windows caches.
Seen from the above description, window can be managed collectively, including opening window, closing window and destroy window,
Effectively reduce UI development amount, improve UI development efficiency.
Refer to Fig. 2, present invention additionally comprises a kind of window creation system, including package module 1, make module 2, mark mould
Block 3, respective modules 4, creation module 5;
Described package module 1, for being packaged into function according to functions of modules in combination by the UI element of Unity
Class;
Described making module 2, for being fabricated to precast body by described function class;
Described mark module 3, uniquely identifies for preset window template;
Described respective modules 4, for uniquely being identified and precast body one_to_one corresponding by described template window, obtains window mould
Plate;
Described creation module 5, creates window for one template window of selecting inheritance.
Having the beneficial effects that of above-mentioned a kind of window creation system: can be sealed by the demand of functional module by package module 1
The UI element of dress Unity, can make packaged UI element combination by making module 2, mark module 3 and respective modules 4
Become template window, can be to create window by the way of inheriting template window by creation module 5, it is achieved efficiently create function easily
UI element combination needed for module, is conducive to making programmed logic clear, improves the maintainability of program.
Embodiment 1:
One functions of modules for draw garden, its required UI element include fence picture UI element, flower picture UI element,
Tree graph sheet UI element, sketch sheet UI element and Canis familiaris L. picture UI element.First judge module and the second judge module judge existing respectively
Have whether the system UI element in resource and self-defined UI element have the UI element drawn needed for garden.Package module is sentenced first
Fence picture UI element that disconnected module and the second judge module are picked out, flower picture UI element, tree graph sheet UI element, sketch sheet
UI element and Canis familiaris L. picture UI element are packaged into drafting garden function class in combination.Use Unity instrument will draw garden
Function class is fabricated to garden precast body.A conduct having not been used is selected from the window masterplate of predefined uniquely identifies
The window masterplate of garden precast body uniquely identifies, and obtains garden window masterplate.Garden window masterplate can be inherited by creation module
Create garden window.Garden window creation needs after completing to be hung on the precast body of garden so that garden window can be properly functioning.
After the window creation success of garden, it can be opened window operation, closes window operation and destroy window operation.
Opening garden window operation particularly as follows: receive unique mark of garden window masterplate, inquiry is delayed when front opening window
Whether there is unique mark of garden template window in depositing, if existing, the most directly returning garden window, otherwise, inquiring about all beating
Whether the windows cache opened exists unique mark of garden template window, if existing, garden window being added and works as front opening
Windows cache, otherwise by inheriting window masterplate establishment garden, garden window, and adds garden window when front opening window delays
Deposit and all opened windows caches.Process first window open specially good effect after show garden window.
Close garden window operation particularly as follows: hide garden window after processing the closedown specially good effect of garden window, and by garden
Window is from when removing front opening windows cache.
After destroying garden window operation particularly as follows: perform to close window operation closedown garden window, by garden window from institute
Have in opened windows cache and remove.
Seen from the above description, a kind of window creation method and system that the application of the invention provides can the most easily
Create window according to functional module, and window is managed.
In sum, a kind of window creation method and system that the present invention provides, by package module 1 by functional module
The UI element of demand encapsulation Unity, combines packaged UI element by making module 2, mark module 3 and respective modules 4
It is fabricated to template window, can be to create window by the way of inheriting template window by creation module 5, it is achieved efficiently create easily
UI element combination needed for functional module, is conducive to making programmed logic clear, improves the maintainability of program.Further, logical
Crossing window binding module can enable newly created window properly functioning.Further, can be by opening window module, closing window
Mouth die block and destruction window module carry out unified operation to window, effectively reduce UI development amount, improve UI and develop work
Make efficiency.
The foregoing is only embodiments of the invention, not thereby limit the scope of the claims of the present invention, every utilize this
The equivalents that bright description and accompanying drawing content are made, or directly or indirectly it is used in relevant technical field, the most in like manner include
In the scope of patent protection of the present invention.
Claims (10)
1. a window creation method, it is characterised in that including:
According to functions of modules, the UI element of Unity is packaged into function class in combination;
Described function class is fabricated to precast body;
Preset window template uniquely identifies;
Described template window is uniquely identified and precast body one_to_one corresponding, obtains template window;
One template window of selecting inheritance creates window.
A kind of window creation method the most according to claim 1, it is characterised in that described " by the UI element of Unity with group
The mode closed is packaged into function class " particularly as follows:
Judge whether a system UI element is required UI element;
Judge whether a self-defined UI element is required UI element;
Required UI element is tied in function class object.
A kind of window creation method the most according to claim 1, it is characterised in that also include:
A described window is hung on the precast body bound with a template window.
A kind of window creation method the most according to claim 1, it is characterised in that also include:
Open window operation, close window operation and destroy window operation.
A kind of window creation method the most according to claim 4, it is characterised in that described " opening window operation " is concrete
For:
The template receiving first window uniquely identifies;
Inquiry uniquely identifies when the template that whether there is described first window in front opening windows cache, if existing, then:
Return first window, otherwise:
Inquire about and whether all opened windows caches exist the template of first window uniquely identify, if existing, then:
First window is added when front opening windows cache, otherwise:
Inherit the template establishment first window of first window;
Described first window is added when front opening windows cache and all opened windows caches;
Process described first window opens specially good effect;
Show described first window.
A kind of window creation method the most according to claim 4, it is characterised in that described " closedown window operation " is concrete
For:
Process the closedown specially good effect of described first window;
Hide described first window;
By described first window from when front opening windows cache removes.
A kind of window creation method the most according to claim 4, it is characterised in that described " destruction window operation " is concrete
For:
Perform described closedown window operation and close described first window;
Described first window is removed from all opened windows caches.
8. a window creation system, it is characterised in that include package module, make module, mark module, respective modules, wound
Modeling block;
Described package module, is packaged into function class according to functions of modules in combination by the UI element of Unity;
Described making module, for being fabricated to precast body by described function class;
Described mark module, uniquely identifies for preset window template;
Described respective modules, for uniquely being identified and precast body one_to_one corresponding by described template window, obtains template window;
Described creation module, one template window of selecting inheritance creates window.
A kind of window creation system the most according to claim 8, it is characterised in that described " package module " including:
First judge module, for judging whether a system UI element is required UI element;
Second judge module, for judging whether a self-defined UI element is required UI element;
UI binding module, for being tied to required UI element in function class object.
A kind of window creation system the most according to claim 8, it is characterised in that also include:
Window binding module, for hanging over a described window and the precast body of a template window binding;
Open window module, open window operation for execution;
Close window module, be used for performing to close window operation;
Destroy window module, be used for performing to destroy window operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610688566.7A CN106126268A (en) | 2016-08-18 | 2016-08-18 | A kind of window creation method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610688566.7A CN106126268A (en) | 2016-08-18 | 2016-08-18 | A kind of window creation method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106126268A true CN106126268A (en) | 2016-11-16 |
Family
ID=57278788
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610688566.7A Pending CN106126268A (en) | 2016-08-18 | 2016-08-18 | A kind of window creation method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106126268A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107066180A (en) * | 2017-03-13 | 2017-08-18 | 深圳国泰安教育技术股份有限公司 | A kind of task creating method and its system based on VR operations |
CN109960550A (en) * | 2017-12-25 | 2019-07-02 | 福建省天奕网络科技有限公司 | A kind of method and terminal of interface management |
CN111580791A (en) * | 2020-04-27 | 2020-08-25 | 山东浪潮通软信息科技有限公司 | Method and device for generating window |
CN111813407A (en) * | 2019-10-28 | 2020-10-23 | 厦门雅基软件有限公司 | Game development method, game running device and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101763267A (en) * | 2010-01-21 | 2010-06-30 | 深圳市同洲电子股份有限公司 | Method for realizing embedded browser, device therefor and digital television receiving terminal |
US8849437B2 (en) * | 2012-09-25 | 2014-09-30 | Apple Inc. | Adaptive machining for improving assembly fit of consumer electronics |
-
2016
- 2016-08-18 CN CN201610688566.7A patent/CN106126268A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101763267A (en) * | 2010-01-21 | 2010-06-30 | 深圳市同洲电子股份有限公司 | Method for realizing embedded browser, device therefor and digital television receiving terminal |
US8849437B2 (en) * | 2012-09-25 | 2014-09-30 | Apple Inc. | Adaptive machining for improving assembly fit of consumer electronics |
Non-Patent Citations (3)
Title |
---|
KID: "Unity3D根据Prefab自动生成UI类,并自动关联变量和控件", 《HTTP://WWW.KIDSANG.COM/ARCHIVES/741?UTM_SOURCE=TUICOOL》 * |
RAINMJ: "【Unity】3.2 利用预设(Prefab)制作可复用的组件", 《HTTP://WWW.CNBLOGS.COM/RAINMJ/P/5347130.HTML》 * |
王选易: "Unity-UI-Framework的设计与实现", 《HTTP://WWW.MANEW.COM/THREAD-42748-1-1.HTML》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107066180A (en) * | 2017-03-13 | 2017-08-18 | 深圳国泰安教育技术股份有限公司 | A kind of task creating method and its system based on VR operations |
CN107066180B (en) * | 2017-03-13 | 2020-05-12 | 深圳国泰安教育技术有限公司 | Task generation method and system based on VR operation |
CN109960550A (en) * | 2017-12-25 | 2019-07-02 | 福建省天奕网络科技有限公司 | A kind of method and terminal of interface management |
CN111813407A (en) * | 2019-10-28 | 2020-10-23 | 厦门雅基软件有限公司 | Game development method, game running device and electronic equipment |
CN111813407B (en) * | 2019-10-28 | 2022-02-18 | 厦门雅基软件有限公司 | Game development method, game running device and electronic equipment |
US11738268B2 (en) | 2019-10-28 | 2023-08-29 | Xiamen Yaji Software Co., Ltd | Game development method and apparatus, game running method and apparatus, and electronic device |
CN111580791A (en) * | 2020-04-27 | 2020-08-25 | 山东浪潮通软信息科技有限公司 | Method and device for generating window |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106126268A (en) | A kind of window creation method and system | |
CN104766007B (en) | A kind of method that the fast quick-recovery of sandbox is realized based on file system filter driver | |
CN104685466B (en) | For providing the browser level background pages of multiple views | |
CN103885782A (en) | Visual programming page program library function packaging and reusing method | |
CN104020994B (en) | Stream process definition device and stream process based on streaming system define method | |
CN104376063A (en) | Multithreading web crawler method based on sort management and real-time information updating system | |
CN101739277A (en) | Self-defined script mode-based method for managing service monitoring system | |
CN103019742A (en) | Method for generating automatic codes on multiple DSP (Digital Signal Processor) platform | |
CN103513976B (en) | Service flowpath modelling approach and device | |
CN108376065A (en) | The system for building the avionics software development environment of model-driven | |
CN100590597C (en) | Local resource access method and device | |
CN109936621A (en) | Multi-page information push method, device, equipment and the storage medium of information security | |
CN105677303B (en) | A kind of design method of configuration software picture editing tool | |
CN106598620A (en) | Code generation method and code generator | |
CN109918060A (en) | A kind of switching method and device for realizing multi-tag page under single window | |
CN102739788B (en) | A kind of field device communicating method based on EIB agreement | |
CN109558573A (en) | A kind of list flow engine based on user-defined m odel language | |
CN104063227B (en) | A kind of instruction learning method based on Internet of Things | |
CN101593256B (en) | Safe input method based on Windows operating system | |
Selic | Real-time object-oriented modeling | |
CN106127072A (en) | E-seal stamped signature apparatus and method | |
CN104932330B (en) | A kind of security protection linkage platform | |
CN107239210A (en) | Terminal control method, device, computer installation and storage medium | |
Schauer et al. | Hot spot recovery in object-oriented software with inheritance and composition template methods | |
CN106095459A (en) | A kind of be automatically performed embedded software storehouse select the implementation method with specialization |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20161116 |
|
WD01 | Invention patent application deemed withdrawn after publication |