Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
Fig. 1 is a schematic flowchart of a picture button association method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
101. and determining the button operation object clicked by the mouse as the button to be associated.
In an actual application scenario, a user may select a button to be associated by clicking a mouse. Taking the left button of the mouse clicked by the user as an example, assuming that the user selects an object by clicking the left button of the mouse, detecting whether the object is a button, and if so, determining the button clicked by the mouse as a button to be associated. In particular, the identity of the selected button may be cached for subsequent use.
102. And if the mouse click is detected to be a dragging operation, detecting the current state of the operation key clicked by the mouse in real time until the operation key clicked by the mouse is detected to bounce.
The dragging operation can be generally used for indicating that a user continuously presses an operation key of the mouse while moving the mouse; the mouse bounce generally refers to the bounce of an operation key clicked by the mouse. For example, if the operation key clicked by the mouse is the left key of the mouse, correspondingly, after the user selects the button to be associated, if it is detected that the user clicks the left key of the mouse to move, the current state of the left key of the mouse starts to be acquired in real time until the left key of the mouse is detected to bounce, that is, the user does not press the left key of the mouse any more.
In practical applications, after 101, if it is detected that a mouse click is not performed but another operation is performed, for example, another object is clicked, the currently determined button to be associated is cancelled, specifically, the currently cached button identifier may be deleted, and 101 may be re-executed to re-determine the button to be associated.
Optionally, as an implementable manner in this embodiment, after detecting that the mouse click is a drag operation in 102, the method may further include:
and acquiring the current position of the cursor of the mouse in real time, and displaying a connecting line from the button to be associated to the cursor of the mouse to indicate that the mouse is currently in the association process.
Through the implementation mode, the connecting line from the button to be associated to the cursor of the mouse can be drawn in the mouse dragging process, so that a user can intuitively know that the user is currently in the association process.
Optionally, as another implementable manner of this embodiment, in any of the foregoing implementations, before the detecting that the mouse click is a drag operation in 102, the method may further include: displaying a corresponding picture in a home page area in each preset area;
correspondingly, after detecting that the mouse click is a drag operation, the method may further include: and detecting whether the current area of the cursor of the mouse is the home page area or not in real time, and if so, respectively displaying the pictures corresponding to the areas in the areas.
The first page area may be set as any one of the areas. In order to understand the embodiment more intuitively, for example, when the mouse is not dragged, the pictures may be displayed in an overlapped presentation manner, that is, only one picture is displayed as a home page of the overlapped pictures, and each small picture below the home page picture corresponds to each button; next, when the cursor of the mouse is dragged to the top image, the presentation mode of each image is changed, that is, the mode is switched from the overlapping mode to the mode of displaying each image. More specifically, the first picture may be taken as the first picture, the pictures are sequentially ordered, and from the second picture, the corresponding portion of the current picture is displayed in a region corresponding to a right edge of the previous picture shifted by a certain ratio of the width thereof (for example, the ratio is set to 20%, and this embodiment does not limit this).
Further, in this embodiment, after detecting that the mouse click is a drag operation, the method may further include: detecting whether a picture is corresponding to an area where a cursor of the mouse is located currently or not in real time, wherein the picture is in a display state currently, and if so, setting a display mode of the cursor of the mouse to be a preset associable display mode.
Specifically, the associable display mode may be implemented by setting a display shape of a mouse cursor, or may be implemented by setting a display state of the mouse cursor, which is not limited in this embodiment. For example, when the cursor of the mouse is currently located in an area corresponding to a displayed picture, the shape of the cursor of the mouse is switched to a cross shape, or the display state of the cursor of the mouse may be switched to a blinking display without changing the shape of the mouse.
Through the embodiment, the display mode of the cursor of the mouse and the presentation mode of the picture can be dynamically switched according to the area where the cursor of the mouse is located, so that the association process of the button and the picture is more dynamic and visual.
103. And taking a picture corresponding to the area where the cursor of the mouse is located when the operation key clicked by the mouse is bounced as a picture to be associated, and associating the picture to be associated with the button to be associated.
In practical applications, the button to be associated or the picture to be associated selected by the user may be in an associated state, that is, the button to be associated or the picture to be associated is currently associated with a certain picture or button, and therefore, in order to prevent a wrong association caused by a wrong operation by the user, in any of the above embodiments, the method may further include:
and if the button operation object is associated with the picture, displaying a connecting line from the button operation object to the picture corresponding to the home page area to indicate that the current button is associated.
Similarly, in any of the above embodiments, before associating the to-be-associated picture with the to-be-associated button in 103, the method may further include: detecting whether the picture to be associated is associated with other buttons or not, if so, displaying a prompt box to indicate that the picture to be associated is associated;
correspondingly, the associating the to-be-associated picture with the to-be-associated button in 103 may specifically include: and if a confirmation instruction selected by the user according to the prompt box is received, replacing the button associated with the picture to be associated with the button to be associated.
Through the two implementation modes, the error association caused by the misoperation of the user can be effectively avoided, and the accuracy of the association is improved.
According to the picture button association method provided by the embodiment, the button to be associated and the picture to be associated are determined by detecting the operation state of the mouse by the user, and the button to be associated and the picture to be associated are associated, so that the association of the button and the picture can be conveniently and visually realized, the wrong association caused by the misoperation can be effectively avoided, and the association accuracy is improved.
Fig. 2 is a schematic structural diagram of a picture button association apparatus according to a second embodiment of the present invention, as shown in fig. 2, the apparatus includes: a processing module 21, a detection module 22 and an association module 23; wherein,
the processing module 21 is configured to determine a button operation object clicked by a mouse as a button to be associated;
the detection module 22 is configured to detect a current state of an operation key clicked by the mouse in real time if it is detected that the mouse click is a drag operation, until it is detected that the operation key clicked by the mouse bounces;
the association module 23 is configured to use a picture corresponding to a region where a cursor of the mouse is located when the operation key clicked by the mouse is popped up as a picture to be associated, and associate the picture to be associated with the button to be associated.
Optionally, in order to enable the user to intuitively know that the user is currently in the association process, the connection line from the button to be associated to the cursor of the mouse may be drawn in the mouse dragging process, and accordingly, as an implementable manner of this embodiment, the apparatus may further include:
and the display module is used for acquiring the current position of the cursor of the mouse in real time and displaying a connecting line from the button to be associated to the cursor of the mouse after the detection module detects that the mouse click is a dragging operation so as to indicate that the mouse is currently in the association process.
Optionally, as another implementable manner of this embodiment, in any of the foregoing implementations, the display module may be further configured to display a corresponding picture in a home page area in preset areas before the detection module detects that the mouse click is a drag operation; the display module may be further configured to detect whether an area where a cursor of the mouse is currently located is the home page area in real time after the detection module detects that the mouse click is a drag operation, and if so, display pictures corresponding to the areas in the areas respectively.
Further, in this embodiment, the display module may be further configured to detect whether a picture corresponds to a current region of the cursor of the mouse after the detection module detects that the mouse click is a drag operation, where the picture is currently in a display state, and if so, set the display mode of the cursor of the mouse to a preset associable display mode.
Through the embodiment, the display mode of the cursor of the mouse and the presentation mode of the picture can be dynamically switched according to the area where the cursor of the mouse is located, so that the association process of the button and the picture is more dynamic and visual.
In an actual application, in order to prevent a user from being associated incorrectly due to a wrong operation, in any of the above embodiments, the display module may be further configured to display a connection line from the button operation object to the picture corresponding to the home page area to indicate that the current button is associated if the button operation object is associated with the picture.
Similarly, in any of the above embodiments, the display module is further configured to detect whether the picture to be associated is currently associated with another button before the association module 23 associates the picture to be associated with the button to be associated, and if so, display a prompt box to indicate that the picture to be associated is associated; the association module 23 is specifically configured to replace the button associated with the picture to be associated with the button to be associated if a confirmation instruction selected by the user according to the prompt box is received.
Through the two implementation modes, the error association caused by the misoperation of the user can be effectively avoided, and the accuracy of the association is improved.
According to the picture button association device provided by the embodiment, the button to be associated and the picture to be associated are determined by detecting the operation state of the mouse by the user, and the button to be associated and the picture to be associated are associated, so that the association of the button and the picture can be conveniently and visually realized, the wrong association caused by the misoperation can be effectively avoided, and the association accuracy is improved.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.