Method, device and electronic equipment for generating display effect of interface object
Patent Information
- Application Number
- CN202211675377.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-26
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2042-12-26
AI Technical Summary
然而,该方式在对显示的引导效果不满意,进行调整的时候,需要重新修改相关代码,人力成本较高,并导致界面的引导效果生成效率较低
[0010] The aforementioned method, apparatus, and electronic device for generating interface object display effects, in response to an interface input operation, displays a target game interface; in response to an editing operation on the target game interface, determines a target object based on the interface area corresponding to the editing operation in the target game interface, and displays the target object in at least one preset display format; the target object includes a region of the interface area and/or controls displayed in the interface area; in response to a confirmation operation on a first display format among the at least one preset display formats, determines the first display format as the target display format of the target object; wherein, the target display format is used to: display the target object according to the target display format in response to a specified event being triggered. In this method, the user can view the display effect of the preset display format applied to the target object, thereby determining the desired display effect, reducing labor costs, and improving the generation efficiency of interface object display effects.
Smart Images

Figure CN116328295B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a method, apparatus, and electronic device for generating interface object display effects. Background Technology
[0002] During gameplay, in order to help players understand the function of each area in the game interface and guide them to become familiar with the operation of each game control, text content and highlighting format are usually set for interface guidance.
[0003] In related technologies, for interface areas and controls that require guidance, it is usually necessary to modify the relevant code of the guidance object to make the guidance effect appear during interface guidance. However, if the displayed guidance effect is unsatisfactory and adjustments are needed, the relevant code needs to be modified again, which is labor-intensive and results in low efficiency in generating interface guidance effects. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method, apparatus and electronic device for generating interface object display effects, so as to improve the generation efficiency of interface object display effects and reduce labor costs.
[0005] In a first aspect, embodiments of the present invention provide a method for generating the display effect of an interface object. The method includes: displaying a target game interface in response to an interface input operation; determining a target object based on the interface area corresponding to the editing operation in the target game interface in response to an editing operation on the target game interface, and displaying the target object in at least one preset display format; the target object includes a region screen of the interface area and / or controls displayed in the interface area; and determining the first display format as the target display format of the target object in response to a confirmation operation on a first display format among the at least one preset display formats; wherein the target display format is used to: display the target object according to the target display format in response to a specified event being triggered.
[0006] Secondly, embodiments of the present invention provide an apparatus for generating interface object display effects. The apparatus includes: a target game interface input module, used to display a target game interface in response to an interface input operation; a target object display module, used to determine a target object based on the interface area corresponding to the editing operation in the target game interface in response to an editing operation on the target game interface, and display the target object in at least one preset display format; the target object includes a region of the interface area and / or controls displayed in the interface area; and a target display format determination module, used to determine the first display format as the target display format of the target object in response to a confirmation operation for a first display format among at least one preset display format; wherein the target display format is used to: display the target object according to the target display format in response to a specified event being triggered.
[0007] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to realize the above-mentioned method for generating interface object display effects.
[0008] Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the above-described method for generating the interface object display effect.
[0009] The embodiments of the present invention bring the following beneficial effects:
[0010] The aforementioned method, apparatus, and electronic device for generating interface object display effects, in response to an interface input operation, displays a target game interface; in response to an editing operation on the target game interface, determines a target object based on the interface area corresponding to the editing operation in the target game interface, and displays the target object in at least one preset display format; the target object includes a region of the interface area and / or controls displayed in the interface area; in response to a confirmation operation on a first display format among the at least one preset display formats, determines the first display format as the target display format of the target object; wherein, the target display format is used to: display the target object according to the target display format in response to a specified event being triggered. In this method, the user can view the display effect of the preset display format applied to the target object, thereby determining the desired display effect, reducing labor costs, and improving the generation efficiency of interface object display effects.
[0011] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0012] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0013] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0014] Figure 1 A flowchart illustrating a method for generating interface object display effects according to an embodiment of the present invention;
[0015] Figure 2 A schematic diagram of the controls and their masks provided in an embodiment of the present invention;
[0016] Figure 3 A schematic diagram of a graphical user interface provided in an embodiment of the present invention;
[0017] Figure 4 A flowchart illustrating a highlight setting scheme provided in an embodiment of the present invention;
[0018] Figure 5 This is a schematic diagram illustrating a highlight setting process provided in an embodiment of the present invention;
[0019] Figure 6 A flowchart illustrating a highlight scheme generation process provided in an embodiment of the present invention;
[0020] Figure 7 A schematic diagram of a device for generating interface object display effects provided in an embodiment of the present invention;
[0021] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] During gameplay, on-screen tutorials typically appear when a player first enters a certain interface or triggers a certain mechanism. Their function is primarily twofold: first, to introduce gameplay mechanics or mechanisms, usually through text, sometimes highlighted to inform the player of important information; second, to provide strong guidance, compelling the player to click on a specific area to enter a particular sequence. In this case, highlighted text guides the player to click on a control, with supplementary text providing further explanation.
[0024] Therefore, text and highlighting are two common elements in onboarding. During onboarding creation, text can be configured by designers filling out a form, and then displayed in the game by reading the form. However, highlighting is not easily configured by designers. The usual practice is for designers to inform the programmers of the desired highlighting effect via screenshots or other means, and then the programmers implement it by writing code.
[0025] In terms of appearance, guided highlighting consists of a darkened area and a highlighted area. The highlighted area can be geometrically shaped or based on the outline of a control. Geometrically shaped highlighting, such as rectangular highlighting, means that the highlighted area is a rectangle. Outline-based highlighting, on the other hand, covers an area that is no longer a simple geometric shape, but rather the outline of the corresponding control. For example, for a player avatar, rectangular highlighting covers the rectangular bounding box of the avatar, while outline-based highlighting only includes the outer outline of the avatar, excluding the transparent area outside the avatar.
[0026] In practice, 2D scenes are largely created using CocosUI (the user interface editing module for the Cocos engine). Within the CocosUI framework, all controls in the scene are organized through a UI tree. The root node represents the scene, and other nodes are of various types, including layout controls (such as container controls and list controls) and display controls (such as image controls and text controls). Each control in the tree has a name attribute, which can be viewed through the UI editor.
[0027] In typical highlighting implementations, this is usually done programmatically in the code. The specific process is as follows: First, the name of the control to be highlighted is obtained. When highlighting is needed, a semi-transparent black mask is created as the masking area. Then, the target control is located to achieve control-based highlighting. The search method is: traverse the UI tree corresponding to the current scene. For each node in the tree, compare the node's name with the target control's name; if they match, the target control is considered found. After obtaining the target control, the highlighting method needs to be specified in the code, such as whether it's highlighting a rectangular area or highlighting based on an outline. For highlighting a rectangular area, the implementation method is generally to create a rectangular control above the black mask and modify the blending factor during rendering. For highlighting based on an outline, the implementation method is generally to copy the target control above the black mask and set the copied control's position to overlap with the original control, thus covering the original control.
[0028] With current technology, creating guide highlighting has the following problems:
[0029] 1. The program development process is time-consuming. Under the current workflow, when creating highlighting functionality, the name of the corresponding control needs to be obtained first. This requires opening a UI editor (such as Cocos Studio) and then opening the corresponding project file to search for it. Based on experience, this process usually takes a significant amount of time. Furthermore, when searching for the target control by name in the code, since control names are not globally unique, if other controls with the same name exist, traversing from the root node of the UI tree may not be sufficient to find the target control. In this case, the search must begin from a subtree of the UI tree to ensure the target control is found. This situation also consumes considerable development time.
[0030] 2. Each highlight can only be created by writing code; there is no convenient editing and configuration method. This results in two problems: firstly, a lack of separation between data and logic in the program design, leading to excessive hardcoding, code clutter, and bugs; secondly, since designers can only see the effect after creation, rework is likely due to dissatisfaction with the result.
[0031] 3. Traditional highlighting based on control outlines requires copying the target control and placing it on a black overlay. However, this can sometimes disrupt the original hierarchy between controls. If an item control was originally below a tag control in the top left corner, the hierarchy will be reversed after highlighting. While other methods can sometimes be used, such as modifying the control hierarchy (e.g., moving both the item and tag controls below a new control and then copying the new control), or highlighting multiple controls simultaneously (e.g., copying both the item and tag controls), these methods all require additional processing time.
[0032] Based on this, the present invention provides a method, apparatus and electronic device for generating interface object display effects, which can be applied to the server merging process of various games.
[0033] See Figure 1 First, a method for generating the display effect of an interface object provided by an embodiment of the present invention will be introduced. The method includes the following steps:
[0034] Step S102: In response to the interface input operation, the target game interface is displayed.
[0035] The above-described interface input operations can be used to locate and open the target game interface. Since the target game interface is typically generated based on software or program settings, these operations can either open the software and navigate to the target game interface, or retrieve the code corresponding to the target game interface from the software's project or program code, and then generate the target display interface based on this code.
[0036] In practical implementation, this method can be used to generate a user-interactive program and provide an interface for user input. For example, an input control can be provided to be displayed in a graphical user interface. Clicking this control and then opening the target game interface is considered an input operation. Alternatively, a shortcut key can be set; clicking this shortcut key and then opening the target game interface is considered an input operation. The specific implementation method can be set according to requirements and is not limited here.
[0037] Step S104: In response to the editing operation on the target game interface, determine the target object based on the interface area corresponding to the editing operation in the target game interface, and display the target object in at least one preset display format; the target object includes the area screen of the interface area and / or the controls displayed in the interface area.
[0038] The editing operations described above for the target game interface can typically be selection operations, where the selected area is the interface area corresponding to the editing operation. Alternatively, these operations can be cropping operations. This cropping operation does not delete the cropped portion of the target game interface; instead, it hides it. The portion of the target game interface displayed after the cropping operation is the interface area corresponding to the editing operation. This interface area can be a partial area of the target game interface or the entire target game interface.
[0039] The target game interface typically displays multiple controls. Controls located in the interface area corresponding to editing operations can be identified as target objects. Another scenario is where it's desirable to display a pre-defined target display format within the interface area; in this case, the interface area can also be considered a target object.
[0040] In practical implementation, the target object in the interface area can be determined based on the display area of the interface region and the display position of the controls displayed in the target game interface. Typically, controls whose entirety is displayed in the interface region are considered target objects, while controls partially displayed are not. Therefore, it is usually necessary to determine the display area of a control based on its display position and size, and then further determine whether the control's display area falls within the display area of the interface region. If it does, then the control can be identified as the target object in the interface region.
[0041] After identifying the target object, it needs to be displayed in a preset display format. Specifically, modifying the display format of the target object requires modifying its corresponding display parameters. Since the target object is displayed in a preset format, the modification method and the display parameters to be modified are known. Therefore, the code corresponding to the target object can be read and modified accordingly. Alternatively, instead of directly modifying the code corresponding to the target object, a copy can be generated and then modified. The specific implementation method depends on the requirements and is not limited here.
[0042] When displaying a target object in a preset display format, it is usually necessary to update the target game interface, that is, to directly display the target object with the preset display format applied on the target game interface. When there are multiple preset display formats, since the target game interface can only display one preset display format at a time, the target game interface can be updated at a set frequency, displaying a different preset display format each time. Alternatively, after a target object with a certain preset display format is displayed on the target game interface, the user can trigger an operation on the interface area to update the target game interface, so that the target game interface displays the target object in another preset display format.
[0043] Step S106: In response to a confirmation operation for a first display format among at least one preset display formats, the first display format is determined as the target display format for the target object; wherein, the target display format is used to: display the target object according to the target display format in response to a specified event being triggered.
[0044] Once the target object is displayed in the first display format, if the user confirms that the display effect is the desired effect, a confirmation operation can be performed. This confirmation operation can take many forms; for example, when the graphical user interface displays a control that can be used for confirmation, the confirmation operation can be clicking that control. The confirmation operation can also be clicking the aforementioned interface area or the target game interface, etc. It is important to note that this confirmation operation needs to be distinguished from the operation that triggers the target game interface to update the preset display format applied to the target object.
[0045] Since the target display format needs to be applied to the target object after a specified event is triggered, when determining the first display format as the target object's target display format, the target object's code needs to be modified based on the specified event and the target display format. The specified event can be the target game interface entering a boot state, or a certain area or control of the target game interface entering a disabled state, etc. The specific event can be set according to requirements and is not limited here.
[0046] The aforementioned method for generating interface object display effects, in response to an interface input operation, displays a target game interface; in response to an editing operation on the target game interface, determines a target object based on the interface area corresponding to the editing operation in the target game interface, and displays the target object in at least one preset display format; the target object includes a region of the interface area and / or controls displayed in the interface area; in response to a confirmation operation on a first display format among the at least one preset display formats, determines the first display format as the target display format of the target object; wherein, the target display format is used to: display the target object according to the target display format in response to a specified event being triggered. In this method, users can view the display effect of the preset display format applied to the target object, thereby determining the desired display effect, reducing manual costs, and improving the generation efficiency of interface object display effects.
[0047] The following embodiments provide a response to an editing operation on the interface screen of a target game interface, based on the interface area corresponding to the editing operation in the target game interface, to determine the target object and display the target object in at least one preset display format.
[0048] The above editing operation can be a selection operation. Specifically, it can respond to a selection operation on the target game interface, determine the interface area corresponding to the selection operation, and since this interface area may need to have its display effects set, it can first determine the interface area as the first target object; then, based on the control set corresponding to the target game interface and the interface area, determine the first target object in the control set.
[0049] The aforementioned control set typically includes multiple controls displayed on the target game interface. Generally, controls have a visibility attribute, which can be either visible or invisible. Since invisible controls cannot have their display effects set, controls with a visible visibility attribute in the control set can be identified as candidate controls. Based on the preset display parameters of these candidate controls, their bounding boxes are calculated. Then, based on the bounding boxes of the candidate controls and the interface area, the target object is determined from among the candidate controls.
[0050] Bounding box algorithms are used to find the optimal bounding space for a discrete set of points. The basic idea is to approximate complex geometric objects using a relatively large but simple geometric shape (called a bounding box). Common bounding box algorithms include AABB (Alternating Angled Box), bounding sphere, oriented bounding box (OBB), and fixed-direction convex hull (FDH). The bounding box can be simply understood as the display area of a control. Generally, UI controls within the bounding box area can be considered as target objects.
[0051] In some cases, a control set includes a parent control and its corresponding child controls, where the child controls can be generated by triggering the parent control. The display area of the parent control is usually larger than that of the child controls. When determining the target object, the parent-child relationship between controls needs to be considered. Specifically, for each candidate control in the control set, it can be determined whether its bounding box is located within the interface area. If the bounding box is located within the interface area, it needs to be determined whether the candidate control is a child control. If so, it is further determined whether the bounding box of the candidate control's corresponding parent control is located within the interface area. If the bounding box of the candidate control's corresponding parent control is located within the interface area, the parent control can be considered the target object, and the candidate control itself is not considered the target object. If the bounding box of the candidate control's corresponding parent control is not located within the interface area, the candidate control is considered the target object.
[0052] In practical implementation, the preset display format may include a highlight display format. If the interface area includes controls, it is not possible to simultaneously display the highlight format of the interface area and the highlight format of the controls when displaying the target object. Therefore, it is necessary to display the interface area using a preset first highlight display format, or display the controls located in the interface area using a preset second highlight display format.
[0053] The highlight display format (also known as "style") determines how the highlight behaves when displayed. Specifically, to adapt to various scenarios, you can set a control hover highlight format, a control mask highlight format, and a rectangular mask highlight format. Of these, all three formats can be applied to controls, while only the rectangular mask highlight format can be applied to the interface area.
[0054] Control hovering is a highlighting method based on the control's outline. The principle is to change the control's layer, placing it above a black mask. During rendering, the black mask is rendered first, followed by the control, thus achieving the highlighting effect. Specifically, the world coordinates of the control are first calculated, then the control is removed from the UI tree, and then added above the black mask, with its coordinates set to match the previous world coordinates.
[0055] Control masking is a highlighting method based on the control's outline. The principle is to generate a black mask image that reveals the control's outline area based on the original control's outline, such as... Figure 2 As shown. Then place this mask image on top of the original control, so that the original control can be revealed.
[0056] The implementation of control masking is as follows: First, a rendering pass is performed based on the original control (specifically, the control can be moved under the RenderNode provided by the engine), thereby generating a texture of the original control. The size of the texture is the bounding box of the control calculated earlier, as the bounding box is sufficient to cover the visible area of the control. Second, a control applying this texture is created above the black mask image, and the blending mode of this control during rendering is modified. The corresponding coefficient of the source opacity is changed to 0, and the corresponding coefficient of the target opacity is changed to InvSrcAlpha (1 minus the source opacity). Therefore, in the generated black mask, for pixels within the control outline, since the texture opacity is 1, their opacity will be 0; for pixels outside the control outline, since the texture opacity is 0, their opacity will be the opacity of the original black mask. The final step is to place the generated black mask above the original control, thereby making the outline of the original control visible.
[0057] The difference between control masking and control floating is that control masking does not move the controls, and therefore does not change the hierarchical relationship between them. When highlighting multiple controls and maintaining their hierarchical relationship is crucial, control masking is a simpler method. This is because control masking only needs to process the control with the largest coverage area, while control floating requires processing each control individually to ensure the correct hierarchical relationship.
[0058] A rectangular mask is a method for highlighting a rectangular area. Its input can be either a specified control or a rectangular area. If it's a specified control, the control's AABB (Alternating Aspect Ratio and Alternating Scale) needs to be calculated to obtain the rectangular area covered by the control. Subsequent processing is the same as when the input is a rectangular area. The specific implementation is as follows: First, create a control of the size of the area and set its opacity to 0. Then, modify the blending mode of this control during rendering, changing the coefficient corresponding to the source opacity to 0 and the coefficient corresponding to the target opacity to SrcAlpha (source opacity). Thus, in the generated black mask, the opacity within the rectangular area will be 0, and the opacity outside the rectangular area will be the original black mask's opacity. Finally, similar to control masking, this black mask is placed above the original control in the corresponding position.
[0059] Floating controls are achieved by highlighting the control's outline. The principle is to move the control to the top layer, thus changing the original hierarchy. However, sometimes placing the highlighted control directly on top yields better results, in which case the floating control style can be used.
[0060] Control masking is also based on highlighting the control outline, but the difference lies in generating a black mask image that shines through the control. This solves the problem of needing to perform multiple operations to maintain the hierarchy when highlighting multiple controls. This is because if the controls are floating, each control needs to be manipulated, while with control masking, only the control with the largest coverage area needs to be manipulated.
[0061] A rectangular mask highlights a rectangle. The input can be a specified area or a specified control, which solves the problem of not being able to generate a highlight when there is no control in the highlight area.
[0062] When there are multiple preset display formats, and these preset display formats correspond to a preset display order, the target object can be displayed first using the preset display format that is the first in the preset display order. In response to a trigger operation on the display area of the target object, based on the preset display order, the target object can be controlled to be displayed in the second preset display format following the currently displayed first preset display format. If the currently displayed preset display format is the last preset display format, the target object can be displayed in the first preset display format, thus achieving the cyclical application of preset display formats.
[0063] Typically, the aforementioned graphical user interface displays the target game interface along with a corresponding guidance window, such as... Figure 3 As shown. After identifying the target object, an indicator of the target object can be displayed in the guidance window. This indicator is used to indicate the target object's attribute information and / or its location information on the target game interface.
[0064] Since the above method involves two types of target objects—one being the interface area, typically a specified rectangular region, and the other being the target control—the indicator needs to be able to distinguish between these two highlighted targets. Furthermore, during display, the indicator needs to be parsed to obtain the data corresponding to the target object. For a rectangular region, the position and size of the region are needed; for a specified control, a reference to that control is required.
[0065] For rectangular areas, the indicator needs to show the location and size of the rectangular area, as well as adaptation information. The guidance window needs to display a first indicator corresponding to the area of the interface screen. This first indicator indicates the display position of the area on the target game interface and the adaptation information for the preset display format; the adaptation information typically indicates the location of the area in the target game interface that matches the preset display format.
[0066] The position of the rectangular area is represented by the x and y coordinates of its lower left corner, and its size is represented by its length and height. All four values are specified as being at the standard design resolution (1334*750). The adaptation information is used to adapt to irregularly shaped screen devices. On irregularly shaped screens, the positions of elements within the interface may change during the adaptation process; therefore, the position of the corresponding interface area also needs to be able to change accordingly. For example, if an element's adaptation method is to adapt to the upper left corner, the adaptation method for this interface area should also be the upper left corner. In specific implementations, there are typically nine possible adaptation methods, which can be represented by nine strings: lt: adapt to the upper left corner; l: adapt to the middle left; lb: adapt to the lower left corner; rt: adapt to the upper right corner; r: adapt to the middle right; rb: adapt to the lower right corner; t: adapt to the top center; b: adapt to the bottom center; (empty string): adapt to the center of the screen.
[0067] Each of the nine adaptation methods mentioned above requires maintaining a constant distance from the adaptation point. For example, for the lt (top left corner) adaptation method, the distance between the rectangular area and the top left corner of the screen must remain constant. Therefore, for the actual device's design resolution, a coordinate transformation is needed based on the adaptation information. Again, taking lt (top left corner) as an example, the following equations must be satisfied: x1 = x0, y0 - 750 = y1 - h. Here, x0 and y0 are the stored bottom left corner coordinates (at 1334*750 resolution), x1 and y1 are the coordinates at the current design resolution, and h is the height at the current design resolution. The coordinate transformation formulas for other adaptation methods can be derived by analogy.
[0068] The rectangular area identifier is obtained by concatenating the above items (x-coordinate, y-coordinate, length, width, and adaptation information) using commas. To distinguish it from the control identifiers described below, it is enclosed in square brackets []. For example, [100,100,300,400,lt] is a valid identifier, indicating that the bottom left corner has an x-coordinate of 100, a y-coordinate of 100, a length of 300, a width of 400, and adapts to the top left corner.
[0069] For specific controls, it's necessary to be able to locate them using an indicator; that is, a second indicator of the control needs to be displayed in the onboarding window. This second indicator includes the control's identification information, which is typically used to uniquely identify the control within the control set corresponding to the target game interface. Specifically, this can be achieved by storing the control's name plus its tag. If the control cannot be uniquely located, the name and tag of its parent control will also be stored until the specified control can be uniquely located.
[0070] The process of generating identifiers for specified controls takes the specified control as input and outputs an identifier in string format. First, it attempts to uniquely find the specified control using the combination xi of the name and tag of x0. For example, if the name is Panel1 and the tag is 1, then xi is Panel1:1 (colon-separated). If the specified control can be uniquely found, xi is returned directly. Otherwise, information about the parent node of x0 needs to be added. First, obtain the parent node of x0 as xp, and the parent node list yp of y0, and check if yp contains xp. If yp contains xp, it means there is a node with the same parent node as x0, so it is necessary to record the position of x0 among the child nodes of its parent node xp for differentiation. If it is at index 1, it is recorded as Panel1:1:1. Next, in yp, the name and tag combination of each control is calculated, and it is determined whether it is different from xpi. If different, it means that the information provided by xpi can distinguish some controls, so xpi is added to xr. And since this control has been distinguished, it can be removed from yp. Next, check if yp is empty. If it is not empty, it means there are still controls that need further differentiation, so the loop continues. Otherwise, it means the current data can be uniquely determined, so the loop stops. The final return result is the concatenation of the items in xr using "|". For example, if xr has two items Panel1:1 and Panel2:2, the returned identifier is: Panel1:1|Panel2:2.
[0071] The following embodiments provide an implementation method for determining the first display format as the target display format of a target object in response to a confirmation operation for at least one preset display format.
[0072] In practical implementation, if the target object is displayed in the first display format, the user can click on other areas of the target game interface except for the interface area. In response to the click operation on the display area of the target game interface except for the interface area, the first display format can be determined as the target display format of the target object.
[0073] When the specified event is the guide event corresponding to the target game interface, after determining the preset display format as the target display format of the target object, the guide event corresponding to the target game interface is responded to, and the target object is displayed according to the target display format to provide guidance functions for the user.
[0074] This invention also provides another method for generating interface object display effects, which in... Figure 1 This method is implemented based on the method shown. The core technical problem this method aims to solve is: how to design and implement a rapid editing and configuration scheme for guided highlighting, i.e., the above-mentioned preset display format is the highlighting format.
[0075] First, the method needs to be editable by someone who is not familiar with the specific technical implementation, thus getting rid of the current practice of highlighting only in the code by the program, and also avoiding rework caused by poor program implementation.
[0076] Secondly, this solution needs to be easy to operate and edit, allowing editors to quickly create highlights according to their ideas, and to quickly and easily configure the highlight display style, such as rectangular highlights or outline-based highlights.
[0077] Finally, two problems need to be addressed in the existing highlighting implementation. First, when the highlighted area corresponds to multiple controls, contour-based highlighting can only be achieved by copying multiple controls to avoid disrupting the hierarchy. Second, highlighting depends on the existence of the corresponding control; if the corresponding control does not exist, highlighting cannot be achieved.
[0078] To address the aforementioned issues, this method can be implemented as follows: In the guided editor, users can drag and drop the mouse to select the target area for highlighting. After selection, a series of highlight schemes will be generated immediately, with the first one displayed, before entering an editing mode. Subsequently, if the user wants to switch to the next highlight scheme, they can click on the area within the selection box to switch between and preview their appearance. Once satisfied with a particular appearance, the editor can confirm by clicking on the area outside the selection box.
[0079] The generation process for the above highlight schemes is as follows: After confirming the selection box, a rectangular highlight scheme based on the selection area is first generated. This highlight scheme is used to handle situations where no controls exist within the highlighted area. Subsequently, the program iterates through all displayed controls in the current scene, calculates their bounding boxes, and identifies all controls within the selection box. For each selected control, three highlighting methods are applied: control hover, control masking, and rectangular masking, generating three highlight schemes. Finally, all schemes are filtered and sorted, placing the most reasonable schemes at the top, allowing the editor to quickly edit and confirm.
[0080] As can be seen, the above method only requires the editor to perform operations such as selecting and clicking, without needing to understand the underlying technology and implementation, to achieve highlighting. This greatly increases ease of use. Each highlight scheme consists of an identifier and a style. The identifier can store control information or area information, and the style determines the appearance when the highlight is displayed.
[0081] In specific implementation, such as Figure 4 As shown, the above method may include the following steps:
[0082] First, the user opens the guide editor. In the game, they navigate to the interface where they want to edit the guide highlight. Then, in the editor, the user selects the guide item and clicks the edit button. This guide will then be displayed in the game, and the highlight can be edited. When editing the highlight, the user drags the mouse to select the approximate area they want to highlight.
[0083] The second step involves the program generating a list of highlight schemes in the background after receiving the highlighted area selected by the user.
[0084] The third step is to immediately display the first item in the highlighted solution list on the interface, and also display information such as the selection range and the number of solutions in the list, and then enter the highlight editing mode.
[0085] Fourthly, users can select a highlighting scheme. If a user is not satisfied with the current highlight display, they can switch to the next highlighting scheme by clicking on an area within the selection box. After switching to the last highlighting scheme, clicking again will switch back to the first scheme, allowing for a cycle of switching.
[0086] Fifth, the user confirms the current highlighting scheme. By clicking on an area outside the ore selection range, the user confirms the current highlighting scheme, saves the relevant data to the current guide item, exits the highlighting editing mode, and completes the editing process.
[0087] like Figure 5The image shows an example of highlight editing. First, select the highlighted area using the mouse. Second, release the mouse; in edit mode, a dashed box indicates the currently selected area, with "1 / 4" displayed in the lower left corner, indicating this is the first highlight scheme, and there are four highlight schemes in total. Third, fourth, and fifth, switch between highlight schemes by clicking within the selected area. Sixth, click outside the selected area to confirm the current highlight scheme; the dashed box disappears, and you exit edit mode.
[0088] The algorithm for generating the highlight effect takes the user-selected rectangular area as input parameters, represented by the coordinates of the lower left corner of the area, and the area's length and width. The output is a list of candidate highlight schemes. Each item in the list is a highlight scheme, specifically represented by a highlight identifier and a highlight style. For example... Figure 6 As shown, the process of generating the highlight effect is as follows:
[0089] First, based on the rectangular area selected by the user, a highlight scheme is generated and added to the output list. This scheme is identified by an identifier representing the area (equivalent to the "indicator" mentioned above), and its style is rectangular highlight. The purpose of generating this scheme is to provide the user with a highlighting method that can highlight within a rectangular area without relying on the presence of controls.
[0090] Next, all controls contained within this range need to be located to generate control-based highlighting.
[0091] The specific approach is to start from the root node of the current scene and traverse each control within the scene using a depth-first search. For each control in the scene, if it is currently invisible, skip this control and all its child controls (because in Cocos, when the parent node is invisible, its child nodes are definitely invisible). If the control is visible, calculate its AABB. After obtaining the bounding box, find its intersection with the bounding box of the current scene (to ensure that the bounding box is within the scene), and then calculate whether this bounding box is within the rectangular area selected by the user. If so, record it in a list.
[0092] Based on the Cocosui framework, the AABB (Aspect-Oriented Box Scale) of controls is calculated as follows: first, the bounding box of the control itself is calculated; then, the bounding boxes of all its child nodes are calculated; finally, the bounding boxes are merged. For most controls, their own bounding box is their size (obtained from the `getContentSize` interface). However, for some special controls, such as text controls and Spine controls, the bounding box obtained by `getContentSize` is not accurate. In such cases, the bounding box calculation needs to be performed using an interface provided by the game engine. Furthermore, for container controls, such as Layout controls, their bounding box size is 0 because they do not contain any displayable content. Finally, when merging bounding boxes, if the control has a clipping property, its size needs to be intersected with its own size, because with clipping, the final display area will not exceed its own size.
[0093] After iterating through all controls, examine each control in the list and remove controls whose parent controls are also in the list. This is done because if a control's bounding box is within the selected area, all of its child controls will also be within the selected area. However, the user's current action likely aims to highlight the parent control (because its bounding box covers the largest area), excluding child controls. Therefore, this filtering process leaves only the controls the user is most likely to want highlighted.
[0094] After obtaining this list of controls, generate three highlighting schemes for each control to adapt to various display scenarios. The scheme identifier is a unique identifier for this control, with highlighting styles of: control hover, control mask, and rectangular mask. Add these three schemes to the output list. Specifically, for text controls, only the rectangular mask style is added because control hover and control masking are both highlighting methods based on the control's outline, and since the text outline is too thin, the display effect is naturally poor.
[0095] Finally, all highlighting schemes are filtered and sorted. For highlighting schemes based on selection areas, if the selection area is too small (this can be determined using a hardcoded length and width), the scheme is discarded because users typically don't highlight a very small area. When sorting all schemes, they are sorted according to the bounding box size of each highlighting scheme (for selection-based schemes, the bounding box is the size of the selection area; for control-based schemes, the bounding box is the AABB calculated by the control). Sorted schemes with larger bounding boxes are ranked higher, as a larger bounding box is more likely to represent the desired result.
[0096] The highlight editing workflow proposed above can replace the guided highlight creation process implemented in the code by the program. This allows personnel without technical knowledge to independently complete highlight editing through mouse drag-and-drop and clicking operations, reducing communication costs with the program and minimizing rework. This highlight scheme generation method can automatically filter controls within the selected area through background searching, replacing the need to open the project file in the UI editor to find controls, thus improving production efficiency. Furthermore, it proposes a method for representing highlight identifiers, solving the problem of how to represent and store highlight schemes.
[0097] For the above method embodiments, see Figure 7 The embodiment of the present invention shown provides a device for generating interface object display effects, the device comprising:
[0098] The target game interface input module 702 is used to display the target game interface in response to interface input operations;
[0099] The target object display module 704 is used to respond to the editing operation on the target game interface, determine the target object based on the interface area corresponding to the editing operation in the target game interface, and display the target object in at least one preset display format; the target object includes the area screen of the interface area and / or the controls displayed in the interface area;
[0100] The target display format determination module 706 is used to respond to a confirmation operation for a first display format among at least one preset display formats and determine the first display format as the target display format of the target object; wherein, the target display format is used to: display the target object according to the target display format in response to a specified event being triggered.
[0101] The aforementioned device for generating interface object display effects displays a target game interface in response to an interface input operation; in response to an editing operation on the target game interface, it determines a target object based on the interface area corresponding to the editing operation in the target game interface, and displays the target object in at least one preset display format; the target object includes a region of the interface area and / or controls displayed in the interface area; in response to a confirmation operation on a first display format among the at least one preset display formats, it determines the first display format as the target display format for the target object; wherein, the target display format is used to: display the target object according to the target display format in response to a specified event being triggered. In this method, the user can view the display effect of the preset display format applied to the target object, thereby determining the desired display effect, reducing labor costs, and improving the generation efficiency of interface object display effects.
[0102] The aforementioned target object display module is also used to: respond to a selection operation on the target game interface, determine the interface area corresponding to the selection operation, and determine the interface area as the first target object; and determine the second target object in the control set based on the control set and interface area corresponding to the target game interface.
[0103] The aforementioned control set includes multiple controls displayed on the target game interface; the controls have a visibility attribute; the visibility attribute includes visible or invisible; the aforementioned target object display module is also used to: determine the controls in the control set whose visibility attribute is visible as candidate controls; calculate the bounding box of the candidate controls based on the preset display parameters of the candidate controls; and determine the target object from the candidate controls based on the bounding box of the candidate controls and the interface area.
[0104] The aforementioned control set includes parent controls and corresponding child controls. The aforementioned target object display module is further configured to: for each candidate control in the control set, determine whether the bounding box of the candidate control is located in the interface area; if the bounding box of the candidate control is located in the interface area, determine whether the candidate control is a child control; if so, determine whether the bounding box of the parent control corresponding to the candidate control is located in the interface area; if the bounding box of the parent control corresponding to the candidate control is located in the interface area, determine the parent control corresponding to the candidate control as the target object; if the bounding box of the parent control corresponding to the candidate control is not located in the interface area, determine the candidate control as the target object.
[0105] The aforementioned preset display format includes a highlight display format; the aforementioned target object display module is also used to: display the area of the interface region in a preset first highlight display format, or display the controls located in the interface region in a preset second highlight display format.
[0106] The aforementioned preset display formats include multiple types; the multiple preset display formats correspond to a preset display order; the aforementioned target object display module is also used to: in response to a trigger operation on the display area of the target object, control the target object to be displayed in a second preset display format following the currently displayed first preset display format based on the preset display order.
[0107] The aforementioned target display format determination module is further configured to: if the target object is displayed in a first display format, in response to a click operation on a display area in the target game interface excluding the interface area, determine the first display format as the target display format of the target object.
[0108] The graphical user interface also displays a guide window corresponding to the target game interface; the device also includes: an indicator display module, used to respond to a trigger operation on the display area of the target object, and control the target object to be displayed in a second preset display format following the currently displayed first preset display format based on a preset display order.
[0109] The aforementioned target object includes the interface area corresponding to the editing operation; the indicator display module is further used to: display a first indicator corresponding to the area screen of the interface area in the guide indicator window; the first indicator is used to indicate the display position of the area screen on the target game interface and the preset display format.
[0110] The adaptation information indicates the location of the area in the target game interface that matches the preset display format.
[0111] The aforementioned target objects include controls located in the interface area; the indicator display module is also used for:
[0112] The guide window displays a second indicator of the control; the second indicator includes the control's identification information; this identification information is used to uniquely identify the control within the control set corresponding to the target game interface.
[0113] The aforementioned device also includes: an interface guidance module, used to respond to guidance events corresponding to the target game interface and display the target object according to the target display format.
[0114] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the above-described method for generating interface object display effects. When the electronic device acts as a game management server, the above method can be executed in the following manner:
[0115] In response to an input operation on the interface, the target game interface is displayed; in response to an editing operation on the target game interface, the target object is determined based on the interface area corresponding to the editing operation on the target game interface, and the target object is displayed in at least one preset display format; the target object includes the area screen of the interface area and / or controls displayed in the interface area; in response to a confirmation operation on the first display format among the at least one preset display formats, the first display format is determined as the target display format of the target object; wherein, the target display format is used to: in response to a specified event being triggered, display the target object according to the target display format.
[0116] In the above method, users can view the display effect of the preset display format applied to the target object, thereby determining the desired display effect, reducing labor costs and improving the generation efficiency of the interface object display effect.
[0117] Optionally, the above response to the editing operation of the target game interface, based on the interface area corresponding to the editing operation in the target game interface, the step of determining the target object includes: responding to the selection operation of the target game interface, determining the interface area corresponding to the selection operation, and determining the interface area as the first target object; and determining the second target object in the control set based on the control set and interface area corresponding to the target game interface.
[0118] Optionally, the aforementioned control set includes controls displayed on the target game interface; the controls have a visibility attribute; the visibility attribute includes visible or invisible; the step of determining the target object in the control set based on the control set corresponding to the target game interface and the interface area includes: determining controls in the control set whose visibility attribute is visible as candidate controls; calculating the bounding box of the candidate controls based on the preset display parameters of the candidate controls; and determining the target object from the candidate controls based on the bounding box of the candidate controls and the interface area.
[0119] Optionally, the aforementioned control set includes parent controls and corresponding child controls; the step of determining the target object based on the bounding box of the candidate controls and the interface area includes: for each candidate control in the control set, determining whether the bounding box of the candidate control is located in the interface area; if the bounding box of the candidate control is located in the interface area, determining whether the candidate control is a child control; if so, determining whether the bounding box of the parent control corresponding to the candidate control is located in the interface area; if the bounding box of the parent control corresponding to the candidate control is located in the interface area, determining the parent control corresponding to the candidate control as the target object; if the bounding box of the parent control corresponding to the candidate control is not located in the interface area, determining the candidate control as the target object.
[0120] Optionally, the aforementioned preset display format includes a highlight display format; the step of displaying the target object in at least one preset display format includes: displaying the area screen of the interface region in a preset first highlight display format, or displaying the controls located in the interface region in a preset second highlight display format.
[0121] Optionally, the above-mentioned preset display formats include multiple preset display formats; the multiple preset display formats correspond to a preset display order; the step of displaying the target object in at least one preset display format includes: in response to a trigger operation on the display area of the target object, controlling the target object to be displayed in a second preset display format following the currently displayed first preset display format based on the preset display order.
[0122] Optionally, the above response to the confirmation operation of the first display format in at least one preset display format, the step of determining the first display format as the target display format of the target object, includes: if the target object is displayed in the first display format, in response to the click operation on the display area of the target game interface excluding the interface area, determining the first display format as the target display format of the target object.
[0123] Optionally, the graphical user interface described above also displays a guide window corresponding to the target game interface; in response to an editing operation on the target game interface, after determining the target object based on the interface area corresponding to the editing operation in the target game interface, the method further includes: displaying an indicator of the target object in the guide window; the indicator is used to indicate the attribute information of the target object and / or its position information on the target game interface.
[0124] Optionally, the target object includes the area screen of the interface area corresponding to the editing operation; the step of displaying the indicator of the target object in the guidance window includes: displaying a first indicator corresponding to the area screen of the interface area in the guidance window; the first indicator is used to indicate the display position of the area screen in the target game interface and the adaptation information of the preset display format; the adaptation information indicates: the area position in the target game interface that matches the preset display format.
[0125] Optionally, the target object includes controls located in the interface area; the step of displaying the indicator of the target object in the guidance window includes: displaying a second indicator of the control in the guidance window; the second indicator includes the identification information of the control; the identification information is used to: uniquely identify the control in the control set corresponding to the target game interface.
[0126] Optionally, the specified events mentioned above include the guide event corresponding to the target game interface; after responding to the confirmation operation for the preset display format and determining the preset display format as the target display format of the target object, the above method further includes: responding to the guide event corresponding to the target game interface and displaying the target object according to the target display format.
[0127] See Figure 8 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the above-described method for generating the interface object display effect.
[0128] Furthermore, Figure 8 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.
[0129] The memory 101 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0130] Processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 100 or by instructions in software form. Processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0131] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above-described method for generating the interface object display effect.
[0132] The present invention provides a method, apparatus, and electronic device for generating interface object display effects, including a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. When the electronic device acts as a game management server, the above methods can be executed in the following manner:
[0133] In response to an input operation on the interface, the target game interface is displayed; in response to an editing operation on the target game interface, a target object is determined based on the interface area corresponding to the editing operation on the target game interface, and the target object is displayed in at least one preset display format; the target object includes the area screen of the interface area and / or controls displayed in the interface area; in response to a confirmation operation on the first display format among the at least one preset display formats, the first display format is determined as the target display format of the target object; wherein, the target display format is used to: in response to a specified event being triggered, display the target object according to the target display format.
[0134] In the above method, users can view the display effect of the preset display format applied to the target object, thereby determining the desired display effect, reducing labor costs and improving the generation efficiency of the interface object display effect.
[0135] Optionally, the above response to the editing operation of the target game interface, based on the interface area corresponding to the editing operation in the target game interface, the step of determining the target object includes: responding to the selection operation of the target game interface, determining the interface area corresponding to the selection operation, and determining the interface area as the first target object; and determining the second target object in the control set based on the control set and interface area corresponding to the target game interface.
[0136] Optionally, the aforementioned control set includes controls displayed on the target game interface; the controls have a visibility attribute; the visibility attribute includes visible or invisible; the step of determining the target object in the control set based on the control set corresponding to the target game interface and the interface area includes: determining controls in the control set whose visibility attribute is visible as candidate controls; calculating the bounding box of the candidate controls based on the preset display parameters of the candidate controls; and determining the target object from the candidate controls based on the bounding box of the candidate controls and the interface area.
[0137] Optionally, the aforementioned control set includes parent controls and corresponding child controls; the step of determining the target object based on the bounding box of the candidate controls and the interface area includes: for each candidate control in the control set, determining whether the bounding box of the candidate control is located in the interface area; if the bounding box of the candidate control is located in the interface area, determining whether the candidate control is a child control; if so, determining whether the bounding box of the parent control corresponding to the candidate control is located in the interface area; if the bounding box of the parent control corresponding to the candidate control is located in the interface area, determining the parent control corresponding to the candidate control as the target object; if the bounding box of the parent control corresponding to the candidate control is not located in the interface area, determining the candidate control as the target object.
[0138] Optionally, the aforementioned preset display format includes a highlight display format; the step of displaying the target object in at least one preset display format includes: displaying the area screen of the interface region in a preset first highlight display format, or displaying the controls located in the interface region in a preset second highlight display format.
[0139] Optionally, the above-mentioned preset display formats include multiple preset display formats; the multiple preset display formats correspond to a preset display order; the step of displaying the target object in at least one preset display format includes: in response to a trigger operation on the display area of the target object, controlling the target object to be displayed in a second preset display format following the currently displayed first preset display format based on the preset display order.
[0140] Optionally, the above response to the confirmation operation of the first display format in at least one preset display format, the step of determining the first display format as the target display format of the target object, includes: if the target object is displayed in the first display format, in response to the click operation on the display area of the target game interface excluding the interface area, determining the first display format as the target display format of the target object.
[0141] Optionally, the graphical user interface described above also displays a guide window corresponding to the target game interface; in response to an editing operation on the target game interface, after determining the target object based on the interface area corresponding to the editing operation in the target game interface, the method further includes: displaying an indicator of the target object in the guide window; the indicator is used to indicate the attribute information of the target object and / or its position information on the target game interface.
[0142] Optionally, the target object includes the area screen of the interface area corresponding to the editing operation; the step of displaying the indicator of the target object in the guidance window includes: displaying a first indicator corresponding to the area screen of the interface area in the guidance window; the first indicator is used to indicate the display position of the area screen in the target game interface and the adaptation information of the preset display format; the adaptation information indicates: the area position in the target game interface that matches the preset display format.
[0143] Optionally, the target object includes controls located in the interface area; the step of displaying the indicator of the target object in the guidance window includes: displaying a second indicator of the control in the guidance window; the second indicator includes the identification information of the control; the identification information is used to: uniquely identify the control in the control set corresponding to the target game interface.
[0144] Optionally, the specified events mentioned above include the guide event corresponding to the target game interface; after responding to the confirmation operation for the preset display format and determining the preset display format as the target display format of the target object, the above method further includes: responding to the guide event corresponding to the target game interface and displaying the target object according to the target display format.
[0145] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0146] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0147] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0148] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0149] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for generating the display effect of an interface object, characterized in that, The method includes: The target game interface is displayed in response to user input. In response to opening the guide editor, for the editing operation of the target game interface, based on the interface area corresponding to the editing operation in the target game interface, a target object is determined and displayed in at least one preset display format; the target object includes the area screen of the interface area and / or controls displayed in the interface area; In response to a confirmation operation for a first display format among the at least one preset display formats, the first display format is determined as the target display format for the target object; wherein, the target display format is used to: display the target object according to the target display format in response to a specified event being triggered; the specified event includes a guide event corresponding to the target game interface; The code of the target object is modified based on the specified event and the target display format; The step of determining the target object based on the interface area corresponding to the editing operation in the target game interface in response to an editing operation includes: In response to a selection operation on the target game interface, the interface area corresponding to the selection operation is determined, and the interface area is identified as the first target object. Based on the set of controls corresponding to the target game interface and the interface area, a second target object in the set of controls is determined.
2. The method according to claim 1, characterized in that, The control set includes controls displayed on the target game interface; the controls have a visibility attribute; the visibility attribute includes visible or invisible; The step of determining the target object in the control set based on the control set corresponding to the target game interface and the interface area includes: Among the control set, controls with the visibility attribute set to visible are identified as candidate controls; Calculate the bounding box of the candidate control based on the preset display parameters of the candidate control; The target object is determined from the candidate controls based on the bounding box of the candidate controls and the interface area.
3. The method of claim 2, wherein, The control set includes a parent control and its corresponding child controls; The step of determining the target object based on the bounding box of the candidate controls and the interface area includes: For each candidate control in the control set, determine whether the bounding box of the candidate control is located in the interface area; If the bounding box of the candidate control is located in the interface area, determine whether the candidate control is a child control; If so, determine whether the bounding box of the parent control corresponding to the candidate control is located in the interface area; If the bounding box of the parent control corresponding to the candidate control is located in the interface area, the parent control corresponding to the candidate control is determined as the target object; If the bounding box of the parent control corresponding to the candidate control is not located in the interface area, the candidate control is determined as the target object.
4. The method according to claim 1, characterized in that, The preset display format includes a highlight display format; The step of displaying the target object in at least one preset display format includes: The interface area is displayed in a preset first highlight format, or the controls located in the interface area are displayed in a preset second highlight format.
5. The method of claim 1, wherein, The preset display formats include multiple formats; the multiple preset display formats correspond to a preset display order; The step of displaying the target object in at least one preset display format includes: In response to a trigger operation targeting the display area of the target object, the target object is controlled to be displayed in a second preset display format following the currently displayed first preset display format, based on a preset display order.
6. The method according to claim 1, characterized in that, The step of determining the first display format as the target display format of the target object in response to a confirmation operation for a first display format among the at least one preset display formats includes: If the target object is displayed in a first display format, in response to a click operation on a display area in the target game interface other than the interface area, the first display format is determined as the target display format of the target object.
7. The method according to claim 1, characterized in that, The graphical user interface also displays a guide window corresponding to the target game interface; In response to an editing operation on the target game interface, after determining the target object based on the interface area corresponding to the editing operation in the target game interface, the method further includes: The guidance window displays an indicator of the target object; the indicator is used to indicate the attribute information of the target object and / or its location information on the target game interface.
8. The method according to claim 7, characterized in that, The target object includes the area of the interface corresponding to the editing operation. The step of displaying the indicator of the target object in the guidance window includes: The first indicator corresponding to the area screen of the interface region is displayed in the guidance indicator window; The first indicator is used to indicate the display position of the area screen on the target game interface and the adaptation information of the preset display format.
9. The method of claim 7, wherein, The target object includes controls located in the interface area; The step of displaying the indicator of the target object in the guidance window includes: The guide window displays a second indicator of the control; the second indicator includes the identification information of the control; the identification information is used to uniquely identify the control in the control set corresponding to the target game interface.
10. The method of claim 1, wherein, In response to a confirmation operation for the preset display format, after determining the preset display format as the target display format for the target object, the method further includes: In response to the guidance event corresponding to the target game interface, the target object is displayed according to the target display format.
11. A device for generating interface object display effects, characterized in that, The device includes: The target game interface input module is used to display the target game interface in response to interface input operations; The target object display module is used to respond to the opening of the guide editor and, for the editing operation of the target game interface, determine the target object based on the interface area corresponding to the editing operation in the target game interface, and display the target object in at least one preset display format; the target object includes the area screen of the interface area and / or controls displayed in the interface area; the preset display format includes: a specified display level of the target object, or a display mask of a specified shape; A target display format determination module is used to respond to a confirmation operation for a first display format among the at least one preset display formats, and determine the first display format as the target display format of the target object; wherein, the target display format is used to: display the target object according to the target display format in response to a specified event being triggered; the specified event includes a guide event corresponding to the target game interface; The device further includes: code that modifies the target object based on the specified event and the target display format; The target object display module is also used for: In response to a selection operation on the target game interface, the interface area corresponding to the selection operation is determined, and the interface area is identified as the first target object. Based on the set of controls corresponding to the target game interface and the interface area, a second target object in the set of controls is determined.
12. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the method for generating interface object display effects according to any one of claims 1-10.
13. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method for generating the interface object display effect as described in any one of claims 1-10.
Citation Information
Patent Citations
Icon processing method, intelligent terminal and storage medium
CN113885752A