Guiding mark display method and device, electronic equipment, and storage medium
By automatically binding and unbinding boot tags through the boot tag configuration table, the problem of high code coupling in existing technologies is solved, and efficient boot tag management and maintenance are achieved.
Patent Information
- Application Number
- CN202211407808.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-10
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-11-10
AI Technical Summary
In existing technologies, binding and unbinding the bootstrap marker requires writing a lot of code manually, resulting in high code coupling, difficulty in modification, and difficulty in unified management and maintenance.
The guide tag configuration table records the relationship between the file name edited in the interface and the node bound to the guide tag. It determines whether the target node meets the preset conditions and automatically binds and unbinds the guide tag. In particular, preset conditions are added for scrolling list items to reduce the number of configuration items.
It improves the efficiency of bootstrap flag configuration, reduces the coupling between the interface and the program, facilitates test coverage and subsequent modifications, and achieves code reusability and ease of maintenance.
Smart Images

Figure CN115640008B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to methods and apparatus for displaying guide markers, electronic devices, and storage media. Background Technology
[0002] With the continuous development of terminal technology, the types of applications installed on terminal devices are increasing. Taking game applications as an example, most games currently have different functional systems, and each functional system has multiple subsystems. When a subsystem has actionable content, a guide marker (such as a red dot) is displayed on the functional controls of the main interface to guide the user to view the new content, reminding the user that there is new action content. When the user opens a subsystem, the subsystem's tab also displays a guide marker to guide the user to perform the corresponding action. After the user has finished performing the action, the marker needs to be cleared, i.e., the guide marker needs to be unbound.
[0003] Existing technologies require writing code for binding and unbinding guide tags for each control when configuring guide tags. This is entirely manual, involves a large amount of code, and the guide tags are completely coupled with the interface, making modification difficult.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] In view of the above problems, this application is made to provide a method and apparatus for displaying guide marks that overcomes or at least partially solves the above problems, electronic devices, and storage media, including:
[0006] A method for displaying a guide marker, the method comprising:
[0007] In response to the operation command to open the target interface, the target interface editing file name corresponding to the target interface is obtained; the target interface refers to the interface containing the guide marker;
[0008] Based on the target interface editing file name and the guide tag configuration table, the target node in the target interface that is bound to the guide tag is determined; the guide tag configuration table records the association between the interface editing file name and the node bound to the guide tag; when the node bound to the guide tag is a list node displayed in the interface as a scrolling list, the guide tag configuration table also records the preset conditions associated with the list node;
[0009] When the target node is a target list node displayed in the interface as a scrolling list, determine whether the target control corresponding to the target list node meets the preset conditions;
[0010] If so, the guide marker is displayed at the corresponding position of the target control.
[0011] A display device for guide markers, the device comprising:
[0012] The file name acquisition module is used to acquire the target interface editing file name corresponding to the target interface in response to the operation command to open the target interface; the target interface refers to the interface containing the guide marker;
[0013] The target node determination module is used to determine the target node in the target interface that is bound to the guide tag based on the target interface editing file name and the guide tag configuration table; the guide tag configuration table records the association between the interface editing file name and the node bound to the guide tag; when the node bound to the guide tag is a list node displayed in the interface as a scrolling list, the guide tag configuration table also records the preset conditions associated with the list node;
[0014] The preset condition judgment module is used to determine whether the target control corresponding to the target list node meets the preset conditions when the target node is a target list node displayed in the interface as a scrolling list;
[0015] A guide marker display module is used to display the guide marker at the corresponding position of the target control if the condition is met.
[0016] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method for displaying a guide marker as described above.
[0017] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for displaying a boot marker as described above.
[0018] This application has the following advantages:
[0019] In the embodiments of this application, the target interface editing file name corresponding to the target interface is obtained in response to the operation instruction to open the target interface; the target interface refers to the interface containing the guide mark; the target node bound to the guide mark in the target interface is determined according to the target interface editing file name and the guide mark configuration table; the guide mark configuration table records the association relationship between the interface editing file name and the node bound to the guide mark; when the node bound to the guide mark is a list node displayed in the interface as a scrolling list, the guide mark configuration table also records the preset conditions associated with the list node; when the target node is a target list node displayed in the interface as a scrolling list, it is determined whether the target control corresponding to the target list node meets the preset conditions; if so, the guide mark is displayed at the corresponding position of the target control; this can realize the configuration of guide mark binding for a scrolling list containing a large number of list items using a small number of configuration items, which can improve the efficiency of generating the guide mark configuration table, realize the reusability of program code, and configure guide mark binding through the guide mark configuration table, which can not only make it convenient for testers to have an overall view and improve test coverage, but also reduce the coupling between the guide mark and the interface, making it convenient for subsequent modifications. Attached Figure Description
[0020] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 A diagram illustrating the display rules for guide markers;
[0022] Figure 2 This is a flowchart illustrating the steps of a method for displaying a guide marker according to an embodiment of this application;
[0023] Figure 3 This is a schematic diagram of a scrolling list in an example of Embodiment 1 of this application;
[0024] Figure 4 This is a schematic diagram of the boot tag configuration table in an example of Embodiment 1 of this application;
[0025] Figure 5 This is a schematic diagram illustrating the application process of a method for displaying guide markers according to an embodiment of this application;
[0026] Figure 6 This is a schematic diagram of an interface for editing files, as shown in an example of an embodiment of this application.
[0027] Figure 7 This is a structural block diagram of a guide mark display device according to an embodiment of this application. Detailed Implementation
[0028] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0029] The display of client-side guidance markers (such as red dots) is intended to guide player clicks, notify changes in function status or operability, and enhance the player experience and operation. The display rules for guidance markers are as follows: Figure 1 As shown, when the "open" button in the challenge entry needs to display a guide marker, the challenge entry itself also needs to display a guide marker. Therefore, they can be merged into `challenge.open`. Similarly, tracing back towards the root node to the trial entry `exp`, the tree structure corresponding to the guide marker will become `exp.challenge.open`. The server only needs to notify the endpoints (i.e., leaf nodes) of this tree structure, and the client will then pass the guide marker towards the root node of the tree structure, thus displaying the guide marker at each node in this tree structure.
[0030] Each node in the tree needs to be bound to a bootstrap tag, in order to Figure 1 Taking the tree structure exp.challenge.open as an example, in existing technologies, to achieve the binding of the guide marker, the program needs to bind controls in three positions: exp, challenge, and open. The tree structure is then converted into tree nodes and the relationships between their corresponding controls, as shown in the following example:
[0031] exp.challenge.open <=> btnOpen
[0032] exp.challenge <=> btnChallenge
[0033] exp <=> btnExp
[0034] The left side, exp.challenge.open, exp.challenge, and exp, represent the splitting of the tree structure, while the right side, btnOpen, btnChallenge, and btnExp, are controls for displaying guide markers.
[0035] Based on the above relationships between tree nodes and controls, code is written when the corresponding interface is created. Taking the relationship between exp.challenge.open and btnOpen as an example, the code example for binding the guide tag is as follows:
[0036] RedPointManager.getInst().registerWidgetPoint("exp.challenge.open",this.btnOpen);
[0037] Each tree node and control relationship requires writing a piece of code to bind the guide tag.
[0038] After the interface is closed or destroyed, it is necessary to unbind the guide markers from the controls bound to the guide markers on that interface. In existing technologies, unbinding is also achieved by writing code. Taking the relationship between exp.challenge.open and btnOpen as an example, the code example for unbinding the guide markers is as follows:
[0039] RedPointManager.getInst().unRegisterWidgetPoint("exp.challenge.open",this.btnOpen);
[0040] Each tree node and control relationship requires writing a piece of code to unbind the guide marker.
[0041] It is evident that existing technologies require writing code for binding and unbinding guide markers for each system and gameplay mode. With numerous interfaces and even more controls needing to display guide markers, the client program needs to write binding and unbinding operations for each system and gameplay mode, resulting in a significant workload. Furthermore, the current method of writing guide marker binding / unbinding code completely couples the guide markers with the interface. Modifying or deleting guide markers requires frequent location and searching, making unified modification difficult and maintenance challenging. Moreover, when UI designers iterate on the interface, causing changes to control names in the UI files, it's difficult to ensure that programmers receive the change information promptly. This failure to synchronize control name changes means programmers cannot update the control names in the program code, also leading to problems with guide marker display.
[0042] In view of this, this application provides a method for displaying guide markers. When the interface is opened, the control that needs to be bound to the guide marker in the opened interface is determined according to the interface editing file name and the guide marker configuration table, and the guide marker is displayed at the corresponding position of the control bound to the guide marker. This application uses the guide marker configuration table to configure the binding of guide markers, which not only makes it easier for testers to have an overall view and improves test coverage, but also reduces the coupling between the guide marker and the interface, facilitates subsequent modifications, and improves test efficiency.
[0043] To facilitate understanding of this application by those skilled in the art, the terms or nouns involved in the following embodiments of this application are explained below:
[0044] Egret Engine: An HTML5 game engine written in TypeScript.
[0045] EXML: The UI file used in the Egret Engine for visual editing of the interface. It is an XML-like (Extensible Markup Language) format.
[0046] RedPointManager: The red dot manager manages the red dot data issued by the server and maintains the display or hiding of red dots on UI components. A unique instance can be obtained through the getInst() method.
[0047] BaseWidget: An abstract UI class that manages the lifecycle of some UI elements, including creation, opening, closing, and destruction.
[0048] List: A list of items that can be displayed in a loop, allowing you to reuse a single UI control to display multiple data items.
[0049] ItemRenderer: The control class that renders each item in the List, displaying different panel effects based on different data.
[0050] Decorators: Extend the functionality of code properties, interfaces, or classes by adding annotations to the code.
[0051] Red dot: Also referred to as a guide mark in this application, it is a red circle or other similar mark displayed on some buttons or controls on the interface, used to provide prompts or notifications to the player.
[0052] Bind or unbind: This associates the red dot icon with a button; when the button triggers the red dot notification, the red dot icon will appear. Unbinding is the opposite of binding, severing the association between the two.
[0053] Reference Figure 2This paper illustrates a method for displaying a guide marker according to an embodiment of this application. This method can be applied to a game client, which may include a red dot manager. The red dot manager can bind and unbind guide markers. In this embodiment, the method for displaying the guide marker may include the following steps:
[0054] Step 201: In response to the operation command to open the target interface, obtain the target interface editing file name corresponding to the target interface; the target interface refers to the interface containing the guide marker.
[0055] For ease of understanding, this embodiment uses a game application as an example for illustrative description. Games generally contain multiple different systems or different gameplay. Each system or gameplay can have a corresponding interface editing file, which is used for the visual editing of the interface.
[0056] The target interface refers to the interface containing guidance markers. It can be understood that when there are updates to the relevant functions of the game system or gameplay, in order to guide users to understand the updated information in a timely manner, guidance markers need to be displayed in the corresponding positions of the corresponding interface of the system or gameplay. In other words, when an operation command to open the target interface corresponding to the updated system or gameplay is detected, it is necessary to obtain the target interface editing file name corresponding to the target interface so that the target control that needs to display guidance markers in the target interface can be determined based on the target interface editing file name.
[0057] Step 202: Based on the target interface edit file name and the boot tag configuration table, determine the target node in the target interface that is bound to the boot tag.
[0058] As described in the red dot configuration rules above, some controls in the interface have nested relationships, meaning one control is displayed in the interface after another control is triggered. Correspondingly, the nodes in the interface editing file can form a corresponding node tree. For example... Figure 3 As shown, the guide tag configuration table records the association between the interface editing file name and the node bound to the guide tag. After obtaining the target interface editing file name, the target node bound to the guide tag in the target interface can be determined by referring to the guide tag configuration table. That is, based on the association between the interface editing file name and the node bound to the guide tag, the target node bound to the guide tag corresponding to the target interface editing name can be determined.
[0059] Considering that when a scrolling list is displayed on the interface, it can contain multiple list items, but only a certain number of list items can be displayed on the interface at the same time. Generally, the number of list items displayed on the interface is much smaller than the total number of list items contained in the scrolling list. When some list items in the scrolling list correspond to new functions, a guide marker needs to be displayed at the corresponding position of that list item. To reduce the number of configuration items in the guide marker configuration table, preferably, when the node bound to the guide marker in the guide marker configuration table is a list node of the scrolling list displayed on the interface, the guide marker configuration table also records preset conditions associated with the list node, so that it can be determined later whether the list items displayed on the target interface need to have guide markers added based on the preset conditions. Here, the list node corresponds to the control of the list item displayed on the interface, such as... Figure 4 As shown, Figure 4 The scrolling list contains 10 list items, but only 3 list items are displayed on the interface (i.e., Figure 4 (List items within solid lines). In this embodiment, the scrolling list has 3 list nodes and 3 controls. One list node corresponds to one control, and the list items corresponding to the controls in the scrolling list will change as the scrolling list scrolls.
[0060] Step 203: When the target node is a target list node displayed in the interface as a scrolling list, determine whether the target control corresponding to the target list node meets the preset conditions.
[0061] Step 204: If yes, then display the guide mark at the corresponding position of the target control.
[0062] In this embodiment, when a scrolling list is displayed on the target interface, and at least one item in the scrolling list corresponds to a new function, the target node includes the target list node displayed on the interface. For the target list node, it is necessary to determine whether the target control corresponding to the target list node meets the preset conditions. If the target control meets the preset conditions, a guide marker is displayed at the corresponding position of the target control; if the target control does not meet the preset conditions, it means that the target control does not correspond to a new function, and in this case, the guide marker is not displayed.
[0063] The embodiments of this application obtain the target interface editing file name corresponding to the target interface in response to the operation instruction to open the target interface; the target interface refers to the interface containing the guide marker; the target node bound to the guide marker in the target interface is determined according to the target interface editing file name and the guide marker configuration table; the guide marker configuration table records the association relationship between the interface editing file name and the node bound to the guide marker; when the node bound to the guide marker is a list node displayed in the interface as a scrolling list, the guide marker configuration table also records the preset conditions associated with the list node; when the target node is a target list node displayed in the interface as a scrolling list, it is determined whether the target control corresponding to the target list node meets the preset conditions; if so, the guide marker is displayed at the corresponding position of the target control; this can realize the configuration of guide marker binding for a scrolling list containing a large number of list items using a small number of configuration items, which can improve the efficiency of generating the guide marker configuration table, realize the reusability of program code, and configure guide marker binding through the guide marker configuration table, which can not only make it convenient for testers to have an overall view and improve test coverage, but also reduce the coupling between the guide marker and the interface, making it convenient for subsequent modifications.
[0064] The method for displaying the guide mark in this exemplary embodiment will now be further described.
[0065] In step 201, in response to the operation instruction to open the target interface, the target interface editing file name corresponding to the target interface is obtained; the target interface refers to an interface containing a guide marker.
[0066] When there are updates to the game system or gameplay features, guidance markers need to be displayed in the appropriate locations on the corresponding interfaces of those systems or gameplay features to guide users to the updates in a timely manner. These interfaces can be created through interface editing files.
[0067] Taking the game's battle zone system as an example, the battle zone system can include a mission subsystem and a skill subsystem. The mission subsystem can include a mission receiving function module, a mission reward function module, etc. It can be understood that the battle zone system and the mission subsystem have a first parent-child relationship, and the mission subsystem and the receiving function module have a second parent-child relationship. The first parent-child relationship and the second parent-child relationship can be stored using a tree structure.
[0068] When a new task is received in the task receiving module, a guidance marker needs to be displayed in the control corresponding to the task receiving module, the control corresponding to the task subsystem, and the control corresponding to the theater system. At this time, the target interface can be an interface containing the control corresponding to the task receiving module, the control corresponding to the task subsystem, or the control corresponding to the theater system.
[0069] After determining the target interface, you can obtain the name of the target interface editing file corresponding to the target interface. Of course, after determining the target interface, you can also obtain the target interface editing file corresponding to the target interface.
[0070] In step 202, the target node bound to the guide tag in the target interface is determined according to the target interface edit file name and guide tag configuration table.
[0071] In this embodiment, a guide tag configuration table needs to be pre-built. The guide tag configuration table includes tree nodes and a UI tree structure. The tree nodes record the nodes that need to be bound to guide tags, and the UI tree structure records the interface editing file name corresponding to the tree node and the control name corresponding to the tree node. By linking the interface controls with the guide tag program code through the guide tag configuration table, the coupling between the interface and the program code is reduced. When the control names in the interface change, only the guide tag configuration table needs to be modified accordingly, reducing the difficulty of modification.
[0072] For example, the interface editing file name and control name can be concatenated with characters and entered into the corresponding positions in the UI tree structure. Therefore, the guide tag configuration table records the association between the interface editing file name and the node bound to the guide tag.
[0073] After determining the file name for editing the target interface, and combining it with the boot tag configuration table, the target node that is bound to the boot tag in the target interface, i.e., the target tree node, can be determined.
[0074] In an optional embodiment of this application, to ensure the accuracy of the boot tag configuration table, after the boot tag configuration table is constructed, it needs to be tested. The testing process may include:
[0075] Check whether the interface editing file name recorded in the boot tag configuration table is correct;
[0076] If correct, check if the control name in the guide mark configuration table exists in the corresponding interface editing file;
[0077] If it exists, then the boot tag configuration table detection is considered successful.
[0078] This embodiment checks the interface editing file names and control names recorded in the bootstrap configuration table. Only after the check passes can the bootstrap configuration table be used.
[0079] For example, the names of the interface editing files recorded in the guide flag configuration table can be extracted sequentially. Then, the interface editing files stored in the UI project folder of the game application can be traversed to determine whether there is an interface editing file with the same name as the interface editing file in the UI project folder. If it exists, it means that the interface editing file is correct. Then, the control name corresponding to the interface editing file name in the guide flag configuration table can be obtained. The tag id field in the interface editing files with the same name as the interface editing file in the UI project folder can be traversed to determine whether the control name exists in the id field. If it exists, it means that the control name is correct.
[0080] If all interface editing file names recorded in the bootstrap configuration table are correct, and all control names exist in their corresponding interface editing files, then the bootstrap configuration table check is considered successful. Optionally, if the bootstrap configuration table check fails, corresponding error messages can be issued based on the reason for the failure, so that relevant personnel can handle the issue promptly and specifically.
[0081] Furthermore, to improve the efficiency of querying the guide tag configuration table, in an optional embodiment of this application, before using the guide tag configuration table, it is necessary to parse the guide tag configuration table to obtain the tree structure corresponding to the node bound to the guide tag; then, based on the tree structure, generate an association relationship with the name of the interface editing file as the key and the combination of the names of each node and the corresponding control in the tree structure as the value; so that when the target interface is opened, the target node and target control bound to the guide tag in the target interface can be quickly obtained from the above association relationship based on the target interface editing file name corresponding to the target interface, and then the guide tag can be displayed in the corresponding position of the target control to realize the binding of the guide tag.
[0082] Considering that when a scrolling list is displayed in the interface, it can contain multiple list items, but only a certain number of list items can be displayed on the interface at the same time. Generally, the number of list items displayed on the interface is much smaller than the total number of list items contained in the scrolling list. When some list items in the scrolling list correspond to new functions, it is necessary to display guide markers at the corresponding positions of those list items.
[0083] To reduce the number of configuration items in the guide marker configuration table, in an optional embodiment of this application, when the node bound to the guide marker in the guide marker configuration table is a list node displayed in the interface as a scrolling list, the guide marker configuration table also records preset conditions associated with the list node, so that it can be determined later whether the list item displayed in the target interface needs to have a guide marker added based on the preset conditions. Here, the list node corresponds to the control of the list item displayed in the interface, such as... Figure 4 As shown, Figure 4The scrolling list contains 10 list items, but only 3 list items are displayed on the interface. In this embodiment, there are 3 list nodes and 3 controls in the scrolling list, and they correspond one-to-one. The list items corresponding to the controls in the scrolling list will change as the scrolling list scrolls. Alternatively, it can be understood that the list items corresponding to the scrolling list nodes will change as the scrolling list scrolls.
[0084] In step 203 above, when the target node is a target list node displayed in the interface as a scrolling list, it is determined whether the target control corresponding to the target list node meets the preset conditions.
[0085] In this embodiment, when the target node is a target list node of a scrolling list, since the list items corresponding to the scrolling list node change as the scrolling list scrolls, it is necessary to further determine whether the list items corresponding to the target list node meet the preset conditions. Since there is a mapping relationship between the content of the list items and the controls, it can also be said that when the target node is a target list node of a scrolling list, it is necessary to further determine whether the target control corresponding to the target list node meets the preset conditions. The preset conditions can be set according to the actual situation. For example, the preset conditions can be the content displayed by the target control; and the preset conditions are related to the number of list items that need to display the guide marker.
[0086] Taking a scrolling list containing 10 list items, with 3 list items displayed on the interface as an example, the target nodes include target list node 1, target list node 2, and target list node 3. If there is new content corresponding to list item 4 and list item 6 in the scrolling list, that is, when the target list node corresponds to list item 4 or list item 6, a guide marker needs to be bound. Therefore, in this embodiment, the preset condition can be list item 4 or list item 6, that is, judging whether the content displayed by the target control corresponding to the target list node is list item 4 or list item 6. If so, a guide marker needs to be displayed; if the content displayed by the target control corresponding to the target list node is neither list item 4 nor list item 6, a guide marker does not need to be displayed. Figure 4 As shown, Figure 4 In the target interface, list item 4 is displayed, meaning that the target control corresponding to target list node 2 in the target interface displays list item 4. Therefore, the guide marker is displayed. However, the target controls corresponding to target list nodes 1 and 3 do not display list item 4 and list item 6, so the target controls corresponding to target list nodes 1 and 3 do not display the guide marker.
[0087] In step 204, if so, the guide mark is displayed at the corresponding position of the target control.
[0088] When the target node is a target list node of a scrolling list, and the target control corresponding to the target list node meets preset conditions, a guide marker is displayed at the corresponding position of the target control. In this embodiment, the guide marker can be a red dot, a green dot, an image, or other type of identifier, which can be set by the designer according to actual needs.
[0089] In addition, the guide marker is displayed at the corresponding position of the target control. The corresponding position can also be set by the designer according to the actual needs. For example, the corresponding position can be the upper left corner, upper right corner, lower right corner, etc. of the target control.
[0090] In an optional embodiment of this application, displaying the guide mark at the corresponding position of the target control may include:
[0091] Obtain the display style of the guide marker;
[0092] The guide marker is displayed according to the specified display style.
[0093] In this embodiment, the designer can set the display style of the guide mark according to actual needs. The display style includes the positional relationship between the guide mark and the target control, as well as the type of the guide mark. After the target control is determined, the display style of the guide mark set in advance by the designer can be obtained, and then the guide mark is displayed according to the positional relationship between the guide mark and the target control and the type of the guide mark specified in the display style.
[0094] It should be noted that different display styles of guide markers can be set for different systems or gameplay modes of the same game, making the display effect of guide markers more flexible and able to meet different needs.
[0095] Furthermore, in an optional embodiment of this application, to facilitate users in knowing the number of new features, the above-mentioned display of the guide marker at the corresponding position of the target control may further include:
[0096] Determine whether the target node has child nodes based on the tree structure;
[0097] If child nodes exist and the child nodes are not the list nodes corresponding to the scrolling list, then obtain the number of child nodes;
[0098] If there exists a child node that is a list node corresponding to the scrolling list, then a first number is determined according to the preset conditions corresponding to the list node, and a second number of child nodes in the target node that are not list nodes is obtained.
[0099] The sum of the first quantity and the second quantity is determined as the number of child nodes;
[0100] The number of child nodes is displayed in the guide marker.
[0101] In this embodiment, the tree structure is obtained by parsing the guide tag configuration table. It can be understood that all controls corresponding to tree nodes (excluding list nodes) in the tree structure need to be bound to guide tags, and controls corresponding to list nodes also need to be bound to guide tags when preset conditions are met. Therefore, the tree structure can be used to determine whether a target node has child nodes and the number of child nodes of the target node. The preset conditions associated with list nodes recorded in the guide tag configuration table can determine the number of list items in the scrolling list that have updated functionality. Therefore, if the target node has child nodes and the child nodes are not the list nodes corresponding to the scrolling list, the number of child nodes of the target node can be directly obtained through the tree structure. If the target node has child nodes that are the list nodes corresponding to the scrolling list, a first number is determined according to the preset conditions corresponding to the list nodes, and a second number of child nodes in the target node that are not list nodes is obtained. The sum of the first number and the second number is determined as the number of child nodes of the target node, and finally, the number of child nodes is displayed at the corresponding position of the target control corresponding to the target node.
[0102] Furthermore, in an optional embodiment of this application, when the target node is the target list node of a scrolling list, since the scrolling list can also change the list items displayed in the interface through scrolling operations, the above method may further include:
[0103] In response to a scrolling operation on the scrolling list, a new target control corresponding to the target list node is determined;
[0104] Determine whether the new target control meets the preset conditions;
[0105] If so, the guide marker is displayed at the corresponding position of the new target control;
[0106] If not, then unbind the guide tag from the target list node.
[0107] In this embodiment, after the scrolling list scrolls, it is necessary to re-determine whether the new target control corresponding to the target list node meets the preset conditions. If yes, the guide marker is bound to the new target control, that is, the guide marker is displayed at the corresponding position of the new target control; if not, the guide marker is unbound from the target list node, that is, the guide marker is not displayed on the new target control. The process of determining whether the new target control meets the preset conditions is similar to the process of determining whether the target control meets the preset conditions described above, and can be referred to the previous description, which will not be repeated here.
[0108] Furthermore, the above method may also include:
[0109] In response to an operation command to close or destroy the target interface, the guide tag is unbound from the target node.
[0110] In this embodiment, when the target interface is closed or destroyed, the guide marker is unbound from the target node in the target interface. That is, when the target interface is reopened, if there is no new content in the target interface compared to the last time it was opened, the guide marker will no longer be displayed.
[0111] It should be noted that when the target interface is reopened, the red dot manager will re-execute the binding of the guide marker to ensure that the newly updated content in the interface displays the guide marker. However, the binding was unbound before the target interface was closed last time, so the guide marker from the last time the target interface was opened will no longer be displayed.
[0112] To facilitate understanding of this solution by those skilled in the art, the embodiments of this application are explained and described below with reference to specific examples in practical applications.
[0113] Reference Figure 5 In practical applications, the implementation process of this application embodiment may include steps 501-505.
[0114] Step 501: Generate the boot tag configuration table.
[0115] like Figure 6 The diagram shown is a visual editing interface of an example interface editing file in this application. This interface editing file is an EXML file named MainBottmPanel, containing controls such as Main City (control name: BtnZhucheng), Training (control name: BtnChallenge), AFK (control name: BtnHungUp), and Character (control name: BtnRole). When the content in the Character control is updated, a red dot (i.e., a guide marker) needs to be displayed at the corresponding position of the Character control.
[0116] according to Figure 6 And related requirements, can generate such as Figure 3 The example shown is a guide tag configuration table. This generation process is typically done manually by the planner. The guide tag configuration table includes tree nodes and a UI tree structure. Tree nodes record the nodes that need to be bound to guide tags (e.g., the node corresponding to the role control for the `role` attribute). The UI tree structure records the EXML file name of the interface corresponding to the tree node (e.g., `MainBottmPanel`) and the control name of the control corresponding to the tree node (e.g., `BtnRole`). The EXML file name and control name can be connected by the character "." and entered into the corresponding positions in the UI tree structure.
[0117] Since the bootstrap flag configuration table generally needs to be parsed into corresponding code files during actual use, it can also include field names, number formats, qualifiers, etc., related to the bootstrap flag configuration table (e.g., ...). Figure 3 (Lines 2 to 5 in the text).
[0118] Step 502: Detect the boot tag configuration table.
[0119] To ensure the accuracy of the bootstrap configuration table, it needs to be validated before use. This validation includes checking the correctness of EXML file names in the UI tree structure and verifying the existence of control names in the `id` field of their corresponding EXML files. In other words, it checks whether the EXML files actually exist in the application's files, which can be done by matching EXML file names; and it checks whether the control names actually exist. If all EXML file names in the bootstrap configuration package have corresponding EXML files, and each EXML file contains the corresponding control name, then the validation passes. Otherwise, the validation fails.
[0120] Step 503: Parse the boot tag configuration table.
[0121] When the application starts, the data configuration where the bootstrap configuration table is located can be parsed first. The relevant code example for parsing the bootstrap configuration table is as follows:
[0122]
[0123] In this code, line 1, `uiRef` is a global variable, a dictionary, storing the data set after parsing the bootstrap configuration table. Line 4, `notify.nodes`, is actually a collection of all tree nodes in the bootstrap configuration table. Then, each node is traversed. Line 5, the `notify.getUIRef()` method, retrieves the "UI tree structure" corresponding to each tree node from the bootstrap configuration table. Lines 7-9 split the string into EXML file name (FileName) and control name (NodeName) based on the ".", then store the string in the dictionary `ref` with `FileName` as the key and the combination of tree node and `NodeName` as the value. An example of the content of `ref` (i.e., `uiRef`) is shown below:
[0124]
[0125] Step 504: Opening and closing the interface.
[0126] The following are code examples related to opening and closing the interface:
[0127]
[0128] BaseWidget is the abstract class for all interfaces, inheriting from egret.EventDispatcher, which is the event dispatcher for the Egret engine. init() and destroy() are the methods called when the interface is created and destroyed, and within these methods, the red dot manager is notified to perform the binding and unbinding operations. The getExmlName() method is provided to retrieve the unique EXML file name corresponding to the interface.
[0129] Step 505: Red dot binding and unbinding.
[0130] Red dot binding and unbinding can be achieved through the RedPointManager, and the relevant code example is as follows:
[0131]
[0132] In this process, `widget` is the UI instance, and `register` is a boolean value. A boolean value of `true` indicates that the red dot is bound, and a boolean value of `false` indicates that the red dot is unbound. `widget.getExmlName()` retrieves the EXML file name, allowing the corresponding tree node and control name to be obtained from the global variable `uiRef` (step 503). When binding and unbinding, only the node name is passed in, which is unrelated to the actual control instance at runtime (a one-to-one correspondence between control instances and control names within the same UI). It needs to be converted to the actual control instance in the UI, so `widget[node]` is used to obtain the control instance corresponding to the node name. Unbinding is the same as binding, except the method changes from `registerWidgetPoint` to `unRegisterWidgetPoint`.
[0133] Specifically, regarding the handling of red dots for items in a scrolling List, all list items in the List reuse a single UI file for display. For example, if 100 items are to be displayed, but only 10 are shown on the screen at a time, with the rest displayed via scrolling, then there's no need to create 100 UI files. Only one UI file needs to be edited, and then 10 identical list item objects are created based on the 10 items to be displayed. This means that the preset conditions for each node related to the scrolling list in the display interface are the same. Therefore, for the List, it's necessary to handle the binding and unbinding of red dots between multiple tree nodes and individual controls. For the binding and unbinding of red dots for list items in the List, constraints, i.e., preset conditions, need to be added to the UI tree structure in the guide flag configuration table. An example of a guide flag configuration table for a List is shown in Table 1 below.
[0134] Table 1
[0135] Tree node UI tree structure ab exml.btnA:X ac exml.btnA:Y
[0136] Here, X and Y represent preset conditions, connected using a different connector than the one used for the EXML file name and control name. These preset conditions can be arbitrarily specified and are determined by the programmer and designers. As shown in Table 1 above, when the data of control btnA in the interface meets condition X, it is bound to the red dot corresponding to the ab node.
[0137] By adding conditions, the list items can be expanded from a single item to multiple items, ultimately returning to the original single red dot handling of a single control. An example of the uiRef content obtained from parsing the List's corresponding guide marker configuration table is as follows:
[0138]
[0139] In practical implementation, decorators can be used to extend the functionality of the list items that need to display red dots. This eliminates the need to modify the original code; a single decorator can handle both binding and unbinding red dots within a List. The decorator pseudocode is as follows:
[0140]
[0141] Then use the decorator in the corresponding list item class:
[0142]
[0143] The "function(v){return this.data.id==v;}" is the actual judgment condition. Only when the id of the data in the list item is equal to X or Y in the configuration table, the red dot needs to be bound.
[0144] This application's embodiment starts with the planning configuration table, pre-binding red dots to controls in the UI file. The UI personnel provide the EXML file name and control name, and then the planners fill in the corresponding configuration table. The red dot manager completely parses the configuration table data and maintains the binding and unbinding methods of red dots. In addition, when importing the configuration table, a detection function is added to ensure that the EXML file name and control name in the configuration are correct.
[0145] This application embodiment can improve the efficiency of problem location and repair by using a guide tag configuration table, effectively reduce the time of testers, and provide an overall overview from the configuration table, thereby increasing test coverage and project robustness.
[0146] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0147] Reference Figure 7 This diagram illustrates a structural block diagram of an embodiment of a guide marker display device according to this application. Corresponding to the above-described guide marker display method embodiment, in this application embodiment, the device may include the following modules:
[0148] The file name acquisition module 701 is used to acquire the target interface editing file name corresponding to the target interface in response to the operation command to open the target interface; the target interface refers to the interface containing the guide marker.
[0149] The target node determination module 702 is used to determine the target node in the target interface that is bound to the guide mark based on the target interface editing file name and the guide mark configuration table; the guide mark configuration table records the association between the interface editing file name and the node bound to the guide mark; when the node bound to the guide mark is a list node displayed in the interface as a scrolling list, the guide mark configuration table also records the preset conditions associated with the list node;
[0150] The preset condition judgment module 703 is used to determine whether the target control corresponding to the target list node and displayed in the target interface meets the preset conditions when the target node is a target list node displayed in a scrolling list on the interface.
[0151] The guide mark display module 704 is used to display the guide mark at the corresponding position of the target control if the condition is met.
[0152] Optionally, the device may further include:
[0153] The file name detection module is used to detect whether the interface editing file name recorded in the boot tag configuration table is correct;
[0154] The control name detection module is used to detect, if correct, whether the control name in the guide mark configuration table exists in the corresponding interface editing file;
[0155] The detection result determination module is used to determine that the detection of the guide flag configuration table has passed if it exists.
[0156] Optionally, the device may further include:
[0157] The configuration table parsing module is used to parse the bootstrap flag configuration table to obtain the tree structure corresponding to the node bound to the bootstrap flag;
[0158] The relationship generation module is used to generate an association relationship based on the tree structure, with the name of the interface editing file as the key and the combination of the names of each node and the corresponding control in the tree structure as the value.
[0159] Optionally, the guide marker display module 704 may include:
[0160] The display style acquisition submodule is used to acquire the display style of the guide marker;
[0161] The display style-based display submodule is used to display the guide mark according to the display style.
[0162] Optionally, the guide marker display module 704 may further include:
[0163] The child node determination submodule is used to determine whether the target node has child nodes based on the tree structure.
[0164] The first quantity determination submodule is used to obtain the quantity of the child nodes if there are child nodes and the child nodes are not the list nodes corresponding to the scrolling list.
[0165] The second quantity determination submodule is used to determine the first quantity according to the preset conditions corresponding to the list node if there is a child node that is a list node corresponding to the scrolling list, and to obtain the second quantity of child nodes that are not list nodes in the target node.
[0166] The third quantity determination submodule is used to determine the number of child nodes by the sum of the first quantity and the second quantity;
[0167] The quantity display submodule is used to display the quantity of the child nodes in the guide marker.
[0168] Optionally, the device may further include:
[0169] A scrolling update module is used to determine, in response to a scrolling operation on the scrolling list, a new target control corresponding to the target list node and displayed in the target interface.
[0170] The update judgment module is used to determine whether the new target control meets the preset conditions;
[0171] The display module is configured to display the guide marker at the corresponding position of the new target control if the condition is met; the first unbinding module is configured to unbind the guide marker from the target list node if the condition is not met.
[0172] Optionally, the device may further include:
[0173] The second unbinding module is used to unbind the guide mark from the target node in response to the operation command to close or destroy the target interface.
[0174] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0175] This application also discloses an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the method for displaying the guide marker as described above.
[0176] This application also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for displaying the guide marker as described above.
[0177] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0178] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0179] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0180] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0181] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0182] All information acquisition actions described in this application embodiment are carried out in compliance with the relevant data protection laws and policies of the country where the location is located, and with authorization from the owner of the corresponding device.
[0183] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0184] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0185] The foregoing has provided a detailed description of a method and apparatus for displaying a guide mark, an electronic device, and a storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for displaying a guide marker, characterized in that, The method includes: In response to the operation command to open the target interface, the target interface editing file name corresponding to the target interface is obtained; the target interface refers to the interface containing the guide marker; Based on the target interface editing file name and the guide mark configuration table, the target node in the target interface that is bound to the guide mark is determined; the guide mark configuration table records the association between the interface editing file name and the node bound to the guide mark; when the node bound to the guide mark is a list node displayed in the interface as a scrolling list, the guide mark configuration table also records the preset conditions associated with the list node, the preset conditions being the content displayed by the target control, and the preset conditions being related to the number of list items that need to display the guide mark; When the target node is a target list node displayed in the interface of the scrolling list, it is determined whether the target control corresponding to the target list node meets the preset conditions; wherein, the preset conditions are the same for each node related to the scrolling list in the interface displaying the scrolling list; If so, the guide marker is displayed at the corresponding position of the target control; The method further includes: In response to a scrolling operation on the scrolling list, a new target control corresponding to the target list node is determined; Determine whether the new target control meets the preset conditions; If so, the guide marker is displayed at the corresponding position of the new target control; If not, then unbind the guide tag from the target list node.
2. The method according to claim 1, characterized in that, The guide tag configuration table also records the association between the interface editing file name and the control name. Before determining the target node in the target interface that is bound to the guide tag based on the target interface editing file name and the guide tag configuration table, the method further includes: Check whether the interface editing file name recorded in the boot tag configuration table is correct; If correct, check if the control name in the guide mark configuration table exists in the corresponding interface editing file; If it exists, then the boot tag configuration table detection is considered successful.
3. The method according to claim 2, characterized in that, Before determining the target node bound to the boot tag in the target interface by editing the file name and boot tag configuration table according to the target interface, the method further includes: Parse the bootstrap flag configuration table to obtain the tree structure corresponding to the node with the bound bootstrap flag; Based on the tree structure, an association relationship is generated with the name of the interface editing file as the key and the combination of the names of each node and the corresponding control in the tree structure as the value.
4. The method according to claim 1, characterized in that, Displaying the guide marker at the corresponding location of the target control includes: Obtain the display style of the guide marker; The guide marker is displayed according to the specified display style.
5. The method according to claim 3, characterized in that, Displaying the guide marker at the corresponding location of the target control further includes: Determine whether the target node has child nodes based on the tree structure; If child nodes exist and the child nodes are not the list nodes corresponding to the scrolling list, then obtain the number of child nodes; If there exists a child node that is a list node corresponding to the scrolling list, then a first number is determined according to the preset conditions corresponding to the list node, and a second number of child nodes in the target node that are not list nodes is obtained. The sum of the first quantity and the second quantity is determined as the number of child nodes; The number of child nodes is displayed in the guide marker.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: In response to an operation command to close or destroy the target interface, the guide tag is unbound from the target node.
7. A display device for guide markers, characterized in that, The device includes: The file name acquisition module is used to acquire the target interface editing file name corresponding to the target interface in response to the operation command to open the target interface; the target interface refers to the interface containing the guide marker; The target node determination module is used to determine the target node in the target interface that is bound to the guide mark based on the target interface editing file name and the guide mark configuration table. The guide mark configuration table records the association between the interface editing file name and the node bound to the guide mark. When the node bound to the guide mark is a list node displayed in the interface as a scrolling list, the guide mark configuration table also records the preset conditions associated with the list node. The preset conditions are the content displayed by the target control and are related to the number of list items that need to display the guide mark. The preset condition judgment module is used to determine whether the target control corresponding to the target list node meets the preset conditions when the target node is a target list node displayed in the interface of the scrolling list; wherein, the preset conditions are the same for each node related to the scrolling list in the interface of the scrolling list; A guide marker display module is used to display the guide marker at the corresponding position of the target control if the condition is met. A scrolling update module is used to determine, in response to a scrolling operation on the scrolling list, a new target control corresponding to the target list node and displayed in the target interface. The update judgment module is used to determine whether the new target control meets the preset conditions; The display module is configured to display the guide marker at the corresponding position of the new target control if the condition is met; the first unbinding module is configured to unbind the guide marker from the target list node if the condition is not met.
8. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the method for displaying a boot tag as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the method for displaying a guide marker as described in any one of claims 1-6.
Citation Information
Patent Citations
A red dot representation method and system based on a tree data structure
CN109885358A
