Control processing method and device
Through automated control processing methods, the intelligent layout of game interface controls is realized based on the control size information input by the user, which solves the problems of cumbersome and inefficient control processing in traditional technology, and improves the efficiency of game updates.
Patent Information
- Application Number
- CN202111179699.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-11
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-10-11
AI Technical Summary
In the game interface, non-single-size controls are cumbersome and inefficient, resulting in the need for manual arrangement of the artist every time the control layout is added or adjusted, wasting human resources and affecting the efficiency of game updates.
Provide a control processing method, by receiving the control size information input by the user, automatically determine the size information of each row in the control display list, and add the control to the appropriate row or the next row according to the size information of the target control and row, to achieve automatic Layout, reduce manual intervention.
The control layout process is simplified, human resources waste is reduced, game update efficiency is improved, and cumbersome steps for artists to manually operate the art software.
Smart Images

Figure CN113908545B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and more particularly to a control processing method and device. Background Art
[0002] In the game interface, various controls are often displayed in a list to provide players with relevant game information.
[0003] Among them, some game interface layouts use controls of different sizes, that is, the sizes of different controls will be different, which can not only use the size to identify the importance of each control, but also make the game interface more rich and beautiful. Because the sizes of different controls are different, artists usually need to use specific art software to arrange the various controls in the control display list, and then the program developers can add them to the game.
[0004] As game functions continue to increase and improve, it is inevitable to add or adjust controls in the game interface. In traditional technologies, every time a new control is added or the control layout needs to be adjusted, artists need to use art software to rearrange the controls in the control display list. This operation is cumbersome, which not only wastes human resources, but also affects the efficiency of game updates. Summary of the invention
[0005] The embodiments of the present application provide a control processing method and device, which can solve the technical problem that the processing method of controls of non-single size in the prior art is relatively cumbersome and inefficient.
[0006] In a first aspect, an embodiment of the present application provides a control processing method, the method comprising:
[0007] Determine the size information of each control to be processed according to the received user input operation;
[0008] Determine the size information of each row in the control display list, the control display list includes a plurality of rows, controls are added to each row in sequence, and when the current row is full, jump to the next row to add controls;
[0009] Traverse the various controls, and add the target control to the target row or the next row of the target row according to the size information of the currently traversed target control and the size information of the target row in the control display list; wherein the target row is the first row in the control display list that is not in a full row state.
[0010] In a feasible implementation manner, determining that the control displays size information of each row in the list includes:
[0011] Determine the maximum horizontal length of each row of the control display list.
[0012] In a feasible implementation manner, adding the target control to the target row or the next row of the target row according to the size information of the currently traversed target control and the size information of the target row in the control display list includes:
[0013] Determine whether the sum of the horizontal lengths of the existing controls in the target row and the target control is greater than the maximum horizontal length of the target row;
[0014] If the sum of the lengths of the existing controls in the target row and the target control in the horizontal direction is greater than the maximum length of the target row in the horizontal direction, adjust the lengths of the existing controls in the target row and / or the target control in the horizontal direction according to a preset adjustment rule, and add the target control to the target row or the next row of the target row according to the sum of the lengths of the existing controls in the target row and the target control in the horizontal direction after the adjustment;
[0015] If the sum of the horizontal lengths of the existing controls in the target row and the target control is less than or equal to the maximum horizontal length of the target row, the target control is added to the target row.
[0016] In a feasible implementation manner, adding the target control to the target row or the next row of the target row according to the adjusted sum of the horizontal lengths of the existing controls in the target row and the target control includes:
[0017] When the sum of the adjusted lengths of the existing controls in the target row and the adjusted target control in the horizontal direction is less than or equal to the maximum length of the target row in the horizontal direction, adding the adjusted target control to the target row;
[0018] When the sum of the adjusted lengths of the existing controls in the target row and the adjusted target control in the horizontal direction is greater than the maximum length of the target row in the horizontal direction, the target control is added to the next row of the target row.
[0019] In a feasible implementation manner, after adding the target control to the next row of the target row, the step further includes:
[0020] Adjusting the horizontal lengths of the existing controls in the target row so that the sum of the horizontal lengths of the existing controls in the target row is equal to the maximum horizontal length of the target row;
[0021] The target row is marked as being in a full row state.
[0022] In a feasible implementation manner, after adding the target control to the target row, the method further includes:
[0023] If the sum of the horizontal lengths of the existing controls in the target row and the target control is equal to the maximum horizontal length of the target row, the target row is marked as a full row state.
[0024] In a feasible implementation, it also includes:
[0025] After traversing the various controls, determining the background resources corresponding to the various controls according to the positions of the various controls in the control display list and the background resources preset at the various positions in the control display list;
[0026] The control display list is displayed in a display interface according to the position of each control in the control display list and the background resources corresponding to each control.
[0027] In a second aspect, an embodiment of the present application provides a control processing device, the device comprising:
[0028] A receiving module, used for receiving a user input operation and determining the size information of each control to be processed according to the received user input operation;
[0029] A determination module, used to determine the size information of each row in a control display list, wherein the control display list includes a plurality of rows, controls are added to each row in sequence, and when the current row is full, the next row is jumped to add controls;
[0030] A processing module is used to traverse the various controls and add the target control to the target row or the next row of the target row according to the size information of the currently traversed target control and the size information of the target row in the control display list; wherein the target row is the first row in the control display list that is not in a full row state.
[0031] In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor and a memory;
[0032] The memory stores computer-executable instructions;
[0033] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the control processing method provided in the first aspect.
[0034] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the control processing method provided in the first aspect is implemented.
[0035] The control processing method and device provided in the embodiment of the present application, when it is necessary to layout various controls in the game display interface, the user only needs to input the size information of each control, and the game client can automatically layout each control according to the size of each control and the size information of each row in the control display list, without the need for artists to use art software for layout, thereby simplifying the control layout process, reducing the waste of human resources, and improving the efficiency of game updates. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments of the present application or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0037] Figure 1 A schematic diagram of a control display list provided in an embodiment of the present application;
[0038] Figure 2 A flowchart of a control processing method provided in an embodiment of the present application;
[0039] Figure 3 A flowchart of another control processing method provided in an embodiment of the present application;
[0040] Figure 4 A schematic diagram of a program module of a control processing device provided in an embodiment of the present application;
[0041] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. In addition, although the disclosure in the present application is introduced according to one or more exemplary examples, it should be understood that each aspect of these disclosures can also constitute a complete implementation method separately.
[0043] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0044] The terms "first", "second", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, for example, they can be implemented in an order other than those given in the diagrams or descriptions of the embodiments of this application.
[0045] In addition, the terms "include" and "have" and any variations thereof are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to those components expressly listed but may include other components not expressly listed or inherent to such products or devices.
[0046] The term "module" as used in this application refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0047] At present, some game interface layouts use controls of non-single size, that is, the sizes of different controls may vary. This not only can use the size to identify the importance of each control, but also can make the game interface richer and more beautiful.
[0048] For a better understanding of this application, please refer to Figure 1 , Figure 1 A schematic diagram of a control display list provided in an embodiment of the present application. Figure 1The control display list shown includes multiple controls such as "Skills", "Workshop", "Trading Line", "Store", ..., "Settings", etc. Among them, the horizontal lengths of different controls may be different. For example, the horizontal length of the "Skills" control is greater than the horizontal length of the "Workshop" control.
[0049] Since the sizes of different controls vary, artists usually need to use specific art software to arrange and layout the controls in the control display list before the program developers add them to the game. As the game functions continue to increase and improve, it is inevitable to add or adjust the controls in the game interface.
[0050] In traditional technology, every time a new control is added or the control layout needs to be adjusted, artists are required to use art software to rearrange the layout of each control in the list, which is a cumbersome operation. At the same time, after the splicing is completed, the artist cannot directly verify it in the game, and the program developer is required to add it to the game again. The communication process is cumbersome and prone to errors, which not only wastes human resources, but also affects the efficiency of game updates.
[0051] In order to solve the above technical problems, a control processing method is provided in the embodiment of the present application. The game client can automatically arrange and layout each control according to the size information of each control input by the developer, without the need for artists to use specific art software for layout, thereby simplifying the control layout process, reducing the waste of human resources, and improving the efficiency of game updates. The following is a detailed description using a detailed embodiment.
[0052] The control processing method provided in the embodiment of the present application can be run on a local terminal device or a cloud interaction system.
[0053] Among them, the cloud interaction system includes cloud servers and user devices, which are used to run cloud applications.
[0054] In an optional implementation, cloud gaming refers to a gaming method based on cloud computing. In the operation mode of cloud gaming, the operating entity of the game program and the entity presenting the game screen are separated, the storage and operation of the object control method are completed on the cloud gaming server, and the cloud gaming client is used for receiving and sending data and presenting the game screen. For example, the cloud gaming client can be a display device with data transmission function close to the user side, such as a mobile terminal, a television, a computer, a handheld computer, etc.; but the cloud gaming server in the cloud processes the game data. When playing the game, the player operates the cloud gaming client to send operation instructions to the cloud gaming server. The cloud gaming server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the cloud gaming client through the network. Finally, the cloud gaming client decodes and outputs the game screen.
[0055] In an optional embodiment, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed and run by an electronic device in a conventional manner. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.
[0056] Reference Figure 2 , Figure 2 This is a flow chart of a control processing method provided in an embodiment of the present application. In a feasible implementation of the present application, the method includes:
[0057] S201. Determine size information of each control to be processed according to a received user input operation.
[0058] In a feasible implementation, when multiple controls need to be added to the control display list, or controls in the control display list need to be updated, the developer or artist can input the size information of each control in sequence in the game client.
[0059] For example, suppose there are n controls (x1, x2, ..., x n ) needs to be laid out, you can first set the horizontal lengths of these n controls to L1, L2, ..., L n , and then enter the game client in order.
[0060] Optionally, after determining the size information of each control, the developer or artist can also add the size information of each control to a preset table in a form-filling manner, and then import the table into the game client. After receiving the table imported by the user, the game client can read the size information of each control from the table.
[0061] S202: Determine the size information of each row in the control display list.
[0062] The above control display list includes several rows, each of which is used to add controls in sequence.
[0063] In some implementations, when laying out each control, a new control display list is first created, or an existing control display list is initialized, and then, starting from the first row of the control display list, each of the above controls is added one by one.
[0064] During the adding process, if the current row is full, it will jump to the next row to add controls.
[0065] When the controls added to any row of the control display list have filled up the row, it can be determined that the row is in a full row state.
[0066] In an embodiment of the present application, the size information of each row in the control display list can be preset.
[0067] Optionally, the size information of each row in the display list may include the maximum length of each row in the horizontal direction. Alternatively, the size information of each row in the display list may also include the maximum length of all controls that can be added to each row in the horizontal direction.
[0068] S203: traverse the above-mentioned controls, and add the target control to the target row or the next row of the target row according to the size information of the currently traversed target control and the size information of the target row in the control display list.
[0069] The target behavior control displays the first row in the list that is not full.
[0070] In a feasible implementation, the above-mentioned controls can be traversed in the order in which they are arranged, and based on the size information of the currently traversed target control and the size information of the target row in the control display list, it can be determined whether the currently traversed target control should be added to the current target row or the next row of the target row.
[0071] Exemplarily, if the length of the currently traversed target control is less than or equal to the length of the remaining part in the above-mentioned target row, it can be determined that the currently traversed target control should be added to the current target row; if the length of the currently traversed target control is greater than the length of the remaining part in the target row in the control display list, it can be determined that the currently traversed target control should be added to the next row of the above-mentioned target row.
[0072] The control processing method and device provided in the embodiment of the present application, when it is necessary to layout various controls in the game display interface, the user only needs to input the size information of each control, and the game client can automatically layout each control according to the size of each control and the size information of each row in the control display list, without the need for artists to use art software for layout, thereby simplifying the control layout process, reducing the waste of human resources, and improving the efficiency of game updates.
[0073] Based on the contents described in the above embodiments, Figure 3 , Figure 3 This is a flow chart of another control processing method provided in an embodiment of the present application. In a feasible implementation of the present application, the above method includes:
[0074] S301. Determine size information of each control to be processed according to a received user input operation, and record each control in a set X.
[0075] S302: Determine the size information of each row in the control display list.
[0076] In some embodiments, the size information of each row in the display list may be the maximum length Ws of each row in the horizontal direction, or the maximum length Ws of all controls that can be added to each row in the horizontal direction.
[0077] S303, determine whether there are unread controls in the set X. If yes, continue to execute S304; if no, execute S3014.
[0078] In some embodiments, when laying out each control, it is determined whether there are unread controls in the set X. If so, it means that the control layout task is not completed; if not, it means that the control layout task is completed.
[0079] S304, read the control x from the above set X in order i .
[0080] S305: Determine the existing controls and control x in the target row i Whether the sum of the lengths in the horizontal direction is less than the maximum length Ws of the target row in the horizontal direction. If so, execute S306; if not, execute S307.
[0081] The target row may be the first row in the control display list that is not in a full row state.
[0082] S306: Add the target control to the target row, and return to execute S303.
[0083] It is understandable that when the existing control in the target row is the same as the above control x i When the sum of the lengths in the horizontal direction is less than the maximum length Ws of the target row in the horizontal direction, it means that the free space in the target row is larger than the length of the target control, and therefore the target control can be added to the target row.
[0084] For example, assuming that the maximum length Ws of the target row in the horizontal direction is 10 units, and the horizontal length of the existing controls in the target row is 6 units, then when the horizontal length of the target control is 3 units, the target control can be added to the target row.
[0085] After the target control is added to the target row, the next control is read from the set X.
[0086] S307, determine the existing controls and control x in the target row i Whether the sum of the lengths in the horizontal direction is equal to the maximum length Ws of the target row in the horizontal direction. If so, execute S308; if not, execute S309.
[0087] S308: Add the target control to the target row, and mark the target row as full. Return to S303.
[0088] It is understandable that when the existing control in the target row is the same as control x i When the sum of the lengths in the horizontal direction is equal to the maximum length Ws of the target row in the horizontal direction, it means that the free space in the target row can be used to add the target control. Therefore, in this case, the target control can also be added to the target row.
[0089] For example, assuming that the maximum length Ws of the target row in the horizontal direction is 10 units, the horizontal length of the existing controls in the target row is 6 units, and the horizontal length of the target control is 4 units, the target control can also be added to the target row.
[0090] After the target control is added to the target row, the target row is marked as a full row state. At this time, the next row of the target row is the new target row.
[0091] S309: Adjust the horizontal length of the existing controls in the target row and / or the target control according to a preset adjustment rule.
[0092] It is understandable that when the existing control in the target row is the same as control x i When the sum of the lengths in the horizontal direction is greater than the maximum length Ws of the target row in the horizontal direction, it means that the free space in the target row cannot be used to add the target control.
[0093] For example, if the maximum length Ws of the target row in the horizontal direction is 10 units, the horizontal length of the existing controls in the target row is 8 units, and the horizontal length of the target control is 4 units, the target control cannot be added to the target row. In this case, the free space in the target row can be used to add the target control by reducing the existing controls in the target row and / or the horizontal length of the target control.
[0094] In a feasible implementation, the lengths of the existing controls in the target row may be gradually reduced, or the length of the control with the largest length in the target row may be gradually reduced.
[0095] In another feasible implementation, the length of the target control in the horizontal direction may also be gradually reduced.
[0096] In another feasible implementation, the lengths of the existing controls in the target row and the horizontal length of the target control may be reduced at the same time.
[0097] S3010: Determine whether the sum of the horizontal lengths of the existing controls in the adjusted target row and the adjusted target control is greater than the maximum horizontal length of the target row. If not, execute S3011; if yes, execute S3012 and S3013.
[0098] S3011. Add the target control to the target row, and return to execute S303.
[0099] In the embodiment of the present application, if the sum of the horizontal lengths of the existing controls in the adjusted target row and the adjusted target control is less than the maximum horizontal length of the target row, the target control is added to the target row and the process returns to execute S303.
[0100] If the sum of the horizontal lengths of the existing controls in the adjusted target row and the adjusted target control is equal to the maximum horizontal length of the target row, the target control is added to the target row, and the target row is marked as full, and then execution returns to S303.
[0101] S3012. Add the target control to the next row of the target row.
[0102] S3013. Adjust the horizontal lengths of the existing controls in the target row so that the sum of the horizontal lengths of the existing controls in the target row is equal to the maximum horizontal length of the target row; and mark the target row as a full row.
[0103] In an embodiment of the present application, if the target row still cannot add a target control after adjustment, then while adding the target control to the next row of the target row, the horizontal lengths of the existing controls in the target row are adjusted so that the sum of the horizontal lengths of the existing controls in the target row is equal to the maximum horizontal length of the target row, thereby making the control display list appear neat and beautiful.
[0104] S3014. Display a control display list in the display interface.
[0105] In an embodiment of the present application, after reading each control, the background resource corresponding to each control is determined based on the position of each control in the control display list and the background resources preset at each position in the control display list; then, based on the position of each control in the control display list and the background resources corresponding to each control, the control display list is displayed in the display interface, so that after the layout is completed, it can be directly verified in the game to avoid repeated modifications.
[0106] According to the control processing method provided in the embodiment of the present application, when it is necessary to layout various controls in the game display interface, the user only needs to input the size of each control, and the game client can automatically layout each control according to the size of each control and the preset size of each row in the control display list. There is no need for artists to use art software for layout, thereby simplifying the control layout process, reducing waste of human resources, and improving game update efficiency.
[0107] Based on the contents described in the above embodiments, a control processing device is also provided in the embodiments of the present application. Figure 4 , Figure 4 This is a program module diagram of a control processing device provided in an embodiment of the present application, the control processing device comprising:
[0108] The receiving module 401 is used to receive a user input operation and determine the size information of each control to be processed according to the received user input operation.
[0109] The determination module 402 is used to determine the size information of each row in the control display list. The control display list includes several rows. Controls are added to each row in sequence, and when the current row is full, the control is jumped to the next row to add controls.
[0110] Processing module 403 is used to traverse each control and add the target control to the target row or the next row of the target row according to the size information of the currently traversed target control and the size information of the target row in the control display list; wherein the target behavior is the first row in the control display list that is not in a full row state.
[0111] The control processing device provided in the embodiment of the present application, when it is necessary to layout various controls in the game display interface, the user only needs to input the size of each control, and the game client can automatically layout each control according to the size of each control and the preset size of each row in the control display list, without the need for artists to use art software for layout, thereby simplifying the control layout process, reducing waste of human resources, and improving game update efficiency.
[0112] In a feasible implementation manner, the determination module 402 is specifically configured to:
[0113] Determines the maximum horizontal length of each row in the control's display list.
[0114] In a feasible implementation manner, the processing module 403 is specifically used for:
[0115] Determine whether the sum of the horizontal lengths of the existing controls in the target row and the target control is greater than the maximum horizontal length of the target row.
[0116] If the sum of the horizontal lengths of the existing controls in the target row and the target control is greater than the maximum horizontal length of the target row, the horizontal lengths of the existing controls in the target row and / or the target control are adjusted according to a preset adjustment rule, and the target control is added to the target row or the next row of the target row based on the sum of the horizontal lengths of the existing controls in the target row and the target control after the adjustment.
[0117] If the sum of the horizontal lengths of the existing controls in the target row and the target control is less than or equal to the maximum horizontal length of the target row, the target control is added to the target row.
[0118] In a feasible implementation manner, the processing module 403 is specifically used for:
[0119] When the sum of the horizontal lengths of the existing controls in the adjusted target row and the adjusted target control is less than or equal to the maximum horizontal length of the target row, the adjusted target control is added to the target row.
[0120] When the sum of the horizontal lengths of the existing controls in the adjusted target row and the adjusted target control is greater than the maximum horizontal length of the target row, the target control is added to the next row of the target row.
[0121] In a feasible implementation manner, the processing module 403 is further configured to:
[0122] After adding the target control to the next row of the target row, adjust the horizontal lengths of the existing controls in the target row so that the sum of the horizontal lengths of the existing controls in the target row is equal to the maximum horizontal length of the target row; mark the target row as full row state.
[0123] In a feasible implementation manner, the processing module 403 is further configured to:
[0124] After the target control is added to the target row, if the sum of the horizontal lengths of the existing controls in the target row and the target control is equal to the maximum horizontal length of the target row, the target row is marked as a full row state.
[0125] In a feasible implementation manner, the processing module 403 is further configured to:
[0126] After traversing each control, determine the background resource corresponding to each control based on the position of each control in the control display list and the background resources preset at each position in the control display list; display the control display list in the display interface based on the position of each control in the control display list and the background resources corresponding to each control.
[0127] It should be noted that the specific contents of the receiving module 401, the determining module 402, and the processing module 403 in the embodiment of the present application can be referred to in Figure 2 or Figure 3 The relevant contents in the illustrated embodiment will not be described in detail here.
[0128] Furthermore, based on the contents described in the above embodiments, an electronic device is also provided in the embodiments of the present application, which includes at least one processor and a memory; wherein the memory stores computer-executable instructions; the at least one processor executes the computer-executable instructions stored in the memory to implement the various steps in the control processing method described in the above embodiments. For details, please refer to the description in the above embodiments, and this embodiment will not be repeated here.
[0129] In order to better understand the embodiments of the present application, refer to Figure 5 , Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0130] like Figure 5 As shown, the electronic device 50 of this embodiment includes: a processor 501 and a memory 502; wherein:
[0131] Memory 502, used to store computer-executable instructions;
[0132] The processor 501 is used to execute the computer-executable instructions stored in the memory to implement the various steps in the control processing method described in the above embodiment. For details, please refer to the description in the above embodiment, which will not be repeated in this embodiment.
[0133] Optionally, the memory 502 may be independent or integrated with the processor 501 .
[0134] When the memory 502 is independently provided, the device further includes a bus 503 for connecting the memory 502 and the processor 501 .
[0135] Furthermore, based on the contents described in the above embodiments, a computer-readable storage medium is also provided in the embodiments of the present application, in which computer execution instructions are stored. When the processor executes the computer execution instructions, the various steps of the control processing method described in the above embodiments are implemented. For details, please refer to the description in the above embodiments, and this embodiment will not be repeated here.
[0136] Furthermore, based on the contents described in the above embodiments, a computer-readable storage medium is also provided in an embodiment of the present application, in which computer execution instructions are stored. When the processor executes the computer execution instructions, the steps performed on the network device side in the above embodiments are implemented.
[0137] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0138] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0139] In addition, each functional module in each embodiment of the present application can be integrated into a processing unit, each module can exist physically separately, or two or more modules can be integrated into one unit. The above module integration unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0140] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application.
[0141] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the application may be directly implemented as being executed by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor.
[0142] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0143] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0144] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0145] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device or a main control device.
[0146] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A control processing method, characterized in that: The method comprises: Determine the size information of each control to be processed according to the received user input operation; Determine the size information of each row in the control display list, the control display list includes a plurality of rows, controls are added to each row in sequence, and when the current row is full, jump to the next row to add controls; Traversing each of the controls, and adding the target control to the target row or the next row of the target row according to the size information of the currently traversed target control and the size information of the target row in the control display list; wherein the target row is the first row in the control display list that is not in a full row state; The determination control displays the size information of each row in the list, including: Determine the maximum horizontal length of each row of the control display list; The adding the target control to the target row or the next row of the target row according to the size information of the currently traversed target control and the size information of the target row in the control display list includes: Determine whether the sum of the horizontal lengths of the existing controls in the target row and the target control is greater than the maximum horizontal length of the target row; If the sum of the lengths of the existing controls in the target row and the target control in the horizontal direction is greater than the maximum length of the target row in the horizontal direction, adjust the lengths of the existing controls in the target row and / or the target control in the horizontal direction according to a preset adjustment rule, and add the target control to the target row or the next row of the target row according to the sum of the lengths of the existing controls in the target row and the target control in the horizontal direction after the adjustment; If the sum of the horizontal lengths of the existing controls in the target row and the target control is less than or equal to the maximum horizontal length of the target row, the target control is added to the target row.
2. The method according to claim 1, characterized in that The adding the target control to the target row or the next row of the target row according to the adjusted sum of the horizontal lengths of the existing controls in the target row and the target control comprises: When the sum of the adjusted lengths of the existing controls in the target row and the adjusted target control in the horizontal direction is less than or equal to the maximum length of the target row in the horizontal direction, adding the adjusted target control to the target row; When the sum of the adjusted lengths of the existing controls in the target row and the adjusted target control in the horizontal direction is greater than the maximum length of the target row in the horizontal direction, the target control is added to the next row of the target row.
3. The method according to claim 1 or 2, characterized in that: After adding the target control to the next row of the target row, the method further includes: Adjusting the horizontal lengths of the existing controls in the target row so that the sum of the horizontal lengths of the existing controls in the target row is equal to the maximum horizontal length of the target row; The target row is marked as being in a full row state.
4. The method according to claim 1 or 2, characterized in that: After adding the target control to the target row, the method further includes: If the sum of the horizontal lengths of the existing controls in the target row and the target control is equal to the maximum horizontal length of the target row, the target row is marked as a full row state.
5. The method according to claim 1, characterized in that Also includes: After traversing the various controls, determining the background resources corresponding to the various controls according to the positions of the various controls in the control display list and the background resources preset at the various positions in the control display list; The control display list is displayed in a display interface according to the position of each control in the control display list and the background resources corresponding to each control.
6. A control processing device, characterized in that: The device comprises: A receiving module, used for receiving a user input operation and determining the size information of each control to be processed according to the received user input operation; A determination module, used to determine the size information of each row in a control display list, wherein the control display list includes a plurality of rows, controls are added to each row in sequence, and when the current row is full, the next row is jumped to add controls; A processing module, configured to traverse the various controls, and add the target control to the target row or the next row of the target row according to the size information of the currently traversed target control and the size information of the target row in the control display list; wherein the target row is the first row in the control display list that is not in a full row state; The determination module is specifically used to: determine the maximum length of each row of the control display list in the horizontal direction; The processing module is specifically used for: Determine whether the sum of the horizontal lengths of the existing controls in the target row and the target control is greater than the maximum horizontal length of the target row; If the sum of the lengths of the existing controls in the target row and the target control in the horizontal direction is greater than the maximum length of the target row in the horizontal direction, adjust the lengths of the existing controls in the target row and / or the target control in the horizontal direction according to a preset adjustment rule, and add the target control to the target row or the next row of the target row according to the sum of the lengths of the existing controls in the target row and the target control in the horizontal direction after the adjustment; If the sum of the horizontal lengths of the existing controls in the target row and the target control is less than or equal to the maximum horizontal length of the target row, the target control is added to the target row.
7. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the control processing method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the processor executes the computer-executable instructions, the control processing method according to any one of claims 1 to 5 is implemented.
