Control adjustment method and device, and electronic device
By defining the target expansion area in the graphical user interface and adjusting the obscured controls to the expansion area, the problem of floating windows obscuring controls is solved, achieving seamless display of controls and flexibility of floating windows.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-25
- Publication Date
- 2026-04-07
AI Technical Summary
The problem of floating windows obscuring user interface controls is that existing technologies are cumbersome to operate and reduce the flexibility of floating windows.
By obtaining the display position information of the floating window and the target control, the obscured control is identified, and the target expansion area is determined in the graphical user interface to adjust the control position to avoid obstruction.
It reduces accidental operations caused by control movement, ensures the flexibility of the floating window, and eliminates the need for manual user operation.
Smart Images

Figure CN119025196B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, and electronic device for adjusting controls. Background Technology
[0002] With the increasing demand for multiple applications coexisting, more and more apps are developing split-screen or floating screen designs for users. While this brings convenience, it also creates the problem of floating windows obscuring the current UI (User Interface) controls. Related technologies allow users to move the display position and resize the floating window. However, this method is cumbersome and limits the display of the floating window, resulting in low flexibility. Summary of the Invention
[0003] In view of this, the purpose of the present invention is to provide a method, apparatus and electronic device for adjusting controls, which introduces a target expansion area when the control is obscured by a floating window, and controls the obscured control to be adjusted to the target expansion area for display and use, so that the control is not obscured by the floating window, and no operation is required from the player, thus ensuring the flexibility of the floating window.
[0004] In a first aspect, embodiments of the present invention provide a method for adjusting controls. A graphical user interface (GUI) is provided via a terminal device. The GUI includes at least one control area, and the control area includes at least one target control. The method includes: in response to displaying a floating window on the GUI, obtaining display position information of the floating window; determining a first target control obscured by the floating window based on the display position information of the floating window and the display position information of the target control in the target control area; determining a target expansion area in the GUI; and adjusting the position of the first target control or a second target control and at least partially unobscured controls within the target control area and / or the target expansion area, so that the first and second target controls are not obscured by the floating window.
[0005] Secondly, embodiments of the present invention provide a control adjustment device, which provides a graphical user interface through a terminal device. The graphical user interface includes at least one control area, and the control area includes at least one target control. The device includes: a display position information acquisition module, used to acquire display position information of a floating window in response to displaying a floating window on the graphical user interface; a first target control determination module, used to determine a first target control that is obscured by the floating window based on the display position information of the floating window and the display position information of the target control in the target control area; a target expansion area determination module, used to determine a target expansion area in the graphical user interface; and a position adjustment module, used to adjust the position of the first target control or the first target control and at least partially unobscured second target control in the target control area and / or the target expansion area, so that the first target control and the second target control are not obscured by the floating window.
[0006] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the control adjustment method of any of the first aspects.
[0007] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to implement the control adjustment method of any one of the first aspects.
[0008] The embodiments of the present invention bring the following beneficial effects:
[0009] This invention provides a method, apparatus, and electronic device for adjusting controls. In response to displaying a floating window on a graphical user interface, the method acquires the display position information of the floating window; based on the display position information of the floating window and target controls in a target control area, it determines a first target control that is obscured by the floating window; it determines a target expansion area in the graphical user interface; and it adjusts the position of the first target control or a second target control that is at least partially unobscured within the target control area and / or the target expansion area, so that the target control is not obscured by the floating window. In this method, when a control is obscured by the floating window, the target expansion area is determined, and the obscured control is adjusted to the target expansion area for display and use, thus preventing the control from being obscured by the floating window. This reduces misoperations caused by control movement and eliminates the need for any player intervention, ensuring the flexibility of the floating window.
[0010] 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.
[0011] 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
[0012] 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.
[0013] Figure 1 A flowchart illustrating a method for adjusting a control according to an embodiment of the present invention;
[0014] Figure 2 A schematic diagram of a graphical user interface provided in an embodiment of the present invention;
[0015] Figure 3 A schematic diagram of another graphical user interface provided in an embodiment of the present invention;
[0016] Figure 4 A schematic diagram illustrating the movement of a control component according to an embodiment of the present invention;
[0017] Figure 5 This is a schematic diagram illustrating another control for moving the device, provided in an embodiment of the present invention.
[0018] Figure 6 This is a schematic diagram illustrating another control for moving the device, provided in an embodiment of the present invention.
[0019] Figure 7 This is a schematic diagram illustrating another control for moving the device, provided in an embodiment of the present invention.
[0020] Figure 8 This is a schematic diagram illustrating another control for moving the device, provided in an embodiment of the present invention.
[0021] Figure 9 This is a schematic diagram illustrating another control for moving the device, provided in an embodiment of the present invention.
[0022] Figure 10 This is a schematic diagram illustrating another control for moving the device, provided in an embodiment of the present invention.
[0023] Figure 11 This is a schematic diagram illustrating another control for moving the device, provided in an embodiment of the present invention.
[0024] Figure 12 This is a schematic diagram illustrating another control for moving the device, provided in an embodiment of the present invention.
[0025] Figure 13 This is a schematic diagram illustrating another control for moving the device, provided in an embodiment of the present invention.
[0026] Figure 14 This is a schematic diagram illustrating another control for moving the device, provided in an embodiment of the present invention.
[0027] Figure 15 This is a schematic diagram of a first expansion region provided in an embodiment of the present invention;
[0028] Figure 16 This is a schematic diagram of a second expansion region provided in an embodiment of the present invention;
[0029] Figure 17 This is a schematic diagram illustrating the determination of a target expansion area according to an embodiment of the present invention;
[0030] Figure 18 This is a schematic diagram of a target expansion area provided in an embodiment of the present invention;
[0031] Figure 19 This is a schematic diagram of a third expansion region provided in an embodiment of the present invention;
[0032] Figure 20 This is a schematic diagram illustrating the display of a floating window in a target display area, as provided in an embodiment of the present invention.
[0033] Figure 21 This is a schematic diagram illustrating another method of displaying a floating window in a target display area, provided by an embodiment of the present invention.
[0034] Figure 22 This is a schematic diagram illustrating another method of displaying a floating window in a target display area, provided by an embodiment of the present invention.
[0035] Figure 23 This is a schematic diagram illustrating another method of displaying a floating window in a target display area, provided by an embodiment of the present invention.
[0036] Figure 24 A schematic diagram of the structure of a control adjustment device provided in an embodiment of the present invention;
[0037] Figure 25 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0038] 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.
[0039] With the increasing demand for multiple applications, more and more apps are developing split-screen or floating screen designs for users. While this brings convenience, it also creates the problem of floating windows obscuring the current UI (User Interface) controls. Related technologies allow users to move the floating window's display position, modify its size, adjust the control layout, or even restrict its display to areas without controls. However, manipulating the floating window itself is cumbersome; adjusting the control layout alters the entire control layout, confusing users' preconceived notions of control positions and potentially leading to misoperation; and restricting the floating window's display area reduces its flexibility. Therefore, this invention provides a method, apparatus, and electronic device for adjusting controls, applicable to devices such as mobile phones, computers, laptops, and tablets.
[0040] To facilitate understanding of this embodiment, a method for adjusting a control disclosed in this embodiment will first be described in detail. A graphical user interface is provided through a terminal device. The graphical user interface includes at least one control area, and the control area includes at least one target control, such as... Figure 1 As shown, the method includes:
[0041] Step S102: In response to displaying a floating window on the graphical user interface, obtain the display position information of the floating window;
[0042] The aforementioned control area is used to display target controls, which typically refer to all or some controls in the first application, such as game controls in the target game's interface. Generally, not all controls in the control area need to be adjusted; therefore, the target controls are all or some of the controls in the control area. For example, the control area may include target controls with triggering functionality, as well as designated controls without triggering functionality. Therefore, even if a designated control is obscured, its display position usually does not need to be adjusted. The aforementioned floating window can be a floating window of the first application or a floating window of the second application, such as a video floating window or a chat floating window. In fact, a graphical user interface typically has multiple control areas, each displaying one or more target controls to provide interactive operations for the user.
[0043] Specifically, users can control the display of the floating window in the graphical user interface (GUI), and also control its movement within the GUI. When a floating window is displayed on the GUI, the system first obtains its display position information on the interface. This position information can be the coordinates of the floating window's position on the GUI.
[0044] Step S104: Based on the display position information of the floating window and the display position information of the target control in the target control area, determine the first target control that is obscured by the floating window in the target control area;
[0045] For example, it calculates whether the display position information (position coordinates) of the floating window overlaps with the display position information (position coordinates) of each target control in the target control area. If there is an overlap, it determines that the corresponding first target control is obscured by the floating window. Alternatively, it determines whether the display area of the floating window overlaps with the display area of each target control in the target control area. If so, it determines that the corresponding first target control is obscured by the floating window.
[0046] For example, such as Figure 2 As shown, the floating window obscures two target controls in the target control area, namely the first target control mentioned above.
[0047] Step S106: Determine a target expansion area in the graphical user interface;
[0048] The target expansion area can be any area in the graphical user interface that is not obscured by the floating window, and this target expansion area will not obscure the controls displayed in the graphical user interface. Specifically, a target expansion area can be randomly determined in the graphical user interface, or it can be determined based on the display position information of the control area, such as determining the target expansion area closest to the control area in the graphical user interface; or it can be determined based on multiple pre-defined expansion areas of the control area. Furthermore, the size of the target expansion area is usually less than or equal to the control area, and can be determined based on the size of the control area or the size of the first target control. For example,... Figure 3 The target expansion area is shown.
[0049] Step S108: In the target control area and / or the target expansion area, the position of the first target control or the first target control and at least partially unobstructed second target control is adjusted so that the first target control and the second target control are not obstructed by the floating window.
[0050] In other words, the position of the first target control or the first target control and at least partially unobstructed second target control can be adjusted within the target control area to prevent the first target control from being obscured by the floating window. Alternatively, the position of the first target control or the first target control and at least partially unobstructed second target control can be adjusted within the target expansion area to prevent both the first and second target controls from being obscured by the floating window. Alternatively, the position of the first target control or the first target control and at least partially unobstructed second target control can be adjusted within both the target control area and the target expansion area to prevent both the first and second target controls from being obscured by the floating window.
[0051] Specifically, the positions of the first target control and a specified control that is not obscured within the target control area can be swapped. The unobscured specified control is one that does not require adjustment, unlike the target control, and its obscuration will not affect the user experience. Alternatively, the first target control can be moved to the target expansion area while maintaining its display rules, i.e., the relative positions of the first target controls remain unchanged. Another option is to move the first target control to an unobscured target position within the target control area, and simultaneously move the second target control previously displayed at that target position to the target expansion area. It should be noted that during the adjustment of the first and second target controls, the relative positions of both the first and second target controls are typically kept constant.
[0052] This invention provides a method for adjusting controls. In response to displaying a floating window on a graphical user interface, the method acquires the display position information of the floating window; based on the display position information of the floating window and target controls in a target control area, it determines a first target control that is obscured by the floating window; it determines a target expansion area in the graphical user interface; and it adjusts the position of the first target control or a second target control that is at least partially unobscured within the target control area and / or the target expansion area, so that the target control is not obscured by the floating window. In this method, when a control is obscured by the floating window, a target expansion area is determined, and the obscured control is adjusted to the target expansion area for display and use, thus preventing the control from being obscured by the floating window. This reduces misoperations caused by control movement and eliminates the need for player intervention, ensuring the flexibility of the floating window.
[0053] One possible implementation of the above-described step of adjusting the position of the first target control is to move the first target control within the target expansion area, while keeping the position of the second target control unchanged within the target control area. For example, such as... Figure 4 As shown, the two first target controls that are being obscured are adjusted to the target expansion area.
[0054] For example Figure 5 As shown, the two first target controls that are being occluded (such as...) Figure 5 Adjust blocks 1 and 2 in the specified area to the target expansion area (e.g., ...). Figure 5 Within the gray rectangular area (as shown in the image), the positions of the first target controls remain unchanged. For example... Figure 6 As shown, control the first target control that is being obscured (such as...) Figure 6 Adjust block 2 in the middle to the target expansion area (e.g., ... Figure 6 The adjustment method does not change the arrangement of the first target control and the position of the second target control within the target control area. It ensures that the controls are not obscured while minimizing the adjustment of the controls, and can maintain the relative order of the original layout to a certain extent. This avoids confusion caused by the user's habitual perception of the control positions and reduces user errors.
[0055] One possible implementation of the above-described step of adjusting the position of the first target control and at least partially unobstructed second target control is as follows: the position of the obstructed first target control and the unobstructed second target control are adjusted according to preset rules, wherein the preset rules include at least one of the following: the arrangement layout of the target controls, the control display rules of the target expansion area, and the priority of the target controls.
[0056] The arrangement and layout of the target controls mentioned above typically refers to their relative positions. The display rules for controls within the target expansion area usually include: displaying in one row, two rows, one line, or two lines, etc. Among these target controls, those frequently used by the user generally have higher priority, while those less frequently used generally have lower priority.
[0057] In practice, the positions of the first obscured target control and the second unobscured target control can be adjusted while minimizing changes to the layout of the target controls. Target controls moved to the target expansion area must adhere to the display rules of that expansion area. For example, if the two target controls moved to the target expansion area are arranged in two rows, but the target expansion area's display rule is one row, then these two target controls will be displayed in a row and two columns within the target expansion area.
[0058] You can also determine the target control that needs to be adjusted to the target expansion area based on the priority of the target control. The target control that needs to be adjusted to the target expansion area can be the first target control that is obscured, or a specified control in the second target control that is not obscured.
[0059] In one possible approach, the aforementioned preset rules include: the arrangement and layout of the target controls and the display rules for the controls in the target expansion area; the step of adjusting the positions of the first occluded target control and the second unoccluded target control according to the preset rules, one possible implementation is as follows:
[0060] Get the current arrangement layout of the first target control; determine whether the target expansion area can be displayed according to the current arrangement layout; if so, move the first target control to the target expansion area and display the first target control according to the current arrangement layout, and keep the position of the second target control unchanged in the target control area.
[0061] If not, determine the target position of the first target control according to the control display rules of the target expansion area; move the first target control to the target expansion area and display the first target control at the corresponding target position, and keep the position of the second target control unchanged in the target control area.
[0062] For example, such as Figure 5 As shown, the first target control (i.e. Figure 5 The current arrangement of blocks 1 and 2 in the target expansion area is a row of two columns, and the target expansion area can be displayed according to the current arrangement.
[0063] For example, such as Figure 7 As shown, the first target control (i.e. Figure 7If the current arrangement of blocks 1 and 2 in the target expansion area is a two-column arrangement, and the target expansion area cannot be displayed according to the current arrangement, then the first target control will be displayed according to the display rules of the target expansion area, in a two-column, one-column arrangement, and the second target control (i.e., Figure 7 The positions of blocks 3-7 in the target control area remain unchanged.
[0064] The aforementioned preset rules include: the priority of the target controls; and the step of adjusting the positions of the first occluded target control and the second unoccluded target control according to the preset rules. One possible implementation is as follows:
[0065] Obtain the priorities of the first target control and the second target control, and determine whether the priority of the first target control is higher than that of the second target control. If yes, determine the second target control to be moved, move the second target control to be moved to the target expansion area for display, and move the first target control to the position of the second target control to be moved within the target control area for display. If no, execute the step of obtaining the current arrangement layout of the first target control.
[0066] Typically, priorities are pre-configured for each target control. For example, in a game, within the social control area, friend and channel controls have the highest priority, while voice chat, photo, and chat summary controls within each channel have the second highest priority. In the control area related to functionality, the inventory and folding controls have the highest priority, while the rest have the second highest priority. The highest priority is higher than the second highest priority. Target controls set to the highest priority are those used more frequently and whose corresponding functions are more numerous or important.
[0067] In practice, if the priority of the first target control that is obscured is higher than that of the second target control, the first target control will not be moved to the target expansion area. Instead, a second target control that is not obscured and has a lower priority will be selected from the target controls to be moved. The number of second target controls to be moved is usually the same as the number of first target controls. Finally, the second target controls to be moved are moved into the target expansion area and displayed, while the first target controls are moved to the position of the second target controls to be moved within the target control area and displayed, ensuring that the positions of important controls are not significantly altered.
[0068] If the priority of the first target control that is obscured is not higher than the priority of the second target control, the first target control will be adjusted directly in the aforementioned manner. One possible implementation of determining the second target control to be moved is as follows: The second target control closest to the first target control is selected as the second target control to be moved. Specifically, the second target controls closest to the first target control and in the same number as the first target control are selected as the second target controls to be moved.
[0069] In one possible implementation of the step of determining the second target control that is closest to the first target control as the second target control to be moved: if the second target control includes multiple sub-controls, select the target sub-control that has the same number of sub-controls as the first target control and is closest to it; determine the target sub-control as the second target control to be moved.
[0070] For example, such as Figure 8 As shown, the floating window obscures control 1 (i.e. the first target control). Since control 1 has a higher priority than control 2, control 2 is determined to be the second target control to be moved. Control 2 is moved to the target expansion area, and control 1 is adjusted to the position that control 2 was previously displayed in the target control area.
[0071] For example, such as Figure 9 As shown, the floating window obscures control 5-7 (i.e., the first target control). Since control 5-7 has a higher priority than control 1-4, control 2-3 is determined to be the second target control to be moved. Control 2-4 is moved to the target expansion area, and control 5-7 is adjusted to the position that control 2-4 was previously displayed in the target control area.
[0072] The above adjustment method will not change the arrangement of the first target control and the position of the second target control within the target control area. Under the premise of ensuring that the position adjustment of the control is minimal, the control is not obscured, and the relative order of the original layout can be maintained to a certain extent, avoiding confusion of the user's habitual perception of the control position and reducing user misoperation.
[0073] Another possible implementation involves obtaining the priorities of the first target control and the second target control, and determining whether the priority of the first target control is higher than that of the second target control. If so, a second target control and a third target control to be moved are identified. The number of second target controls is the same as the number of first target controls, and the third target control is any target control in the target control area other than the first and second target controls. The second and third target controls to be moved are moved toward the target expansion area so that the second target control is displayed in the target expansion area, and the first target control is moved to the position of the second target control and / or the third target control to be moved within the target control area and displayed thereon.
[0074] For example, such as Figure 10 and Figure 11 As shown, the floating window obscures control 1-2 (i.e., the first target control). Since control 1-2 has a higher priority than control 3-5, control 4-5 is determined to be the second target control to be moved, and control 3 is determined to be the third target control to be moved. Control 3-5 is moved towards the target expansion area so that the second target control to be moved (control 4-5) is moved to the target expansion area, and control 1-2 is adjusted to the position that control 3-4 was previously displayed in the target control area.
[0075] For example, such as Figure 12 As shown, the floating window obscures control 5-6 (i.e., the first target control). Since control 5-6 has a higher priority than control 1-4, control 1-2 is determined to be the second target control to be moved, and control 3-4 is determined to be the third target control to be moved. Control 1-4 is moved towards the target expansion area so that the second target control to be moved (control 1-2) is moved to the target expansion area, and control 5-6 is adjusted to the position that control 3-4 was previously displayed in the target control area.
[0076] For example, such as Figure 13 As shown, the floating window obscures control 4-5 (i.e., the first target control). Since control 4-5 has a higher priority than control 1-3, control 1-2 is determined to be the second target control to be moved, and control 3 is determined to be the third target control to be moved. Control 1-3 is moved towards the target expansion area so that the second target control to be moved (control 1-2) is moved to the target expansion area, and control 4-5 is adjusted to the position that control 2-3 was previously displayed in the target control area.
[0077] For example, such as Figure 14 As shown, the floating window obscures control 6 (i.e., the first target control). Since control 6 has a higher priority than controls 1-5, control 1-2 is determined to be the second target control to be moved, and control 3-5 is determined to be the third target control to be moved. Control 1-5 is controlled to move towards the target expansion area so that the second target control to be moved (control 1-2) is moved to the target expansion area, and control 6 is adjusted to the position that control 4 was previously displayed in the target control area.
[0078] The above adjustment method does not change the arrangement of the first target control and the position of the second target control within the target control area. By comparing priorities, it ensures that the target controls that users frequently use are displayed in a prominent position. At the same time, it ensures that the controls are not obscured while minimizing the adjustment of the control positions, and does not change the overall layout of the controls. This avoids confusion in users' habitual perception of the control positions and reduces user misoperation.
[0079] One possible implementation of the above steps for determining a target expansion area in a graphical user interface is as follows: determine the area of the interaction area between the floating window and the target control area, and calculate the ratio of the area of the intersection area to the area of the target control area; if the ratio is less than or equal to a preset threshold, determine a target expansion area in the graphical user interface.
[0080] When a floating window obscures one or more target controls within a target control area, first determine the intersection area of the floating window and the target control area. For example, such as... Figure 2 As shown, the gray area represents the intersection region, and the squares in the target control area represent controls. The first area of the intersection region and the second area of the target control area are calculated, and finally, the ratio of the first area to the second area is calculated. If the ratio is less than or equal to a preset threshold, a target expansion area is determined in the graphical user interface; the preset threshold can be set in advance according to actual needs, such as 50%, 40%, or 60%. This target expansion area is usually located adjacent to the target control area and is not obscured by the floating window.
[0081] Specifically, based on the location of the target control area, multiple adjacent areas can be determined. From these adjacent areas, a target area that is not obscured by the floating window can be selected and designated as the target expansion area. Alternatively, multiple pre-defined expansion areas can be used to determine a target expansion area that is not obscured by the floating window.
[0082] One possible implementation of the steps described above for determining the area of the interaction region between the floating window and the target control area is as follows: In response to a movement operation on the floating window, the floating window is controlled to move on the graphical user interface, and the area of the intersection region between the floating window and the target control area is detected in real time.
[0083] In practice, users can control the floating window to move on the graphical user interface and calculate the area of the intersection between the floating window and the target control area in real time.
[0084] One possible implementation of the above steps for determining a target expansion area in a graphical user interface is as follows: determine a first expansion area and a second expansion area preset in the target control area; and determine the expansion area in the first expansion area and the second expansion area that is not obscured by the floating window as the target expansion area.
[0085] The first and second expansion areas mentioned above are pre-defined for the target control area. The first expansion area is a horizontal expansion area of the target control area, and the second expansion area is a vertical expansion area of the target control area. That is, the first expansion area is set above or below the target control area; the second expansion area is set to the left or right of the target control area.
[0086] For example, such as Figure 15 As shown, the white rectangle represents the control area. The graphical user interface includes multiple control areas, and the gray rectangle connected to the white rectangle in the horizontal direction of the control area is the first expansion area of that control area. For example, as... Figure 16 As shown, the white rectangle represents the control area. The graphical user interface includes multiple control areas, and the gray area connected to the white rectangle in the vertical direction of the control area is the second expansion area of that control area.
[0087] For example, such as Figure 17 As shown, if the floating window obscures the first expansion area of the target control area, then the second expansion area is determined as the target expansion area.
[0088] In addition, the dimensions of the first expansion area and the second expansion area of the target control area are determined by the size of the target expansion area; the width of the first expansion area is the same as the width of the target control area; and the height of the second expansion area is the same as the height of the target control area.
[0089] For example, if the size of the target control area is W*H, then the width of the first expansion area is W, but the height of the first expansion area is a specified percentage of H, such as 50%*H or 90%*H. The height of the second expansion area is H, but the width of the second expansion area is a specified percentage of W, such as 50%*W or 90%*W.
[0090] Furthermore, the above method also includes: if neither the first expansion area nor the second expansion area is obscured by the floating window, determining the expansion area closest to the first target control among the first and second expansion areas as the target expansion area. Alternatively, randomly determining one of the first and second expansion areas as the target expansion area.
[0091] For example, such as Figure 18 As shown, if neither the first expansion area nor the second expansion area is obscured by the floating window, and the first expansion area (the expansion area located above the target control area) is closest to the first target control, the first expansion area is determined as the target expansion area.
[0092] The above method also includes: adjusting the size of the target control area in response to a size adjustment operation on the target control area, or in response to a specified trigger event; and adjusting the size of the first expansion area and the second expansion area of the target control area according to the adjusted size of the target control area.
[0093] Specifically, the size of the target control area can be adjusted either by the user or by the system. When the size of the target control area changes, the sizes of its preset first and second expansion areas will also change accordingly. For example, if the width of the target control area decreases, the width of the first expansion area will also decrease by a corresponding size. Similarly, if the height of the target control area increases, the height of the second expansion area will also increase by a corresponding size. In short, the sizes of the preset first and second expansion areas of the target control area are proportional to the size of the target control area; therefore, the sizes of the preset first and second expansion areas will change as the size of the target control area changes.
[0094] The above method also includes: if the ratio is greater than a preset threshold, determining the target display area from the graphical user interface; if the target display area does not coincide with the control area, displaying a floating window in the target display area.
[0095] If the size of the floating window is different from the size of the target display area, adjust the size of the floating window according to the target display area so that the target display area is the same size as the floating window.
[0096] If the target display area coincides with the target control area, determine the preset third expansion area of the target control area, move the target control in the target control area to the third expansion area, and display the target control according to the current layout.
[0097] The target display area is typically located at the edge of the graphical user interface (GUI), specifically the edge area closest to the target control area. For example, the four corners of the GUI, or the top, bottom, left, and right edges. If the ratio exceeds a preset threshold, indicating severe occlusion of the GUI, a target display area can be randomly selected, or the edge area closest to the target control area can be designated as the target display area. In other words, the target display area is the edge area closest to the target control area. The size of the target display area can be determined based on the size of the floating window. Alternatively, the size of the target display area can be predetermined, and the size of the floating window can be adjusted accordingly to ensure that the size of the floating window is the same as the size of the target display area.
[0098] After determining the target display area, it is necessary to determine the target control area that overlaps with the target display area. Then, a preset third expansion area is determined for the target control area. The arrangement and layout of the target controls within the target control area are kept unchanged, and the target controls within the target control area are moved to the third expansion area. A floating window is then displayed in the target display area. In other words, the entire target control is adjusted to the third expansion area, while the layout of the internal controls remains unchanged.
[0099] For example, such as Figure 19 As shown, the white rectangle represents the control area. The graphical user interface includes multiple control areas, and the gray rectangle connected to the white rectangle represents the third expansion area of that control area.
[0100] For example, such as Figure 20 As shown, if the target display area is located at the top left corner of the graphical user interface, the adjacent positions of the target controls in the two target control areas that overlap with the target display area at the top left corner remain unchanged, and the target controls in the target control areas are moved to the corresponding third expansion area. For example, as... Figure 21 As shown, if the target display area is located at the upper right corner of the graphical user interface, the adjacent positions of target controls in a target control area that overlaps with the target display area at the upper right corner remain unchanged, and the target controls in the target control area are moved to the corresponding third expansion area. For example, as... Figure 22 As shown, if the target display area is located at the lower left corner of the graphical user interface, the adjacent positions of the target controls in the two target control areas that overlap with the target display area at the lower left corner remain unchanged, and the target controls in the target control areas are moved to the corresponding third expansion area. For example, as... Figure 23 As shown, if the target display area is located in the lower right corner of the graphical user interface, the adjacent positions of the target controls in a target control area that overlaps with the target display area in the lower right corner remain unchanged, and the target controls in the target control area are moved to the corresponding third expansion area.
[0101] Taking a game interface displayed via a graphical user interface as an example, let's assume the target control area (such as the character status bar) is 200px × 100px, and the floating window (such as the chat window) is 150px × 100px. According to the calculation rules for the first expansion area (vertical expansion area), the second expansion area (horizontal expansion area), and the target display area (alternate area), the horizontal expansion area = 100px, the vertical expansion area = 50px, and the area of the alternative area = 15000px. 2 If the overlap between the floating window and the target control area is ≤50% of the target control area, a horizontal / vertical expansion area adjustment is triggered; if it is >50%, an alternative UI area adjustment is triggered. This ensures that the game controls and the floating window do not obstruct each other, improving the user experience.
[0102] The above method dynamically calculates the "horizontal expansion UI area (first expansion area)," "vertical expansion UI area (second expansion area)," and "alternate UI area (third expansion area)" for each control area within the application based on the area and shape of the app's floating window (floating window) and controls, thus dynamically avoiding the app's floating window controls. The specific technical effects are as follows:
[0103] 1. Controls and app floating windows do not obstruct each other;
[0104] 2. Minimize the movement of controls, or ensure a reasonable overall displacement;
[0105] 3. Improve operational fault tolerance and reduce accidental operations caused by control movement;
[0106] 4. It ensures the flexibility and displacement area of floating windows and controls, and is not constrained by operation controls;
[0107] 5. Displacement does not affect the function and form of the contact control.
[0108] Corresponding to the above method embodiments, this embodiment of the invention provides a control adjustment device, which provides a graphical user interface through a terminal device. The graphical user interface includes at least one control area, and the control area includes at least one target control, such as... Figure 24 As shown, the device includes:
[0109] The display position information acquisition module 241 is used to acquire the display position information of the floating window in response to the display of a floating window on the graphical user interface.
[0110] The first target control determination module 242 is used to determine the first target control that is obscured by the floating window in the target control area based on the display position information of the floating window and the display position information of the target control in the target control area.
[0111] The target expansion area determination module 243 is used to determine a target expansion area in the graphical user interface;
[0112] The position adjustment module 244 is used to adjust the position of the first target control or the first target control and at least partially unobstructed second target control in the target control area and / or the target expansion area, so that the first target control and the second target control are not obstructed by the floating window.
[0113] This invention provides a control adjustment device that, in response to displaying a floating window on a graphical user interface, acquires the display position information of the floating window; based on the display position information of the floating window and target controls in a target control area, determines a first target control that is obscured by the floating window; determines a target expansion area in the graphical user interface; and adjusts the position of the first target control or a second target control that is at least partially unobscured within the target control area and / or the target expansion area, so that the target control is not obscured by the floating window. In this method, when a control is obscured by the floating window, a target expansion area is determined, and the obscured control is adjusted to the target expansion area for display and use, thus preventing the control from being obscured by the floating window. This reduces misoperations caused by control movement and eliminates the need for any player intervention, ensuring the flexibility of the floating window.
[0114] The aforementioned position adjustment module is also used to: move the first target control to the target expansion area, and keep the position of the second target control within the target control area unchanged.
[0115] The aforementioned position adjustment module is also used to: adjust the position of the first target control that is obscured and the second target control that is not obscured according to preset rules, wherein the preset rules include at least one of the following: the arrangement and layout of the target controls, the display rules of the controls in the target expansion area, and the priority of the target controls.
[0116] The aforementioned preset rules include: the arrangement and layout of the target controls and the display rules of the controls in the target expansion area; the aforementioned position adjustment module is also used to: obtain the current arrangement and layout of the first target control; determine whether it can be displayed in the target expansion area according to the current arrangement and layout; if so, move the first target control to the target expansion area and display the first target control according to the current arrangement and layout, and control the position of the second target control in the target control area to remain unchanged.
[0117] The aforementioned position adjustment module is also used to: if not, determine the target position of the first target control according to the control display rules of the target expansion area; move the first target control to the target expansion area and display the first target control at the corresponding target position, and control the position of the second target control within the target control area to remain unchanged.
[0118] The aforementioned preset rules include: the priority of the target control; the aforementioned position adjustment module is also used to: obtain the priorities of the first target control and the second target control, and determine whether the priority of the first target control is higher than the priority of the second target control; if so, determine the second target control to be moved, move the second target control to be moved to the target expansion area for display, and move the first target control to the position of the second target control to be moved within the target control area for display; if not, execute the step of obtaining the current arrangement layout of the first target control.
[0119] The aforementioned position adjustment module is also used to: determine the second target control that is closest to the first target control as the second target control to be moved.
[0120] The aforementioned position adjustment module is also used to: if the second target control includes multiple sub-controls, select the target sub-control that has the same number of sub-controls as the first target control and is the closest to it; and determine the target sub-control as the second target control to be moved.
[0121] The aforementioned target expansion area determination module is also used to: determine the area of the interaction area between the floating window and the target control area, and calculate the ratio of the area of the intersection area to the area of the target control area; if the ratio is less than or equal to a preset threshold, determine a target expansion area in the graphical user interface.
[0122] The aforementioned target expansion area determination module is also used to: respond to movement operations on the floating window, control the movement of the floating window on the graphical user interface, and detect the area of the intersection region between the floating window and the target control area in real time.
[0123] The aforementioned target expansion area determination module is also used to: determine the preset first expansion area and second expansion area of the target control area; and determine the expansion area in the first expansion area and the second expansion area that is not obscured by the floating window as the target expansion area.
[0124] The first expansion area is set above or below the target control area; the second expansion area is set to the left or right of the target control area.
[0125] The dimensions of the first and second expansion areas of the target control area are determined by the size of the target expansion area; the width of the first expansion area is the same as the width of the target control area; and the height of the second expansion area is the same as the height of the target control area.
[0126] The aforementioned target expansion area determination module is also used to: if neither the first expansion area nor the second expansion area is obscured by the floating window, determine the expansion area closest to the first target control among the first expansion area and the second expansion area as the target expansion area.
[0127] The aforementioned device further includes: a first size adjustment module, used to adjust the size of the target control area in response to a size adjustment operation on the target control area or in response to a specified trigger event; and to adjust the size of a preset first expansion area and a second expansion area of the target control area according to the adjusted size of the target control area.
[0128] The aforementioned device further includes: a target display area determination module, used to determine a target display area from the graphical user interface if the ratio is greater than a preset threshold; and to display a floating window in the target display area if the target display area does not overlap with the control area.
[0129] The aforementioned target display area determination module is also used to: if the target display area coincides with the target control area, determine the preset third expansion area of the target control area, move the target control in the target control area to the third expansion area, and display the target control according to the current arrangement layout.
[0130] The target display area mentioned above is the edge area closest to the target control area.
[0131] The aforementioned first size adjustment module is also used to: if the size of the floating window is different from the size of the target display area, adjust the size of the floating window according to the target display area so that the size of the target display area is the same as the size of the floating window.
[0132] The control adjustment device provided in this embodiment of the invention has the same technical features as the control adjustment method provided in the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.
[0133] 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 aforementioned control adjustment method. This electronic device can be a server or a terminal device.
[0134] See Figure 25 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-mentioned control adjustment method.
[0135] Furthermore, Figure 25 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.
[0136] 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 25 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.
[0137] 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.
[0138] The processor in the aforementioned electronic device, by executing machine-executable instructions, can perform the following operations in the aforementioned control adjustment method:
[0139] In response to displaying a floating window on top of the graphical user interface, the system obtains the display position information of the floating window; based on the display position information of the floating window and the display position information of the target controls in the target control area, it determines a first target control that is obscured by the floating window; it determines a target expansion area in the graphical user interface; and within the target control area and / or the target expansion area, it adjusts the position of the first target control or a second target control that is at least partially unobscured, so that the first and second target controls are not obscured by the floating window. In this method, when a control is obscured by the floating window, the target expansion area is determined, and the obscured control is adjusted to the target expansion area for display and use, thus preventing the control from being obscured by the floating window. This reduces accidental operations caused by control movement and requires no player intervention, ensuring the flexibility of the floating window.
[0140] The steps for adjusting the position of the first target control include: moving the first target control to the target expansion area, and keeping the position of the second target control unchanged within the target control area.
[0141] The above-mentioned steps for adjusting the position of the first target control and at least partially unobstructed second target control include: adjusting the position of the obstructed first target control and the unobstructed second target control according to preset rules, wherein the preset rules include at least one of the following: the arrangement layout of the target controls, the control display rules of the target expansion area, and the priority of the target controls.
[0142] The aforementioned preset rules include: the arrangement and layout of the target controls and the display rules of the controls in the target expansion area; the steps of adjusting the positions of the first target control that is obscured and the second target control that is not obscured according to the preset rules include: obtaining the current arrangement and layout of the first target control; determining whether it can be displayed in the target expansion area according to the current arrangement and layout; if so, moving the first target control to the target expansion area and displaying the first target control according to the current arrangement and layout, and keeping the position of the second target control in the target control area unchanged.
[0143] After determining whether the target expansion area can be displayed according to the current layout, the above method further includes: if not, determining the target position of the first target control according to the control display rules of the target expansion area; moving the first target control to the target expansion area and displaying the first target control at the corresponding target position, while keeping the position of the second target control unchanged in the target control area.
[0144] The aforementioned preset rules include: the priority of the target control; the step of adjusting the position of the first target control that is obscured and the second target control that is not obscured according to the preset rules includes: obtaining the priority of the first target control and the second target control, and determining whether the priority of the first target control is higher than the priority of the second target control; if yes, determining the second target control to be moved, moving the second target control to be moved to the target expansion area for display, and moving the first target control to the position of the second target control to be moved within the target control area for display; if no, executing the step of obtaining the current arrangement layout of the first target control.
[0145] The above-mentioned determination of the second target control to be moved includes: determining the second target control that is closest to the first target control as the second target control to be moved.
[0146] The step of determining the second target control that is closest to the first target control as the second target control to be moved includes: if the second target control includes multiple sub-controls, selecting the target sub-control that has the same number as the first target control and is closest to it from the multiple sub-controls; and determining the target sub-control as the second target control to be moved.
[0147] The steps for determining a target expansion area in a graphical user interface include: determining the area of the interaction area between the floating window and the target control area, and calculating the ratio of the area of the intersection area to the area of the target control area; if the ratio is less than or equal to a preset threshold, a target expansion area is determined in the graphical user interface.
[0148] The steps for determining the area of the interaction area between the floating window and the target control area include: responding to a movement operation on the floating window, controlling the floating window to move on the graphical user interface, and detecting the area of the intersection area between the floating window and the target control area in real time.
[0149] The steps of determining a target expansion area in a graphical user interface include: determining a first expansion area and a second expansion area preset in the target control area; and determining the expansion area in the first expansion area and the second expansion area that is not obscured by the floating window as the target expansion area.
[0150] The first expansion area is set above or below the target control area; the second expansion area is set to the left or right of the target control area.
[0151] The dimensions of the first and second expansion areas of the target control area are determined by the size of the target expansion area; the width of the first expansion area is the same as the width of the target control area; and the height of the second expansion area is the same as the height of the target control area.
[0152] The above method also includes: if neither the first expansion area nor the second expansion area is obscured by the floating window, the expansion area that is closest to the first target control among the first expansion area and the second expansion area is determined as the target expansion area.
[0153] The above method also includes: adjusting the size of the target control area in response to a size adjustment operation on the target control area, or in response to a specified trigger event; and adjusting the size of the first expansion area and the second expansion area of the target control area according to the adjusted size of the target control area.
[0154] The above method also includes: if the ratio is greater than a preset threshold, determining a target display area from the graphical user interface; if the target display area does not coincide with the control area, displaying a floating window in the target display area.
[0155] The above method also includes: if the target display area coincides with the target control area, determining the preset third expansion area of the target control area, moving the target control in the target control area to the third expansion area, and displaying the target control according to the current arrangement layout.
[0156] The target display area mentioned above is the edge area closest to the target control area.
[0157] After determining a target display area from the graphical user interface if the ratio is greater than a preset threshold, the method further includes: if the size of the floating window is different from the size of the target display area, adjusting the size of the floating window according to the target display area so that the size of the target display area is the same as the size of the floating window.
[0158] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions cause the processor to implement the above-mentioned control adjustment method.
[0159] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be executed to perform the following operations in the control adjustment method described above:
[0160] In response to displaying a floating window on top of the graphical user interface, the system obtains the display position information of the floating window; based on the display position information of the floating window and the display position information of the target controls in the target control area, it determines a first target control that is obscured by the floating window; it determines a target expansion area in the graphical user interface; and within the target control area and / or the target expansion area, it adjusts the position of the first target control or a second target control that is at least partially unobscured, so that the first and second target controls are not obscured by the floating window. In this method, when a control is obscured by the floating window, the target expansion area is determined, and the obscured control is adjusted to the target expansion area for display and use, thus preventing the control from being obscured by the floating window. This reduces accidental operations caused by control movement and requires no player intervention, ensuring the flexibility of the floating window.
[0161] The steps for adjusting the position of the first target control include: moving the first target control to the target expansion area, and keeping the position of the second target control unchanged within the target control area.
[0162] The above-mentioned steps for adjusting the position of the first target control and at least partially unobstructed second target control include: adjusting the position of the obstructed first target control and the unobstructed second target control according to preset rules, wherein the preset rules include at least one of the following: the arrangement layout of the target controls, the control display rules of the target expansion area, and the priority of the target controls.
[0163] The aforementioned preset rules include: the arrangement and layout of the target controls and the display rules of the controls in the target expansion area; the steps of adjusting the positions of the first target control that is obscured and the second target control that is not obscured according to the preset rules include: obtaining the current arrangement and layout of the first target control; determining whether it can be displayed in the target expansion area according to the current arrangement and layout; if so, moving the first target control to the target expansion area and displaying the first target control according to the current arrangement and layout, and keeping the position of the second target control in the target control area unchanged.
[0164] After determining whether the target expansion area can be displayed according to the current layout, the above method further includes: if not, determining the target position of the first target control according to the control display rules of the target expansion area; moving the first target control to the target expansion area and displaying the first target control at the corresponding target position, while keeping the position of the second target control unchanged in the target control area.
[0165] The aforementioned preset rules include: the priority of the target control; the step of adjusting the position of the first target control that is obscured and the second target control that is not obscured according to the preset rules includes: obtaining the priority of the first target control and the second target control, and determining whether the priority of the first target control is higher than the priority of the second target control; if yes, determining the second target control to be moved, moving the second target control to be moved to the target expansion area for display, and moving the first target control to the position of the second target control to be moved within the target control area for display; if no, executing the step of obtaining the current arrangement layout of the first target control.
[0166] The above-mentioned determination of the second target control to be moved includes: determining the second target control that is closest to the first target control as the second target control to be moved.
[0167] The step of determining the second target control that is closest to the first target control as the second target control to be moved includes: if the second target control includes multiple sub-controls, selecting the target sub-control that has the same number as the first target control and is closest to it from the multiple sub-controls; and determining the target sub-control as the second target control to be moved.
[0168] The steps for determining a target expansion area in a graphical user interface include: determining the area of the interaction area between the floating window and the target control area, and calculating the ratio of the area of the intersection area to the area of the target control area; if the ratio is less than or equal to a preset threshold, a target expansion area is determined in the graphical user interface.
[0169] The steps for determining the area of the interaction area between the floating window and the target control area include: responding to a movement operation on the floating window, controlling the floating window to move on the graphical user interface, and detecting the area of the intersection area between the floating window and the target control area in real time.
[0170] The steps of determining a target expansion area in a graphical user interface include: determining a first expansion area and a second expansion area preset in the target control area; and determining the expansion area in the first expansion area and the second expansion area that is not obscured by the floating window as the target expansion area.
[0171] The first expansion area is set above or below the target control area; the second expansion area is set to the left or right of the target control area.
[0172] The dimensions of the first and second expansion areas of the target control area are determined by the size of the target expansion area; the width of the first expansion area is the same as the width of the target control area; and the height of the second expansion area is the same as the height of the target control area.
[0173] The above method also includes: if neither the first expansion area nor the second expansion area is obscured by the floating window, the expansion area that is closest to the first target control among the first expansion area and the second expansion area is determined as the target expansion area.
[0174] The above method also includes: adjusting the size of the target control area in response to a size adjustment operation on the target control area, or in response to a specified trigger event; and adjusting the size of the first expansion area and the second expansion area of the target control area according to the adjusted size of the target control area.
[0175] The above method also includes: if the ratio is greater than a preset threshold, determining a target display area from the graphical user interface; if the target display area does not coincide with the control area, displaying a floating window in the target display area.
[0176] The above method also includes: if the target display area coincides with the target control area, determining the preset third expansion area of the target control area, moving the target control in the target control area to the third expansion area, and displaying the target control according to the current arrangement layout.
[0177] The target display area mentioned above is the edge area closest to the target control area.
[0178] After determining a target display area from the graphical user interface if the ratio is greater than a preset threshold, the method further includes: if the size of the floating window is different from the size of the target display area, adjusting the size of the floating window according to the target display area so that the size of the target display area is the same as the size of the floating window.
[0179] The computer program product of the control adjustment method, apparatus and system provided in the embodiments of the present invention includes 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. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0180] 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.
[0181] 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.
[0182] 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 this invention, essentially, or the part that contributes to the prior art, or a portion 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 this 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.
[0183] 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.
[0184] 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 adjusting a control, characterized in that, The method includes providing a graphical user interface (GUI) via a terminal device, the GUI including at least one control area, the control area including at least one target control, the method comprising: In response to displaying a floating window on the graphical user interface, the display position information of the floating window is obtained; Based on the display position information of the floating window and the display position information of the target control in the target control area, the first target control that is obscured by the floating window is determined. Define a target expansion area in the graphical user interface; In the target control area and / or the target expansion area, the first target control is moved into the target expansion area, and the position of the second target control, which is at least partially unobstructed, remains unchanged in the target control area. Alternatively, the positions of the obstructed first target control and the at least partially unobstructed second target control are adjusted according to preset rules so that the first target control and the second target control are not obstructed by the floating window. The preset rules include at least one of the following: the arrangement layout of the target controls, the control display rules of the target expansion area, and the priority of the target controls.
2. The method according to claim 1, characterized in that, The preset rules include: the arrangement and layout of the target controls and the display rules of the controls in the target expansion area; The steps of adjusting the positions of the first target control that is obscured and the second target control that is not obscured according to preset rules include: Get the current layout of the first target control; Determine whether the target expansion area can be displayed according to the current arrangement layout; If so, move the first target control to the target expansion area and display the first target control according to the current arrangement layout, while keeping the position of the second target control unchanged within the target control area.
3. The method according to claim 2, characterized in that, After determining whether the target expansion area can be displayed according to the current arrangement layout, the method further includes: If not, determine the target position of the first target control according to the control display rules of the target expansion area; Move the first target control to the target expansion area and display the first target control at the corresponding target position, while keeping the position of the second target control unchanged within the target control area.
4. The method according to claim 1 or 2, characterized in that, The preset rules include: the priority of the target control; The steps of adjusting the positions of the first target control that is obscured and the second target control that is not obscured according to preset rules include: Obtain the priorities of the first target control and the second target control, and determine whether the priority of the first target control is higher than the priority of the second target control; If so, determine the second target control to be moved, move the second target control to be moved to the target expansion area for display, and move the first target control to the position of the second target control to be moved within the target control area for display of the first target control; If not, proceed with the step of obtaining the current arrangement layout of the first target control.
5. The method according to claim 4, characterized in that, The step of determining the second target control to be moved includes: determining the second target control that is closest to the first target control as the second target control to be moved.
6. The method according to claim 5, characterized in that, The step of determining the second target control that is closest to the first target control as the second target control to be moved includes: If the second target control includes multiple sub-controls, select the target sub-control that has the same number of sub-controls as the first target control and is the closest to it; The target sub-control is identified as the second target control to be moved.
7. The method according to claim 1, characterized in that, The step of determining a target expansion area in the graphical user interface includes: Determine the area of the interaction area between the floating window and the target control area, and calculate the ratio of the area of the interaction area to the area of the target control area; If the ratio is less than or equal to a preset threshold, a target expansion area is determined in the graphical user interface.
8. The method according to claim 7, characterized in that, The step of determining the area of the interaction region between the floating window and the target control area includes: In response to a movement operation on the floating window, the system controls the floating window to move on the graphical user interface and detects the area of the interaction region between the floating window and the target control area in real time.
9. The method according to claim 1 or 7, characterized in that, The step of determining a target expansion area in the graphical user interface includes: Determine the preset first expansion area and second expansion area of the target control area; The expansion areas in the first expansion area and the second expansion area that are not obscured by the floating window are determined as the target expansion area.
10. The method according to claim 9, characterized in that, The first expansion area is located above or below the target control area; the second expansion area is located to the left or right of the target control area.
11. The method according to claim 9, characterized in that, The dimensions of the first and second expansion areas of the target control area are determined by the size of the target expansion area; the width of the first expansion area is the same as the width of the target control area; and the height of the second expansion area is the same as the height of the target control area.
12. The method according to claim 9, characterized in that, The method further includes: If neither the first expansion area nor the second expansion area is obscured by the floating window, the expansion area that is closest to the first target control among the first expansion area and the second expansion area is determined as the target expansion area.
13. The method according to claim 9, characterized in that, The method further includes: The size of the target control area is adjusted in response to a size adjustment operation on the target control area or in response to a specified trigger event. Based on the adjusted size of the target control area, adjust the size of the preset first expansion area and second expansion area of the target control area.
14. The method according to claim 7, characterized in that, The method further includes: If the ratio is greater than the preset threshold, a target display area is determined from the graphical user interface; If the target display area does not overlap with the control area, the floating window is displayed in the target display area.
15. The method according to claim 14, characterized in that, The method further includes: If the target display area coincides with the target control area, a preset third expansion area is determined for the target control area, the target control in the target control area is moved to the third expansion area, and the target control is displayed according to the current arrangement layout.
16. The method according to claim 14, characterized in that, The target display area is the edge area closest to the target control area.
17. The method according to claim 14, characterized in that, If the ratio is greater than the preset threshold, after the step of determining a target display area from the graphical user interface, the method further includes: if the size of the floating window is different from the size of the target display area, adjusting the size of the floating window according to the target display area so that the target display area is the same size as the floating window.
18. An adjustment device for a control, characterized in that, A graphical user interface is provided via a terminal device, the graphical user interface including at least one control area, the control area including at least one target control, the device comprising: The display position information acquisition module is used to acquire the display position information of the floating window in response to the display of a floating window on the graphical user interface; The first target control determination module is used to determine the first target control that is obscured by the floating window based on the display position information of the floating window and the display position information of the target control in the target control area; The target expansion area determination module is used to determine a target expansion area in the graphical user interface; A position adjustment module is configured to move the first target control to the target expansion area within the target control area and / or the target expansion area, control the position of the second target control that is at least partially unobstructed within the target control area to remain unchanged, or adjust the positions of the obstructed first target control and the at least partially unobstructed second target control according to preset rules so that the first target control and the second target control are not obstructed by the floating window; wherein the preset rules include at least one of the following: the arrangement layout of the target controls, the control display rules of the target expansion area, and the priority of the target controls.
19. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the control adjustment method according to any one of claims 1-17.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the control adjustment method according to any one of claims 1-17.
Citation Information
Patent Citations
Method and device for adjusting shielded or mistakenly touched control
CN110750186A
Control display method and electronic equipment
CN111309418A