CN108279901B - UI file editing method and device, electronic equipment and storage medium - Google Patents

UI file editing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN108279901B
CN108279901B CN201810062307.2A CN201810062307A CN108279901B CN 108279901 B CN108279901 B CN 108279901B CN 201810062307 A CN201810062307 A CN 201810062307A CN 108279901 B CN108279901 B CN 108279901B
Authority
CN
China
Prior art keywords
file
files
parameters
nodes
node
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.)
Active
Application number
CN201810062307.2A
Other languages
Chinese (zh)
Other versions
CN108279901A (en
Inventor
向兆威
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201810062307.2A priority Critical patent/CN108279901B/en
Publication of CN108279901A publication Critical patent/CN108279901A/en
Application granted granted Critical
Publication of CN108279901B publication Critical patent/CN108279901B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

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)
  • Stored Programmes (AREA)

Abstract

The disclosure provides a UI file editing method, a UI file editing device, electronic equipment and a storage medium. The UI file editing method comprises the following steps: loading UI files in a UI resource package, and acquiring parameters of a plurality of UI files; responding to an adjustment instruction of the parameters of the UI file to adjust the parameters; and restoring the adjusted parameters of the UI file to the UI file, and packaging and integrating the updated UI file to generate a new UI resource package. The UI file editing method provided by the disclosure can enable the UI file to have a better expression effect.

Description

UI file editing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a UI file editing method and apparatus for editing a UI file in a UI application side file, an electronic device, and a storage medium.
Background
A UI (User Interface) is an operation Interface for a User, and is typically developed by an engineer using a specific tool, for example, editing a UI Interface using a UI file editor in a cos Studio.
A UI file editor is often attached to a mature engine (Cocos, Unity, unregeal, etc.), but the development progress of the UI file editor often lags for a new engine, and in order to improve efficiency, it is often necessary to use resources derived from editors of other engines, for example, a UI resource derived from a Cocos Studio UI file editor is used in a game developed by the new engine through conversion.
One such approach is to limit the engines that use the UI resources, and two often result in the UI behaving differently in the editor than it actually behaves. In addition, when a developer redevelops the engine, the UI in the editor is inconsistent with the actually-operated performance, and the inconsistency is difficult to debug and adjust, so that great trouble is caused to project development.
Furthermore, existing UI file editors often only provide customized presentations over the range of presentations, which is difficult to implement when custom presentations are required, such as some specific animations in the UI. In terms of performance, the existing UI file editor cannot analyze the performance of a UI in actual operation or a special effect specified by a certain UI, and for a created UI, only basic expressions can be seen, and deeper analysis and optimization are difficult to perform.
Therefore, there is a need for a UI file editing method that has a small engine limit and can adjust the performance and performance of a UI in actual operation.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
An object of the present disclosure is to provide a UI file editing method for editing a UI file in an actual execution effect, which overcomes one or more problems due to limitations and disadvantages of the related art, at least to some extent.
According to a first aspect of the embodiments of the present disclosure, there is provided a UI file editing method, including:
loading UI files in a UI resource package, and acquiring parameters of a plurality of UI files;
responding to an adjustment instruction of the parameters of the UI file to adjust the parameters;
and restoring the adjusted parameters of the UI file to the UI file, and packaging and integrating the updated UI file to generate a new UI resource package.
In an exemplary embodiment of the present disclosure, adjusting the parameter in response to the adjustment instruction for the parameter of the UI file includes:
acquiring nodes of the UI files, wherein the nodes of the UI files are all bound with the corresponding response layers of the UI;
and traversing all the nodes loaded with the UI files to monitor the adjustment instruction of the nodes of the UI files.
In an exemplary embodiment of the present disclosure, the parameters of the UI file include a resource directory and a data file, wherein the data file records information of nodes in the UI file in a tree structure, and the information of the nodes includes attribute information and child node information.
In an exemplary embodiment of the present disclosure, the adjusting instruction of the parameter of the UI file includes: at least one of UI position proofreading, UI node position adjustment, resource search, UI performance display and UI related data sheet filling.
According to a second aspect of the present disclosure, there is provided a UI file editing apparatus comprising:
the parameter acquisition module is set to load the UI files in the UI resource package and acquire parameters of a plurality of UI files;
the parameter adjusting module is used for adjusting the parameters in response to an adjusting instruction of the parameters of the UI file;
and the parameter restoring module is used for restoring the adjusted parameters of the UI file into the UI file, and packaging and integrating the updated UI file to generate a new UI resource package.
In an exemplary embodiment of the present disclosure, the parameter adjustment includes:
the node acquisition unit is arranged to acquire the nodes of the UI files, wherein the nodes of the UI files are all bound with the corresponding response layers of the UI;
and the node monitoring unit is set to traverse all the nodes loaded with the UI files so as to monitor the adjustment instructions of the nodes of the UI files.
In an exemplary embodiment of the present disclosure, the parameters of the UI file include a resource directory and a data file, wherein the data file records information of nodes in the UI file in a tree structure, and the information of the nodes includes attribute information and child node information.
In an exemplary embodiment of the present disclosure, the adjusting instruction of the parameter of the UI file includes: at least one of UI position proofreading, UI node position adjustment, resource search, UI performance display and UI related data sheet filling.
According to a third aspect of the embodiments of the present disclosure, there is provided a UI file editing apparatus including: a memory; and a processor coupled to the memory, the processor configured to execute the UI file editing method as described in any one of the above, based on instructions stored in the memory.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements the UI file editing method as recited in any one of the above.
According to the UI file editing method, the UI application side file and the UI resource package are loaded, the UI file in the UI resource package is analyzed, and the node parameter and the performance parameter of the UI file are edited, so that the UI file is edited in an actual operation effect, the harmony between the UI file and the UI application side file is improved, and the presentation effect of the UI file is improved. In addition, the accuracy of editing the UI file is improved by displaying the performance of the UI file in the actual operation effect and modifying the performance parameters according to the display effect.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
Fig. 1 is a flowchart of a UI file editing method in an exemplary embodiment of the present disclosure.
Fig. 2 is a flowchart of another UI file editing method of an exemplary embodiment of the present disclosure.
Fig. 3 is a block diagram of an apparatus for editing a UI file according to an embodiment of the present disclosure.
FIG. 4 is an interface of a UI file editor in an embodiment of the disclosure.
Fig. 5 is a schematic diagram of the UI location collation function of the UI file editor 400 in an embodiment of the present disclosure.
Fig. 6 is a schematic diagram of a UI node position adjustment function of the UI file editor 400 in an embodiment of the present disclosure.
Fig. 7 is a schematic diagram of the UI resource search function of the UI file editor 400 in an embodiment of the present disclosure.
Fig. 8 is a schematic diagram of a UI performance presentation function of the UI file editor 400 in an embodiment of the present disclosure.
Fig. 9 is a schematic diagram of the UI data filling function of the UI file editor 400 in an embodiment of the present disclosure.
Fig. 10 is a block diagram illustrating an electronic device 1000 in accordance with an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Further, the drawings are merely schematic illustrations of the present disclosure, in which the same reference numerals denote the same or similar parts, and thus, a repetitive description thereof will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The following detailed description of exemplary embodiments of the disclosure refers to the accompanying drawings.
Fig. 1 is a flowchart of a UI file editing method in an exemplary embodiment of the present disclosure. Referring to fig. 1, the UI file editing method 100 may include:
and step S102, loading UI files in the UI resource package, and acquiring parameters of a plurality of UI files.
And step S104, responding to the adjustment instruction of the parameters of the UI file to adjust the parameters.
And step S106, storing the adjusted parameters of the UI file back into the UI file, and packaging and integrating the updated UI file to generate a new UI resource package.
According to the UI file editing method, the UI application side file and the UI resource package are loaded, the UI file in the UI resource package is analyzed, and the node parameter and the performance parameter of the UI file are edited, so that the UI file is edited in an actual operation effect, the harmony between the UI file and the UI application side file is improved, and the presentation effect of the UI file is improved. In addition, the accuracy of editing the UI file is improved by displaying the performance of the UI file in the actual operation effect and modifying the performance parameters according to the display effect.
The following describes each step of the UI file editing method 100 in detail.
In step S102, a UI file in a UI resource package is loaded, and parameters of a plurality of UI files are acquired.
In an exemplary embodiment of the present disclosure, loading a UI file in a UI resource package includes loading a UI application side file by a built-in UI application side engine, loading the UI resource package by the UI application side file, and acquiring a parameter of the UI file in the UI resource package.
The UI editing method 100 may be implemented by a file editor. The file editor can be internally provided with a plurality of engines for loading UI application side files applicable to different engines. The variety of the built-in engine can be expanded, and convenience is provided for supporting more UI application side files.
In the related UI resource editor, the UI files supported by other engines can be generated by packaging and integrating the resources of the original UI resources. Therefore, the UI file which is in accordance with the support type of the UI application side engine can be loaded through the UI application side engine, so that the UI application side file can control the UI file.
After the UI application side file is loaded through the built-in UI application side engine, the UI resource package can be loaded through the UI application side. In the process of loading the UI resource package, the UI application side file can acquire a plurality of UI files in the UI resource package, so that the UI files can be previewed in the actual application effect preliminarily.
After the plurality of UI files are obtained, the UI application side file can carry out preliminary analysis on the UI files, and the node parameters of the plurality of UI files are obtained through obtaining the data of the UI application side. Next, the performance configuration file in the UI resource package may be directly read and analyzed, so as to obtain the performance parameters of the plurality of UI files.
In an exemplary embodiment of the present disclosure, the parameters of the UI file include a resource directory and a data file, wherein the data file records information of nodes in the UI file in a tree structure, and the information of the nodes includes attribute information and child node information. By reading the attribute information of the node or the child node, the performance parameters of the UI file can be obtained.
Taking an electronic game as an example, the performance parameters of the game, the special effect parameters of the game, and the like can be obtained by reading the UI file through the engine interface.
In step S104, the parameter is adjusted in response to the adjustment instruction for the parameter of the UI file.
The adjusting of the parameters may mainly include adjusting node parameters and performance parameters. Adjusting the node parameters can adjust the position of each element in the UI file, and adjusting the performance parameters can adjust the dynamic effect, performance (e.g., Drawcall, FPS, etc.) and some UI characteristics (e.g., sound of click, sliding process) of the UI file.
In an exemplary embodiment of the present disclosure, the adjusting instruction of the parameter of the UI file may include: at least one of UI position proofreading, UI node position adjustment, resource search, UI performance display and UI related data sheet filling. The UI position correction and the UI node position adjustment belong to node parameter adjustment, and the resource search, the UI performance display and the UI related data sheet filling belong to performance parameter adjustment.
Fig. 2 is a flowchart of another UI file editing method of an exemplary embodiment of the present disclosure. Referring to fig. 2, in an exemplary embodiment of the present disclosure, step S104 may include:
step S1042, obtaining the nodes of the UI files, wherein the nodes of the UI files are all bound with the corresponding response layers of the UI.
Step S1044 is to traverse all the nodes loaded with the UI file to monitor the adjustment instruction for the nodes of each UI file.
The node distribution structure of the UI files can be obtained through the UI application party, and the response layer is bound to the nodes of the UI files so as to monitor the node editing instructions. Illustratively, one or more response layers may be bound to each node by traversing all nodes (tree structures) of the loaded UI file to implement various operations on each node of the UI file.
In the UI editor, operations such as dragging and moving a UI node are directly operated UI interfaces in a game. In some embodiments, clicking on a button may be responsive because the button is bound to a response event. Therefore, after the Touch event is bound to all the nodes in the UI file, when the mouse is pressed for a long time, the corresponding UI node can monitor the event. For example, in the process of acquiring that a mouse key is pressed and a mouse is moved, the UI node which monitors the Touch event is also moved correspondingly by calculating the relative position of the movement of the mouse, so that the effect of dragging the UI node by the mouse can be realized. Since each node is bound with a Touch event, in order to avoid the penetration, the Touch event can be set to be impenetrable, and the node receives the Touch event first and which node responds to the operation. Thus, the UI node of the upper layer receives the Touch message before the lower layer receives the Touch message.
The performance parameters of the UI file can be adjusted in various ways, for example, the values of the parameters are directly modified. The present disclosure is not particularly limited in this regard as the variety of performance parameters is numerous.
In step S106, the adjusted parameters of the UI file are restored to the UI file, and the updated UI file is packaged and integrated to generate a new UI resource package.
In some embodiments, the UI file editor may have a write back effect.
Because the edited UI file is exported by a UI editor such as Cocos Studio, and the like, in order to ensure complete and persistent modification, the UI file attributes such as the node position modified by the UI file editor and the like can be written back into the original UI file, so as to ensure that the UI effect seen in the UI application side file is consistent with the result finally edited and saved in the tool, and an engine using the UI resource next time can acquire the latest UI file. The write-back of the adjusted parameters to the original UI file involves the conversion of the relative and absolute positions of the nodes, scaling rules, etc.
In this way, rewriting of the original file can be achieved by adjusting the UI file in the UI application side file window in the editor and rewriting back into the UI file exported by the original editor.
In some embodiments, the UI file editor may provide preview functionality. Because the special effect of the UI file can be packaged as a basic method, each UI file is played in a targeted mode by setting a configuration table.
The performance exhibition instruction may be a parameter adjustment instruction for adjusting a performance parameter of the UI file. By showing the performance of the UI file in real time in the actual application environment, the tedious steps of back and forth adjustment caused by different expressions of the UI in the editor and the actual application environment can be avoided, and various characteristics of the UI file can be monitored in real time. Therefore, the latest UI file can be seen in the preview window of the file editor every time, and each change of the UI file in an external editor such as Cocos and the like can be fed back to the UI file editor in real time. Of course, the effect of the modified saved UI file can be immediately seen even when the UI file adjusted by the UI file editor is saved and exported and is opened again in the UI file editor.
The UI file editing method 100 and the UI file editing method 200 described above will be described in detail below by way of specific embodiments.
Taking a game as an example, the UI file editor provided by the present disclosure may load a game file, and load an original UI file into the game, thereby implementing adjustment of various UI controls in the game. Various characteristics of the UI, such as the performance of the UI in the game (e.g., Drawcall, FPS, etc.) and some UI characteristics (e.g., sound of click, process of sliding) can also be conveniently viewed through the UI file editor provided by the present disclosure.
For game UI editing, the UI files exported by the Cocos Studio's UI editor can be loaded directly by Cocos's game engine interface. For games using other engines, the UI file exported by Cocos may be converted, i.e., UI packaged, first. The Cocos exported original UI file comprises a json file and a plurality of resource directories, and the packaged UI resource package is generally a csb file and can be directly loaded in a game.
UI packaging is used in games by converting original UI files exported by Cocos into csb files which can be analyzed by other engines. Through the above process, the original UI file exported by Cocos can be called by other engines, which is also the reason for the inconsistency of the original UI on the new engine and the appearance in Cocos. In order to be able to see the adjusted representation of the original UI file in the game in real time in the UI file editor, a single UI file can be packaged once each time a UI resource package is opened, which is on the order of milliseconds. Furthermore, to avoid common processing of all UI files from affecting the results of a single UI generation, all UI files may be packaged completely at one time first.
After the json file of the Cocos UI is opened, the file can be seen to record the information of all nodes of the UI file in a tree structure, and each node comprises an attribute and a child node. If a node location is moved in the game, the node location can be modified by calculating the relative displacement of the node movement and adding it to the attributes of the node location in the json file. The positions of some nodes are set according to the relative positions of the parent nodes, and the modification of the position attribute can also be realized by performing conversion of the relative positions after calculation. In the source code of the Cocos, the definition and the calculation method of each field are provided, and the write-back of the parameters can be realized through similar calculation conversion provided by the source code. For example, the location of a certain UI node may be represented by:
"scaleX":1,
"scaleY":1,
"sizePercentX":72000,
"sizePercentY":73300,
"x":0,
"y":0,
the nodes work together, and the computational formula code can be inquired in the cos source code.
Once the relevant attributes in the original json file are written back and the single UI is exported as a file that can be used in the game (e.g., a csb file edited in the engine), a UI representation consistent with that in the editor can be obtained in real applications.
Furthermore, the Cocos UI export json file records all picture resources, so that the json file can be traversed to retrieve which resources appear in which UIs, and the like. Json files, which use the original UI, are reasonably analyzed, many problems with UIs can be prevented.
In some embodiments, it is desirable to export UI performance data used in the game to facilitate finding and optimizing UI files that are more resource-consuming. The performance data of a single UI can be directly obtained through a game engine interface generally, and the performance data of all UIs can be obtained by sequentially opening each UI file, closing the UI file after obtaining the data, and writing all the obtained performance data into one file.
The UI file editing method for adjusting a UI in a game provided in this embodiment may adjust each node of a UI file based on game content, and may further acquire performance data of the UI file, so as to implement customization of UI expression by defining and displaying UI expression in the game.
Corresponding to the above method embodiment, the present disclosure also provides a UI file editing apparatus, which may be used to execute the above method embodiment.
Fig. 3 is a block diagram of an apparatus for editing a UI file according to an embodiment of the present disclosure.
Referring to fig. 3, the UI file editing apparatus 300 may include:
a parameter obtaining module 302 configured to load UI files in a UI resource package and obtain parameters of a plurality of UI files;
a parameter adjusting module 304 configured to adjust the parameter in response to an adjustment instruction for the parameter of the UI file;
the parameter restoring module 306 is configured to restore the adjusted parameters of the UI file to the UI file, and pack and integrate the updated UI file to generate a new UI resource package.
In an exemplary embodiment of the present disclosure, the parameter adjusting module 304 includes:
a node acquiring unit 3022 configured to acquire nodes of the UI file, where the nodes of the UI file are all bound to the corresponding response layer of the UI;
the node monitoring unit 3024 is configured to traverse all the nodes loaded with the UI files to monitor adjustment instructions for the nodes of the UI files.
In an exemplary embodiment of the present disclosure, the parameters of the UI file include a resource directory and a data file, wherein the data file records information of nodes in the UI file in a tree structure, and the information of the nodes includes attribute information and child node information.
In an exemplary embodiment of the present disclosure, the adjusting instruction of the parameter of the UI file includes: at least one of UI position proofreading, UI node position adjustment, resource search, UI performance display and UI related data sheet filling.
The UI file editing apparatus 300 can be represented as a UI file editor.
FIG. 4 is an interface of a UI file editor in an embodiment of the disclosure.
Referring to fig. 4, the main interface of the UI file editor 400 may mainly include a file directory module 401, a game window 402, a child node module 403, and a plan module 404.
The file directory module 401 lists all UI files in the game, the selected UI file is displayed in the game window 402, the child node module 403 displays all child nodes of the selected UI file, and the planning module 404 is used to fill out a planning table related to UI attributes for the UI file according to specific project requirements. In other embodiments, the main interface of the UI file editor 400 may further include other modules, which are not particularly limited by this disclosure.
In one embodiment, the functionality of the UI file editor may include, for example, UI location collation.
Fig. 5 is a schematic diagram of the UI location collation function of the UI file editor 400 in an embodiment of the present disclosure.
Referring to fig. 5, when the reference line switch is clicked and the reference line is opened, the reference line preset in the UI design game interface can be seen. Since the UI and the UI reference line are displayed directly in the game, what you see is what you get. By means of the reference line, it can be seen visually which UIs do not conform to UI cutting and placing rules uniformly specified in the game.
In one embodiment, the functions of the UI file editor may include, for example, UI node position adjustment.
Fig. 6 is a schematic diagram of a UI node position adjustment function of the UI file editor 400 in an embodiment of the present disclosure.
Referring to FIG. 6, clicking on a UI node, such as the "away" button in the figure, may select and highlight the node. In one embodiment, the selected UI node may be moved by the keyboard, for example, by quickly moving a certain UI node by the up, down, left, and right keys of the keyboard, performing pixel level fine tuning by "a", "s", "d", "w", and defining a long press as a quick movement and a click as a single step movement. In another embodiment, the UI node may also be dragged to any position by the mouse.
After the position of the UI node is modified, the modified UI can be written back to the original UI file by clicking the export button, and the UI is packaged after being uploaded, so that the effect of saving the UI file is consistent with the effect expressed in the editor, the condition that the expression of the UI in the editor is inconsistent with the expression of the UI in the game in the UI editors such as Cocos Studio and the like can be avoided, and the later-period adjustment work is reduced.
In one embodiment, the functionality of the UI file editor may include, for example, UI resource searching.
Fig. 7 is a schematic diagram of the UI resource search function of the UI file editor 400 in an embodiment of the present disclosure.
Referring to fig. 7, after inputting a resource name (e.g., file name of png picture) in a search box and clicking a "search resource" button, all UI files containing the current resource can be obtained in a UI file list, and by clicking any one UI file, all resources of the UI can be obtained in a lower UI resource list. Through the UI resource search function, the reuse condition of the resources can be checked.
In one embodiment, the functionality of the UI file editor may include, for example, a UI performance presentation.
Fig. 8 is a schematic diagram of a UI performance presentation function of the UI file editor 400 in an embodiment of the present disclosure.
Referring to fig. 8, fig. 8 illustrates performance data of one UI arbitrarily opened.
After the UI is loaded in the game, its performance data, such as DrawCall, Fps, etc., can be extracted and exposed by the UI file editor. In some embodiments, the UI file editor may provide a one-touch export function for exporting the performance data of all UI files one-touch and sorting in a specified order so that it can be seen which UIs have performance problems and need to focus attention. The specific nodes are switched on and off, and the UI performance changes correspondingly, so that the performance problem can be positioned and reviewed aiming at the specific UI files and nodes.
Fig. 9 is a schematic diagram of the UI data filling function of the UI file editor 400 in an embodiment of the present disclosure.
Referring to fig. 9, the filling-in of UI file parameters may be performed in a UI file editor, thereby more conveniently adding, editing UI properties, or previewing UI effects.
The above-described functions of the UI file editor 400 are relatively common functions, and in some embodiments, those skilled in the art can customize more rich functions according to project requirements.
According to the UI file editor provided by the disclosure, the original UI file is loaded into the game, the adjustment of various UI controls is realized in the game, and the saved result is rewritten back to the original file, so that the UI effect seen in the game can be ensured to be consistent with the result finally edited and saved in the UI file editor. By the UI file editor provided by the disclosure, characteristics of the UI file, such as the performance of the UI in a game (such as Drawcall, FPS and the like) and some UI characteristics (such as clicking sound and sliding process) can be conveniently viewed and edited.
According to an aspect of the present disclosure, there is provided a UI file editing apparatus including:
a memory; and
a processor coupled to the memory, the processor configured to perform the method of any of the above based on instructions stored in the memory.
The specific manner in which the processor of the apparatus in this embodiment performs operations has been described in detail in the embodiment related to the UI file editing method, and will not be elaborated upon here.
Fig. 10 is a block diagram illustrating an electronic device 1000 in accordance with an example embodiment. The electronic device 1000 may be a mobile terminal such as a smart phone or a tablet computer.
Referring to fig. 10, electronic device 1000 may include one or more of the following components: processing component 1002, memory 1004, power component 1006, multimedia component 1008, and communications component 1016.
The processing component 1002 generally controls overall operation of the electronic device 1000, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 1002 may include one or more processors 1018 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 1002 may include one or more modules that facilitate interaction between processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate interaction between the multimedia component 1008 and the processing component 1002.
The memory 1004 is configured to store various types of data to support operations at the electronic device 1000. Examples of such data include instructions for any application or method operating on the electronic device 1000. The memory 1004 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. Also stored in memory 1004 are one or more modules configured to be executed by the one or more processors 1018 to perform all or a portion of the steps of any of the illustrated methods described above.
The power supply component 1006 provides power to the various components of the electronic device 1000. The power components 1006 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 1000.
The multimedia component 1008 includes a screen that provides an output interface between the electronic device 1000 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The communication component 1016 is configured to facilitate wired or wireless communication between the electronic device 1000 and other devices. The electronic device 1000 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1016 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communications component 1016 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 1000 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements the UI file editing method as described in any one of the above. The computer-readable storage medium may be, for example, transitory and non-transitory computer-readable storage media including instructions.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A UI file editing method, applied to a file editor, the file editor having a write-back effect, the method comprising:
loading UI files in a UI resource package, and acquiring parameters of a plurality of UI files;
responding to an adjustment instruction of the parameters of the UI file to adjust the parameters;
the adjusted parameters of the UI file are restored to the UI file, and the updated UI file is packaged and integrated to generate a new UI resource package;
wherein, the loading the UI file in the UI resource package includes:
loading a UI application side file through a built-in UI application side engine, and loading the UI resource package through the UI application side file;
the obtaining of the parameters of the plurality of UI files comprises:
acquiring node parameters of a plurality of UI files by acquiring data of the UI application party;
and reading and analyzing the performance configuration files in the UI resource package to obtain the performance parameters of the UI files.
2. The UI file editing method according to claim 1, wherein the adjusting the parameter in response to the instruction to adjust the parameter of the UI file comprises:
acquiring nodes of the UI files, wherein the nodes of the UI files are all bound with the corresponding response layers of the UI files;
and traversing all the nodes loaded with the UI files to monitor the adjustment instruction of the nodes of the UI files.
3. The UI file editing method according to claim 1, wherein the parameters of the UI file include a resource directory and a data file, wherein the data file records information of nodes in the UI file in a tree structure, the information of the nodes including attribute information and child node information.
4. The UI file editing method according to claim 1, wherein the instruction to adjust the parameter of the UI file comprises: at least one of UI position proofreading, UI node position adjustment, resource search, UI performance display and UI related data sheet filling.
5. An apparatus for UI file editing, the apparatus being applied to a file editor, the file editor having a write-back effect, the apparatus comprising:
the parameter acquisition module is set to load the UI files in the UI resource package and acquire parameters of a plurality of UI files;
the parameter adjusting module is used for adjusting the parameters in response to an adjusting instruction of the parameters of the UI file;
the parameter restoring module is used for restoring the adjusted parameters of the UI file into the UI file and packaging and integrating the updated UI file to generate a new UI resource package;
the parameter acquisition module is also configured to load a UI application side file through a built-in UI application side engine and load the UI resource package through the UI application side file; and
acquiring node parameters of a plurality of UI files by acquiring data of the UI application party;
and reading and analyzing the performance configuration files in the UI resource package to obtain the performance parameters of the UI files.
6. The UI file editing apparatus according to claim 5, wherein the parameter acquisition adjusting module comprises:
the node acquisition unit is arranged to acquire the nodes of the UI files, wherein the nodes of the UI files are all bound with the corresponding response layers of the UI files;
and the node monitoring unit is set to traverse all the nodes loaded with the UI files so as to monitor the adjustment instructions of the nodes of the UI files.
7. The UI file editing apparatus as claimed in claim 5, wherein the parameters of the UI file include a resource directory and a data file, wherein the data file records information of nodes in the UI file in a tree structure, the information of the nodes including attribute information and child node information.
8. The UI file editing apparatus according to claim 5, wherein the instruction to adjust the parameter of the UI file comprises: at least one of UI position proofreading, UI node position adjustment, resource search, UI performance display and UI related data sheet filling.
9. An electronic device, comprising:
a memory; and
a processor coupled to the memory, the processor configured to perform the UI file editing method of any of claims 1-4 based on instructions stored in the memory.
10. A computer-readable storage medium on which a program is stored, which when executed by a processor implements the UI file editing method according to any one of claims 1 to 4.
CN201810062307.2A 2018-01-23 2018-01-23 UI file editing method and device, electronic equipment and storage medium Active CN108279901B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810062307.2A CN108279901B (en) 2018-01-23 2018-01-23 UI file editing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810062307.2A CN108279901B (en) 2018-01-23 2018-01-23 UI file editing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108279901A CN108279901A (en) 2018-07-13
CN108279901B true CN108279901B (en) 2021-07-13

Family

ID=62804603

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810062307.2A Active CN108279901B (en) 2018-01-23 2018-01-23 UI file editing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108279901B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110368692B (en) * 2019-07-19 2023-08-22 网易(杭州)网络有限公司 Image-text mixed arrangement method and device
CN112817585B (en) * 2021-02-26 2022-09-09 厦门极致互动网络技术股份有限公司 Cocos2dx UI interface construction method based on Unity editor
CN113450463B (en) * 2021-07-01 2023-07-21 网易(杭州)网络有限公司 Preform conversion method and apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106293732A (en) * 2016-08-03 2017-01-04 网易(杭州)网络有限公司 Resource loading method and device
US9733916B2 (en) * 2015-11-23 2017-08-15 Business Objects Software Limited Linking customized external widgets to dashboard data
CN107577459A (en) * 2017-08-21 2018-01-12 杰为软件***(深圳)有限公司 A kind of towed cross-platform development system and method based on modularization

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070150816A1 (en) * 2005-12-22 2007-06-28 Innopath Software, Inc. User interface authoring utility for changing user interface elements on wireless devices
US9035947B2 (en) * 2012-05-08 2015-05-19 Electronics Arts Inc. Tool for video game application development
CN104793927A (en) * 2014-12-30 2015-07-22 北京白鹭时代信息技术有限公司 Interface editing method and device
CN106033340B (en) * 2015-03-16 2019-03-22 广州四三九九信息科技有限公司 The visualizing editing method and system of hand trip fight technical ability

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9733916B2 (en) * 2015-11-23 2017-08-15 Business Objects Software Limited Linking customized external widgets to dashboard data
CN106293732A (en) * 2016-08-03 2017-01-04 网易(杭州)网络有限公司 Resource loading method and device
CN107577459A (en) * 2017-08-21 2018-01-12 杰为软件***(深圳)有限公司 A kind of towed cross-platform development system and method based on modularization

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于Eclipse的可视化界面设计器的设计与实现;褚晓伟;《中国优秀硕士学位论文全文数据库 信息科技辑》;20151015;I138-170 *

Also Published As

Publication number Publication date
CN108279901A (en) 2018-07-13

Similar Documents

Publication Publication Date Title
CN107844297B (en) Data visualization implementation system and method
US10242331B2 (en) Supplemental system for business intelligence systems to provide visual identification of meaningful differences
CN108345456A (en) Page code generation method, device, computer equipment and storage medium
Mori et al. Tool support for designing nomadic applications
CN108279901B (en) UI file editing method and device, electronic equipment and storage medium
CN108363587A (en) Application program operation and monitoring method, device, computer equipment and storage medium
WO2022179082A1 (en) Data processing method and apparatus
CN111273899B (en) Code processing method, device, electronic equipment and storage medium
KR20050077787A (en) Method and system for automatically determining differences in a user interface throughout a development cycle
CN111666740A (en) Flow chart generation method and device, computer equipment and storage medium
CN111143402B (en) Extension model generation method, equipment and medium
US20100169805A1 (en) Dynamic point and extend user interface
US10372812B2 (en) Combining aspects of a template into multiple web pages
CN112817817B (en) Buried point information query method, buried point information query device, computer equipment and storage medium
CN111667199A (en) Workflow construction method and device, computer equipment and storage medium
CN112860247A (en) Custom generation method, device, equipment and medium for model component
CN113434134B (en) Component processing method and device, electronic equipment and storage medium
CN115437608A (en) Intelligent research and development assisting method and device
CN113408262A (en) Document online editing and generating system, method, device and storage medium
US8516015B2 (en) Mechanism for making changes to server file system
CN113900725A (en) Interface configuration method and device, computer equipment and storage medium
CN108021317B (en) Method and device for screen editing
US11379194B2 (en) Systems and methods for automatic code generation
CN104615536A (en) Test case control method and electronic device
CN114860125A (en) Flow chart processing method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant