CN113476822B - Touch method and device - Google Patents
Touch method and device Download PDFInfo
- Publication number
- CN113476822B CN113476822B CN202110654261.5A CN202110654261A CN113476822B CN 113476822 B CN113476822 B CN 113476822B CN 202110654261 A CN202110654261 A CN 202110654261A CN 113476822 B CN113476822 B CN 113476822B
- Authority
- CN
- China
- Prior art keywords
- touch
- control
- sliding
- operation area
- compass
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/20—Input arrangements for video game devices
- A63F13/21—Input arrangements for video game devices characterised by their sensors, purposes or types
- A63F13/214—Input arrangements for video game devices characterised by their sensors, purposes or types for locating contacts on a surface, e.g. floor mats or touch pads
- A63F13/2145—Input arrangements for video game devices characterised by their sensors, purposes or types for locating contacts on a surface, e.g. floor mats or touch pads the surface being also a display device, e.g. touch screens
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/20—Input arrangements for video game devices
- A63F13/22—Setup operations, e.g. calibration, key configuration or button assignment
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/40—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
- A63F13/42—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
- A63F13/426—Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle involving on-screen location information, e.g. screen coordinates of an area at which the player is aiming with a light gun
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F2300/00—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
- A63F2300/10—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals
- A63F2300/1068—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals being specially adapted to detect the point of contact of the player on a surface, e.g. floor mat, touch pad
- A63F2300/1075—Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game characterized by input arrangements for converting player-generated signals into game device control signals being specially adapted to detect the point of contact of the player on a surface, e.g. floor mat, touch pad using a touch screen
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Human Computer Interaction (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
技术领域technical field
本申请实施例涉及触控领域,尤其涉及一种触控方法及设备。The embodiments of the present application relate to the field of touch control, and in particular, to a touch control method and device.
背景技术Background technique
目前很多手机游戏中都会设置移动罗盘(或称为移动轮盘),在用户使用手机游玩游戏时,用户可以通过设置的移动罗盘来控制游戏中的人物进行移动。例如,如图1所示,移动罗盘可以是由两个圆组成,其中半径相对较大的圆所在区域定义出了用户可操作的区域(即罗盘操作区域),半径相对较小的圆作为罗盘控件,用户可以通过触摸拖动的方式在该半径相对较大的圆内拖动半径相对较小的圆,从而控制游戏中的人物按照相应的方向进行移动。即用户可以在罗盘操作区域内拖动罗盘控件以控制游戏中的人物按照相应的方向进行移动。At present, a mobile compass (or a mobile roulette) is set in many mobile games. When a user uses a mobile phone to play a game, the user can control the characters in the game to move through the set mobile compass. For example, as shown in Figure 1, the mobile compass can be composed of two circles, where the area of the circle with a relatively large radius defines the area where the user can operate (ie the compass operation area), and the circle with a relatively small radius is used as the compass Controls, the user can drag a circle with a relatively small radius within the circle with a relatively large radius by touching and dragging, so as to control the characters in the game to move in the corresponding direction. That is, the user can drag the compass control in the compass operation area to control the characters in the game to move in the corresponding direction.
通常用户在罗盘操作区域内拖动罗盘控件后,罗盘控件初始位置(或称为默认位置)指向罗盘控件当前位置的方向即为游戏中人物移动的方向。因此,当用户需要控制游戏人物折返移动时,用户可以在罗盘操作区域内拖动罗盘控件向相反的方向移动(即折返拖动)。但是,由于罗盘操作区域通常较小,在拖动罗盘控件时用户的手指经常会滑出罗盘操作区域。此时,若用户需要拖动罗盘控件向相反的方向移动,则手指需向相反方向滑动一定距离进入到罗盘操作区域内后才能够拖动罗盘控件。从而导致用户向相反方向滑动手指以拖动罗盘控件控制游戏人物折返移动时,罗盘控件的移动会存在延迟,进而导致游戏人物移动的控制存在延迟。Usually, after the user drags the compass control in the compass operation area, the direction in which the initial position of the compass control (or the default position) points to the current position of the compass control is the direction in which the characters move in the game. Therefore, when the user needs to control the game character to move back and forth, the user can drag the compass control in the compass operation area to move in the opposite direction (ie, turn back and drag). However, since the compass operating area is usually small, the user's finger often slides out of the compass operating area when dragging the compass control. At this time, if the user needs to drag the compass control to move in the opposite direction, the finger needs to slide a certain distance in the opposite direction and enter the compass operation area before dragging the compass control. As a result, when the user slides a finger in the opposite direction to drag the compass control to control the re-entry movement of the game character, the movement of the compass control will be delayed, which in turn causes a delay in the control of the movement of the game character.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种触控方法及设备,解决了用户在移动罗盘的罗盘操作区域外朝向移动罗盘折返滑动时,移动罗盘的罗盘控件移动存在延迟的问题。The embodiments of the present application provide a touch control method and device, which solve the problem of delay in the movement of the compass control of the mobile compass when the user slides back and forth toward the mobile compass outside the compass operation area of the mobile compass.
为了达到上述目的,本申请实施例采用如下技术方案:In order to achieve the above purpose, the embodiment of the present application adopts the following technical solutions:
第一方面,本申请实施例提供一种触控方法,该方法可以应用于电子设备。该方法包括:电子设备可以显示第一界面,第一界面包括控制操作区域以及位于控制操作区域内的滑动控件,滑动控件用于在控制操作区域内移动以控制被控制对象移动;检测到触控介质由控制操作区域内沿第一方向滑动至控制操作区域外的第一操作,控制滑动控件沿第一方向移动至控制操作区域的边界的第一位置;检测到触控介质在控制操作区域外由第一方向滑动改变方向以第二方向滑动的第二操作,控制滑动控件在控制操作区域内沿第二方向移动;其中,触控介质沿第二方向滑动的路径的延长线与控制操作区域相交。In a first aspect, an embodiment of the present application provides a touch control method, which can be applied to an electronic device. The method includes: the electronic device can display a first interface, the first interface includes a control operation area and a sliding control located in the control operation area, the sliding control is used to move in the control operation area to control the movement of the controlled object; touch detection is detected The medium is slid from the control operation area along the first direction to the first operation outside the control operation area, and the sliding control is controlled to move along the first direction to the first position of the boundary of the control operation area; it is detected that the touch medium is outside the control operation area The second operation of sliding in the second direction by changing the direction of sliding in the first direction controls the sliding control to move in the second direction in the control operation area; wherein, the extension line of the path of the touch medium sliding in the second direction and the control operation area intersect.
采用上述技术方案,当用户需要通过触控介质(如,手指或触控笔)拖动滑动控件来控制被控制对象折返移动时,即使触控介质改变滑动方向进行折返滑动时没有在控制操作区域内,滑动控件也能够按照触控介质折返滑动的方向进行移动,以控制被控制对象相应移动。从而避免用户拖动滑动控件时,由于触控介质没有在控制操作区域内而需滑动一定距离待触控介质进入到控制操控区域后才能拖动滑动控件。降低了此时用户拖动滑动控件时的延迟,进而降低用户控制被控对象时的延迟。With the above technical solution, when the user needs to drag the sliding control through a touch medium (such as a finger or a stylus) to control the controlled object to move back and forth, even if the touch medium changes the sliding direction to perform the folding back and slide, it is not in the control operation area. Inside, the slide control can also move according to the direction of the touch media return and slide, so as to control the controlled object to move accordingly. Therefore, when the user drags the sliding control, since the touch medium is not in the control operation area, it is necessary to slide a certain distance until the touch medium enters the control operation area before dragging the sliding control. The delay when the user drags the sliding control at this time is reduced, thereby reducing the delay when the user controls the controlled object.
在一种可能的实现方式中,在检测到触控介质在控制操作区域外由第一方向滑动改变方向以第二方向滑动的第二操作,滑动控件在控制操作区域内沿第二方向移动之后,方法还包括:检测到触控介质在控制操作区域外由第二方向滑动改变方向以第三方向滑动的第三操作,控制滑动控件移动至第二位置,第二位置为触控介质以第三方向滑动中的触控位置和滑动控件的默认位置间的连线与控制操作区域边界的交点;其中,触控介质沿第三方向滑动的路径的延长线与控制操作区域不相交。In a possible implementation manner, after detecting a second operation of sliding the touch medium in the first direction to change the direction and sliding in the second direction outside the control operation area, after the sliding control moves in the second direction in the control operation area , the method further includes: detecting a third operation of sliding the touch medium in a second direction to change the direction and sliding in a third direction outside the control operation area, and controlling the sliding control to move to a second position, where the second position is the touch medium with the first The intersection of the line between the touch position in the three-direction sliding and the default position of the sliding control and the boundary of the control operation area; wherein, the extension line of the path of the touch medium sliding along the third direction does not intersect with the control operation area.
如此,当用户通过触控介质在控制操作区域外朝向控制操作区域滑动,且还没滑动进入到控制操作区域用户又朝向远离控制操作区域的方向滑动触控介质时,电子设备可以不再根据用户的触控操作进行预报点而是直接根据用户当前滑动时的触控报点来控制滑动控件。从而进一步提高滑动控件的跟手性。In this way, when the user slides the touch medium out of the control operation area toward the control operation area, and the user slides the touch medium in the direction away from the control operation area before sliding into the control operation area, the electronic device can The touch operation is used to predict the point, but the sliding control is directly controlled according to the touch report point when the user is currently sliding. Thereby, the follow chirality of the sliding control is further improved.
在另一种可能的实现方式中,方法还包括:控制被控制对象沿滑动控件的默认位置指向滑动控件所处位置的方向移动。In another possible implementation manner, the method further includes: controlling the controlled object to move in a direction from the default position of the sliding control to the position where the sliding control is located.
如此,用户能够便捷的通过拖动滑动控件以控制被控制对象移动。In this way, the user can conveniently control the movement of the controlled object by dragging the sliding control.
在另一种可能的实现方式中,滑动控件沿第一方向移动至控制操作区域的边界的第一位置,包括:根据第一操作过程中触控介质对应的触控报点控制滑动控件沿第一方向随触控介质滑动至控制操作区域的边界的第一位置。In another possible implementation manner, moving the sliding control to a first position on the boundary of the control operation area along the first direction includes: controlling the sliding control along the first position according to the touch point corresponding to the touch medium during the first operation One direction slides with the touch medium to the first position of the boundary of the control operation area.
使滑动控件根据用户触控操作过程中的触控报点来移动,能够使滑动控件的移动与触控介质的移动同步,使滑动控件的移动更加具有跟手性。The sliding control is moved according to the touch point reported during the user's touch operation, so that the movement of the sliding control can be synchronized with the movement of the touch medium, and the movement of the sliding control is more chirality.
在另一种可能的实现方式中,控制滑动控件在控制操作区域内沿第二方向移动,包括:根据第二操作过程中触控介质对应的触控报点确定触控介质在控制操作区域外由第一方向滑动改变方向以第二方向滑动;根据第二操作过程中触控介质对应的触控报点在控制操作区域内沿第二方向生成预报点;根据预报点控制滑动控件在控制操作区域内沿第二方向移动。In another possible implementation manner, controlling the sliding control to move along the second direction in the control operation area includes: determining that the touch medium is outside the control operation area according to the touch point corresponding to the touch medium during the second operation Change the direction by sliding in the first direction and slide in the second direction; according to the touch report point corresponding to the touch medium in the second operation process, a forecast point is generated in the control operation area along the second direction; according to the forecast point, the sliding control is controlled in the control operation move in the second direction within the area.
根据触控介质相应的触控报点来生成预报点,能够使预报点的生成与触控报点相对应,然后再根据预报点来控制滑动控件,从而能够使触控介质还没有滑动到控制操作区域内时滑动控件便能够沿触控介质滑动的方向随触控介质的滑动而移动,降低用户控制滑动控件的延时。The forecast point is generated according to the corresponding touch point of the touch medium, so that the generation of the forecast point corresponds to the touch point, and then the sliding control is controlled according to the forecast point, so that the touch medium has not yet been slid to the control point. When the sliding control is in the operation area, the sliding control can move along the sliding direction of the touch medium along with the sliding of the touch medium, thereby reducing the delay time for the user to control the sliding control.
在另一种可能的实现方式中,在控制操作区域外设置有预判区域;第二操作为触控介质在预判区域内由第一方向滑动改变方向以第二方向滑动;根据第二操作过程中对应的触控报点确定触控介质在控制操作区域外由第一方向滑动改变方向以第二方向滑动,包括:根据第二操作过程中对应的触控报点确定触控介质在预判区域内由第一方向滑动改变方向以第二方向滑动。In another possible implementation manner, a pre-judgment area is set outside the control operation area; the second operation is to slide the touch medium in the pre-judgment area by sliding in the first direction to change the direction and slide in the second direction; according to the second operation Corresponding touch reporting points in the process determine that the touch medium is slid in the first direction to change the direction to slide in the second direction outside the control operation area, including: determining, according to the corresponding touch reporting points in the second operation process, that the touch medium is in the pre-control operation. Change the direction by sliding in the first direction and slide in the second direction in the judgment area.
通过设置预判区域,能够避免对所有触控区域内的触控介质的操作进行监控,降低运算压力。并且,能够避免用户在控制操作区域外进行其他操作时出现误判。By setting the pre-judgment area, it is possible to avoid monitoring the operation of the touch medium in all the touch areas, and reduce the computing pressure. In addition, it can avoid misjudgment when the user performs other operations outside the control operation area.
在另一种可能的实现方式中,预判区域为预先设置的,或,预判区域为根据触控介质在控制操作区域所处位置的预设区域范围内的历史触控操作生成的。In another possible implementation manner, the pre-judgment area is preset, or the pre-judgment area is generated according to historical touch operations of the touch medium within the range of the preset area where the control operation area is located.
在另一种可能的实现方式中,在根据预报点控制滑动控件在控制操作区域内沿第二方向移动之后,方法还包括:在触控介质沿第二方向滑动至控制操作区域内的情况下,根据触控介质对应的触控报点控制滑动控件随触控介质在控制操作区域内沿第二方向滑动。In another possible implementation manner, after controlling the sliding control to move along the second direction within the control operation area according to the forecast point, the method further includes: when the touch medium slides into the control operation area along the second direction , and control the sliding control to slide along the second direction in the control operation area with the touch medium according to the touch report point corresponding to the touch medium.
如此,当用户通过触控介质朝向控制操作区域滑动的过程中,在触控介质还没有滑动到控制操作区域内时,滑动控件可以根据预报点进行移动,而当触控介质滑动到控制操作区域内时,滑动控件则可以根据此时触控介质的实际触控报点进行移动。从而,能够使用户通过触控介质滑动到控制操作区域内时,滑动控件可以更准确的被用户拖动控制。In this way, when the user slides toward the control operation area through the touch medium, before the touch medium slides into the control operation area, the sliding control can move according to the forecast point, and when the touch medium slides into the control operation area When inside, the sliding control can move according to the actual touch point of the touch medium at this time. Therefore, when the user slides into the control operation area through the touch medium, the sliding control can be more accurately dragged and controlled by the user.
在另一种可能的实现方式中,控制滑动控件滑动至第二位置,包括:根据第三操作过程中触控介质对应的触控报点确定触控介质在控制操作区域外由第二方向滑动改变方向以第三方向滑动;控制滑动控件滑动至第二位置。In another possible implementation manner, controlling the sliding control to slide to the second position includes: determining that the touch medium slides in the second direction outside the control operation area according to the touch point corresponding to the touch medium in the third operation process Change direction to slide in a third direction; control the slide control to slide to the second position.
在另一种可能的实现方式中,第一界面包括游戏界面,控制操作区域包括罗盘操作区域,滑动控件包括罗盘控件,被控制对象包括游戏界面中的游戏角色。In another possible implementation manner, the first interface includes a game interface, the control operation area includes a compass operation area, the sliding control includes a compass control, and the controlled object includes a game character in the game interface.
在另一种可能的实现方式中,触控介质包括触控笔、用户的手指等。In another possible implementation manner, the touch medium includes a stylus, a user's finger, and the like.
第二方面,本申请实施例提供一种触控装置,该装置可以应用于电子设备,用于实现上述第一方面中的方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块,例如,显示模块和处理模块等。In a second aspect, an embodiment of the present application provides a touch control device, which can be applied to an electronic device and used to implement the method in the above-mentioned first aspect. The functions of the apparatus may be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions, for example, a display module and a processing module.
其中,显示模块,可以用于显示第一界面,第一界面包括控制操作区域以及位于控制操作区域内的滑动控件,滑动控件用于在控制操作区域内移动以控制被控制对象移动;处理模块,可以用于检测到触控介质由控制操作区域内沿第一方向滑动至控制操作区域外的第一操作,控制滑动控件沿第一方向移动至控制操作区域的边界的第一位置;检测到触控介质在控制操作区域外由第一方向滑动改变方向以第二方向滑动的第二操作,控制滑动控件在控制操作区域内沿第二方向移动;其中,触控介质沿第二方向滑动的路径的延长线与控制操作区域相交。The display module can be used to display a first interface, the first interface includes a control operation area and a sliding control located in the control operation area, and the sliding control is used to move in the control operation area to control the movement of the controlled object; the processing module, It can be used to detect the first operation in which the touch medium is slid from the control operation area along the first direction to the outside of the control operation area, and control the sliding control to move along the first direction to the first position of the boundary of the control operation area; The control medium slides in the first direction outside the control operation area to change the direction and slides in the second direction, and the control slide control moves along the second direction in the control operation area; wherein, the path of the touch medium sliding along the second direction The extension line intersects the control operation area.
在一种可能的实现方式中,处理模块,还可以用于检测到触控介质在控制操作区域外由第二方向滑动改变方向以第三方向滑动的第三操作,控制滑动控件移动至第二位置,第二位置为触控介质的触控位置与滑动控件的默认位置间连线与控制操作区域边界的交点;其中,触控介质沿第三方向滑动的路径的延长线与控制操作区域不相交。In a possible implementation manner, the processing module may also be configured to detect a third operation of sliding the touch medium outside the control operation area by sliding in the second direction to change the direction in the third direction, and control the sliding control to move to the second The second position is the intersection of the line connecting the touch position of the touch medium and the default position of the sliding control and the boundary of the control operation area; wherein, the extension line of the path of the touch medium sliding along the third direction is not the same as the control operation area. intersect.
在另一种可能的实现方式中,处理模块,还可以用于控制被控制对象沿滑动控件的默认位置指向滑动控件所处位置的方向移动。In another possible implementation manner, the processing module may also be used to control the controlled object to move in a direction from the default position of the sliding control to the position where the sliding control is located.
在另一种可能的实现方式中,处理模块,具体用于根据第一操作过程中触控介质对应的触控报点控制滑动控件沿第一方向随触控介质滑动至控制操作区域的边界的第一位置。In another possible implementation manner, the processing module is specifically configured to control the sliding control to slide along the first direction with the touch medium to the boundary of the control operation area according to the touch report point corresponding to the touch medium in the first operation process. first position.
在另一种可能的实现方式中,处理模块,具体用于根据第二操作过程中触控介质对应的触控报点确定触控介质在控制操作区域外由第一方向滑动改变方向以第二方向滑动;根据第二操作过程中触控介质对应的触控报点在控制操作区域内沿第二方向生成预报点;根据预报点控制滑动控件在控制操作区域内沿第二方向移动。In another possible implementation manner, the processing module is specifically configured to determine, according to the touch report point corresponding to the touch medium in the second operation process, that the touch medium is slid in the first direction to change the direction outside the control operation area to change the direction in the second operation. direction sliding; generating forecast points along the second direction in the control operation area according to the touch report points corresponding to the touch medium during the second operation; controlling the sliding controls to move along the second direction within the control operation area according to the forecast points.
在另一种可能的实现方式中,在控制操作区域外设置有预判区域;第二操作为触控介质在预判区域内由第一方向滑动改变方向以第二方向滑动;处理模块,具体用于根据第二操作过程中对应的触控报点确定触控介质在预判区域内由第一方向滑动改变方向以第二方向滑动。In another possible implementation manner, a pre-judgment area is set outside the control operation area; the second operation is to slide the touch medium in the pre-judgment area by sliding in the first direction to change the direction and slide in the second direction; the processing module, specifically It is used to determine, according to the corresponding touch reporting points in the second operation process, that the touch medium is slid in the pre-judgment area by changing the direction in the first direction and sliding in the second direction.
在另一种可能的实现方式中,预判区域为预先设置的,或,预判区域为根据触控介质在控制操作区域所处位置的预设区域范围内的历史触控操作生成的。In another possible implementation manner, the pre-judgment area is preset, or the pre-judgment area is generated according to historical touch operations of the touch medium within the range of the preset area where the control operation area is located.
在另一种可能的实现方式中,处理模块,还可以用于在触控介质沿第二方向滑动至控制操作区域内的情况下,根据触控介质对应的触控报点控制滑动控件随触控介质在控制操作区域内沿第二方向滑动。In another possible implementation manner, the processing module can also be used to control the sliding control to follow the touch according to the touch point corresponding to the touch medium when the touch medium slides into the control operation area along the second direction. The control medium slides in the second direction within the control operation area.
在另一种可能的实现方式中,处理模块,具体用于根据第三操作过程中触控介质对应的触控报点确定触控介质在控制操作区域外由第二方向滑动改变方向以第三方向滑动;控制滑动控件滑动至第二位置。In another possible implementation manner, the processing module is specifically configured to determine, according to the touch report point corresponding to the touch medium in the third operation process, that the touch medium is slid in the second direction to change the direction outside the control operation area to change the direction in the third operation. Direction slide; control slide control slide to second position.
在另一种可能的实现方式中,第一界面包括游戏界面,控制操作区域包括罗盘操作区域,滑动控件包括罗盘控件,被控制对象包括游戏界面中的游戏角色。In another possible implementation manner, the first interface includes a game interface, the control operation area includes a compass operation area, the sliding control includes a compass control, and the controlled object includes a game character in the game interface.
在另一种可能的实现方式中,触控介质包括触控笔、用户的手指等。In another possible implementation manner, the touch medium includes a stylus, a user's finger, and the like.
第三方面,本申请实施例提供一种电子设备,包括:处理器,用于存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的触控方法。In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, and a memory for storing instructions executable by the processor. When the processor is configured to execute the above instructions, the electronic device implements the touch control method according to any one of the first aspect or possible implementation manners of the first aspect.
第四方面,本申请实施例提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的触控方法。In a fourth aspect, embodiments of the present application provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by the electronic device, the electronic device is made to implement the touch control method according to any one of the first aspect or possible implementation manners of the first aspect.
第五方面,本申请实施例提供一种计算机程序产品,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,使得电子设备实现如第一方面或第一方面的可能的实现方式中任一项所述的触控方法。In a fifth aspect, embodiments of the present application provide a computer program product, comprising computer-readable codes, when the computer-readable codes are executed in an electronic device, the electronic device enables the electronic device to implement the first aspect or the possibility of the first aspect The touch control method described in any one of the implementation manners is implemented.
应当理解的是,上述第二方面至第五方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It should be understood that, for the beneficial effects of the foregoing second aspect to the fifth aspect, reference may be made to the relevant descriptions in the foregoing first aspect, and details are not described herein again.
附图说明Description of drawings
图1为相关技术提供的一种移动罗盘的组成示意图;1 is a schematic diagram of the composition of a mobile compass provided by the related art;
图2为相关技术提供的一种采用移动罗盘控制游戏人物的场景示意图;Fig. 2 is a kind of scene schematic diagram that adopts the mobile compass to control the game character provided by the related art;
图3为相关技术提供的另一种采用移动罗盘控制游戏人物的场景示意图;Fig. 3 is another kind of scene schematic diagram that adopts the mobile compass to control the game character provided by the related art;
图4为相关技术提供的一种用户触控操作时的触控报点的位置示意图;FIG. 4 is a schematic diagram of the position of a touch reporting point during a user touch operation provided by the related art;
图5为本申请实施例提供的一种电子设备的组成示意图;FIG. 5 is a schematic diagram of the composition of an electronic device provided by an embodiment of the present application;
图6为本申请实施例提供的一种电子设备的软件架构的简化示意图;6 is a simplified schematic diagram of a software architecture of an electronic device according to an embodiment of the present application;
图7为本申请实施例提供的一种预判区域的位置示意图;FIG. 7 is a schematic diagram of the location of a pre-judgment area provided by an embodiment of the present application;
图8为本申请实施例提供的一种触控轨迹的位置示意图;FIG. 8 is a schematic position diagram of a touch track provided by an embodiment of the present application;
图9为本申请实施例提供的另一种预判区域的位置示意图;FIG. 9 is a schematic diagram of the location of another pre-judgment area provided by an embodiment of the present application;
图10为本申请实施例提供的一种触控方法的流程示意图;FIG. 10 is a schematic flowchart of a touch control method provided by an embodiment of the present application;
图11为本申请实施例提供的一种触控方法应用时的界面示意图;11 is a schematic diagram of an interface when a touch control method provided by an embodiment of the present application is applied;
图12为本申请实施例提供的一种触控方法应用时的场景示意图;FIG. 12 is a schematic diagram of a scene when a touch control method provided by an embodiment of the present application is applied;
图13为本申请实施例提供的一种用户触控操作时的触控报点的位置示意图;FIG. 13 is a schematic diagram of the position of a touch reporting point when a user touches a touch operation according to an embodiment of the present application;
图14为本申请实施例提供的一种预报点和触控报点的位置示意图;FIG. 14 is a schematic diagram of the positions of a forecast point and a touch point forecast point according to an embodiment of the present application;
图15为本申请实施例提供的另一种预报点和触控报点的位置示意图;FIG. 15 is a schematic diagram of the positions of another forecast point and a touch forecast point provided by an embodiment of the present application;
图16为本申请实施例提供的另一种预报点和触控报点的位置示意图;FIG. 16 is a schematic diagram of the positions of another forecast point and a touch point forecast point provided by an embodiment of the present application;
图17为本申请实施例提供的另一种触控方法应用时的场景示意图;FIG. 17 is a schematic diagram of a scene when another touch control method provided by an embodiment of the present application is applied;
图18为本申请实施例提供的另一种预报点和触控报点的位置示意图;FIG. 18 is a schematic diagram of the positions of another forecast point and a touch forecast point provided by an embodiment of the present application;
图19为本申请实施例提供的一种触控装置的结构示意图。FIG. 19 is a schematic structural diagram of a touch device according to an embodiment of the present application.
具体实施方式Detailed ways
随着电子设备的不断发展,目前很多电子设备都具有触控功能(例如,手机、平板等具有触摸屏的电子设备)。以电子设备为手机为例,目前手机中很多游戏应用程序都会设置移动罗盘,以使用户通过移动罗盘来控制游戏中的人物进行移动。例如,如图1所示,移动罗盘可以是由两个同心圆组成,其中半径相对较大的圆所在区域定义出了用户可操作的区域(即罗盘操作区域101),半径相对较小的圆作为罗盘控件102,用户可以通过触摸拖动的方式在该半径相对较大的圆内拖动半径相对较小的圆,从而控制游戏中的人物按照相应的方向进行移动。即用户可以在罗盘操作区域101内拖动罗盘控件102以控制游戏中的人物按照相应的方向进行移动。With the continuous development of electronic devices, many electronic devices currently have a touch function (for example, electronic devices with touch screens such as mobile phones and tablets). Taking the electronic device as a mobile phone as an example, many game applications in the mobile phone currently set a mobile compass, so that the user can control the characters in the game to move through the mobile compass. For example, as shown in FIG. 1 , the moving compass may be composed of two concentric circles, wherein the area of the circle with a relatively large radius defines the area that the user can operate (ie the compass operation area 101 ), and the circle with a relatively small radius As the
通常用户在罗盘操作区域内拖动罗盘控件后,罗盘控件初始位置(或称为默认位置,如罗盘操作区域的几何中心)指向罗盘控件当前位置的方向即为游戏中人物移动的方向。例如,如图2中的(a)所示,罗盘操作区域201为圆形区域,罗盘控件202位于该圆形区域内,罗盘控件202位于初始位置时其几何中心与该罗盘操作区域201的圆心重合。当用户拖动罗盘控件202时,罗盘控件202随之移动,如图2中的(b)所示,当罗盘控件202移动后,罗盘控件202的初始位置指向罗盘控件202的当前位置的方向即为该移动罗盘控制的游戏中人物203要移动的方向。Usually, after the user drags the compass control in the compass operation area, the direction in which the initial position of the compass control (or the default position, such as the geometric center of the compass operation area) points to the current position of the compass control is the direction in which the characters move in the game. For example, as shown in (a) of FIG. 2 , the
其中,用户滑动手指以拖动罗盘控件时,罗盘控件可以根据用户手指滑动时的触控报点对应移动,所以当用户手指在罗盘操作区域内滑动时罗盘控件才能够对应移动(即被用户拖动),当用户手指在罗盘操作区域外滑动时罗盘控件通常不会被用户拖动。例如,如图3中的(a)所示,当用户沿某个方向拖动位于初始位置的罗盘控件301时,用户手指滑动到罗盘操作区域302外,则罗盘控件301随手指移动到罗盘操作区域302的边界处后便不再被用户手指拖动。即用户手指在滑出罗盘操作区域302之后,罗盘控件301不会再跟随用户手指的滑动而沿用户手指滑动的方向移动。如图3中的(b)所示,当用户手指在罗盘操作区域302外沿与图3中的(a)所示的手指滑动的方向相反的方向滑动,在用户手指还没有滑动到罗盘操作区域302内时,罗盘控件301依旧处于罗盘操作区域302的边界处,不会随用户手指的滑动沿用户手指的滑动方向移动。Among them, when the user slides his finger to drag the compass control, the compass control can move correspondingly according to the touch point when the user slides his finger, so when the user's finger slides in the compass operation area, the compass control can move correspondingly (that is, the compass control is dragged by the user) When the user's finger slides outside the compass operating area, the compass control is usually not dragged by the user. For example, as shown in (a) of FIG. 3 , when the user drags the
当用户需要控制游戏人物折返移动时,用户可以在罗盘操作区域内拖动罗盘控件向相反的方向移动(即折返拖动)。但是,在用户拖动罗盘控件时用户的手指经常会滑出罗盘操作区域,此时,若用户需要拖动罗盘控件向相反的方向移动,则手指需向相反方向滑动一定距离,待手指进入到罗盘操作区域内后才能够拖动罗盘控件。例如,如图4所示,当用户滑动手指以拖动罗盘控件折返移动时,手机可以按照一定的采样率获取用户手指滑动时的触控报点。用户手指的触控报点沿滑动轨迹可以依次为报点1至报点17。其中报点1至报点4位于罗盘操作区域401内,因此在用户手指由报点1的位置滑动至报点4的位置时(即用户手指在罗盘操作区域401内滑动时),罗盘控件(图中未示出)可以根据报点1至报点4进行移动。当用户手指滑动到位于罗盘操作区域401外的报点5的位置至报点13的位置时(即用户手指滑动到罗盘操作区域401外时),由于此时的触控报点位于罗盘操作区域401外因此罗盘控件仍处于报点4的位置。当用户手指滑动到位于罗盘操作区域401内的报点14的位置至报点17的位置时(即用户手指滑动到罗盘操作区域401内时),由于此时的触控报点位于罗盘操作区域401内因此罗盘控件此时会根据报点14至报点17跟随用户手指移动。When the user needs to control the game character to move back and forth, the user can drag the compass control in the compass operation area to move in the opposite direction (ie, turn back and drag). However, when the user drags the compass control, the user's finger often slides out of the compass operation area. At this time, if the user needs to drag the compass control to move in the opposite direction, the finger needs to slide a certain distance in the opposite direction until the finger enters the The compass control can be dragged only after it is in the compass operation area. For example, as shown in FIG. 4 , when the user slides the finger to drag the compass control to move back and forth, the mobile phone can obtain the touch report points when the user slides the finger according to a certain sampling rate. The touch point reported by the user's finger may be followed by
由以上可以看到,当用户通过滑动手指来拖动罗盘控件控制游戏中的人物折返移动时,可能会导致罗盘控件的移动存在延迟,进而导致游戏人物移动的控制存在延迟。As can be seen from the above, when the user drags the compass control by sliding the finger to control the character in the game to move back and forth, it may cause a delay in the movement of the compass control, which in turn results in a delay in the control of the movement of the game character.
为解决上述问题,本申请实施例提供一种触控方法及设备。该触控方法可以应用于用户在具有触控功能和显示功能的电子设备中,通过触控电子设备中显示的控制操作区域内的滑动控件来控制被控制对象(如,游戏中的人物、物体等虚拟角色)移动的场景中。例如,以电子设备为手机、被控制对象为游戏中的人物为例,手机运行游戏时,手机画面中显示有移动罗盘或称为移动轮盘,包括罗盘操作区域(即控制操作区域)以及位于罗盘操作区域内的罗盘控件(即滑动控件),以及游戏人物。用户可以通过拖动罗盘控件来控制游戏人物移动。又例如,以电子设备为手机、被控制对象为无人机为例,当手机与无人机通信连接之后,手机上可以显示操控摇杆,该操控摇杆可以包括摇杆操作区域(即控制操作区域)以及位于摇杆操作区域内的摇杆控件(即滑动控件)。用户可以通过拖动摇杆控件在摇杆操作区域内移动来控制无人机移动。To solve the above problems, embodiments of the present application provide a touch control method and device. The touch control method can be applied to an electronic device with a touch function and a display function, where a user controls a controlled object (eg, a character, an object in a game) by touching a sliding control in a control operation area displayed in the electronic device. and other avatars) moving scenes. For example, taking the electronic device as a mobile phone and the controlled object as a character in the game, when the mobile phone runs the game, a mobile compass or mobile roulette is displayed on the screen of the mobile phone, including the compass operation area (that is, the control operation area) and the Compass controls (ie sliding controls) in the compass operating area, and game characters. The user can control the movement of the game character by dragging the compass control. For another example, taking the electronic device as a mobile phone and the controlled object as a drone, after the mobile phone is communicated with the drone, a joystick can be displayed on the mobile phone. operation area) and the joystick controls (ie slide controls) located in the joystick operation area. The user can control the movement of the drone by dragging the joystick control to move within the joystick operation area.
该触控方法可以包括:电子设备显示有第一界面。该第一界面可以包括控制操作区域以及位于控制操作区域内的滑动控件。通过该滑动控件在控制操作区域内滑动能够控制被控制对象移动。当触控介质进行由控制操作区域内沿第一方向滑动至控制操作区域外的触控操作(或称为第一操作)时,响应于该第一操作,电子设备可以控制滑动控件沿第一方向随触控介质滑动至控制操作区域的边界的第一位置。然后,在触控介质沿第一方向滑动到控制操作区域外的情况下,若触控介质进行在控制操作区域外由第一方向滑动改变方向以第二方向滑动的触控操作(或称为第二操作),则响应于第二操作,电子设备可以控制滑动控件在控制操作区域内沿第二方向滑动。其中,触控介质为用户进行触控操作的介质,可以是用户的手指或者触控笔等。触控介质沿第二方向滑动的路径的延长线与控制操作区域相交。即,在用户通过触控介质拖动滑动控件以控制被控制对象移动的情况下,若触控介质沿第一方向滑出控制操作区域后又沿第二方向朝向控制操作区域折返滑动,则触控介质沿第二方向还没有滑入控制操作区域内时滑动控件便开始沿第二方向移动。The touch control method may include: the electronic device displays a first interface. The first interface may include a control operation area and a sliding control located in the control operation area. By sliding the sliding control in the control operation area, the controlled object can be controlled to move. When the touch medium performs a touch operation (or referred to as a first operation) that is slid from the control operation area in the first direction to the outside of the control operation area, in response to the first operation, the electronic device can control the sliding control to move along the first direction. The direction slides with the touch medium to the first position of the boundary of the control operation area. Then, in the case where the touch medium is slid outside the control operation area along the first direction, if the touch medium performs a touch operation (or referred to as sliding in the second direction) outside the control operation area by sliding in the first direction to change the direction and sliding in the second direction second operation), then in response to the second operation, the electronic device may control the sliding control to slide along the second direction within the control operation area. The touch medium is a medium on which a user performs a touch operation, and may be a user's finger or a stylus or the like. The extension line of the path where the touch medium slides in the second direction intersects with the control operation area. That is, when the user drags the sliding control through the touch medium to control the movement of the controlled object, if the touch medium slides out of the control operation area in the first direction and then slides back toward the control operation area in the second direction, the touch When the control medium has not yet slipped into the control operation area along the second direction, the sliding control starts to move along the second direction.
采用该触控方法,当用户需要通过触控介质(如,手指或触控笔)拖动滑动控件来控制被控制对象折返移动时,即使触控介质改变滑动方向进行折返滑动时没有在控制操作区域内,滑动控件也能够按照触控介质折返滑动的方向进行移动,以控制被控制对象相应移动。从而避免用户拖动滑动控件时,由于触控介质没有在控制操作区域内而需滑动一定距离待触控介质进入到控制操控区域后才能拖动滑动控件。降低了此时用户拖动滑动控件时的延迟,进而降低用户控制被控对象时的延迟。With this touch control method, when the user needs to drag the sliding control through a touch medium (such as a finger or a stylus) to control the return movement of the controlled object, even if the touch medium changes the sliding direction to perform the return sliding, the control operation is not performed. In the area, the sliding control can also move according to the direction of the touch media return sliding, so as to control the controlled object to move accordingly. Therefore, when the user drags the sliding control, since the touch medium is not in the control operation area, it is necessary to slide a certain distance until the touch medium enters the control operation area before dragging the sliding control. The delay when the user drags the sliding control at this time is reduced, thereby reducing the delay when the user controls the controlled object.
以下,将结合附图对本申请实施例提供的触控方法进行说明。Hereinafter, the touch control method provided by the embodiments of the present application will be described with reference to the accompanying drawings.
在本申请实施例中,上述电子设备,可以是手机、平板电脑、手持计算机,PC,蜂窝电话,个人数字助理(personal digital assistant,PDA),可穿戴式设备(如:智能手表、智能手环),智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机,以及增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备等。本申请实施例对于电子设备的具体设备形态不作特殊限制。In the embodiment of the present application, the above-mentioned electronic device may be a mobile phone, a tablet computer, a handheld computer, a PC, a cellular phone, a personal digital assistant (PDA), a wearable device (such as a smart watch, a smart wristband) ), smart home devices (such as TVs), car devices (such as car computers), smart screens, game consoles, and augmented reality (AR)/virtual reality (VR) devices, etc. The embodiments of the present application do not specifically limit the specific device form of the electronic device.
示例地,以电子设备为手机为例,图5示出了本申请实施例提供的一种电子设备的结构示意图。也即,示例性的,图5所示的电子设备可以是手机。For example, taking the electronic device as a mobile phone as an example, FIG. 5 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application. That is, exemplarily, the electronic device shown in FIG. 5 may be a mobile phone.
如图5所示,电子设备可以包括:射频(radio frequency,RF)电路510、存储器520、输入单元530、显示单元540、传感器550、音频电路560、无线保真(wireless fidelity,WiFi)模块570、处理器580、电源590以及蓝牙模块5100等部件。本领域技术人员可以理解,图5中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。As shown in FIG. 5 , the electronic device may include: a radio frequency (RF)
下面结合图5对电子设备的部分构成部件进行具体的介绍:Part of the components of the electronic device will be described in detail below with reference to FIG. 5 :
存储器520可用于存储软件程序以及模块,处理器580通过运行存储在存储器520的软件程序以及模块,从而执行电子设备的各种功能应用以及数据处理。存储器520可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)、引导装载程序(boot loader)等;存储数据区可存储根据电子设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器520可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The
输入单元530可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,输入单元530可包括触控面板531以及其他输入设备532。触控面板531,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板531上或在触控面板531附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板531可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器580,并能接收处理器580发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板531。除了触控面板531,输入单元530还可以包括其他输入设备532。具体地,其他输入设备532可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The
显示单元540可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种菜单。显示单元540可包括显示面板541,可选的,可以采用液晶显示器(liquidcrystal display,LCD)、有机发光二极管(organic light-emitting diode,OLED)等形式来配置显示面板541。进一步的,触控面板531可覆盖显示面板541,当触控面板531检测到在其上或附近的触摸操作后,传送给处理器580以确定触摸事件的类型,随后处理器580根据触摸事件的类型在显示面板541上提供相应的视觉输出。虽然在图5中,触控面板531与显示面板541是作为两个独立的部件来实现电子设备的输入和输入功能,但是在某些实施例中,可以将触控面板531与显示面板541集成而实现电子设备的输入和输出功能。The
处理器580是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器520内的软件程序或模块,以及调用存储在存储器520内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。可选的,处理器580可包括一个或多个处理单元;优选的,处理器580可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器580中。The
当然,可以理解的,上述图5所示仅仅为电子设备的形态为手机时的示例性说明。若电子设备是平板电脑,手持计算机,PC,PDA,可穿戴式设备(如:智能手表、智能手环),智能家居设备(如:电视机),车机(如:车载电脑),智慧屏,游戏机以及AR/VR设备等其他设备形态时,电子设备的结构中可以包括比图5中所示更少的结构,也可以包括比图5中所示更多的结构,在此不作限制。Of course, it can be understood that the above-mentioned FIG. 5 is only an exemplary illustration when the form of the electronic device is a mobile phone. If the electronic devices are tablet computers, handheld computers, PCs, PDAs, wearable devices (such as smart watches, smart bracelets), smart home devices (such as TV sets), car devices (such as car computers), smart screens , game consoles, AR/VR devices and other device forms, the structure of the electronic device may include fewer structures than those shown in FIG. 5 , or may include more structures than those shown in FIG. 5 , which is not limited here. .
以下实施例中的方法均可以在具有上述硬件结构的电子设备中实现。The methods in the following embodiments can all be implemented in an electronic device having the above-mentioned hardware structure.
其中,本申请实施例中的电子设备可以是能够运行操作系统,安装应用程序的电子设备。其中,电子设备运行的操作系统可以是安卓系统、鸿蒙系统、系统、系统、系统、系统等。更具体的,还可以是系统、系统等。The electronic device in the embodiment of the present application may be an electronic device capable of running an operating system and installing an application program. The operating system running on the electronic device may be Android system, Hongmeng system, system, system, system, system etc. More specifically, it can also be system, system etc.
在本申请实施例中,电子设备的软件架构可以参考图6。图6示出了本申请实施例提供的一种电子设备的软件架构简化示意图。如图6所示,电子设备的软件架构可以包括底层601,中间层602和应用层603。其中,底层601能够根据用户的触控操作生成触控报点,中间层602能够对触控报点进行处理。电子设备中的各个应用程序均部署于应用层603。In this embodiment of the present application, reference may be made to FIG. 6 for the software architecture of the electronic device. FIG. 6 shows a simplified schematic diagram of a software architecture of an electronic device provided by an embodiment of the present application. As shown in FIG. 6 , the software architecture of the electronic device may include a
以下将以电子设备为手机,用户通过手机中显示的移动罗盘控制游戏中的游戏人物(即控制操作区域为罗盘操作区域,滑动控件为罗盘控件,被控制对象为游戏人物)为例,对本申请实施例进行详细说明。The following will take the electronic device as the mobile phone, and the user controls the game characters in the game through the mobile compass displayed in the mobile phone (that is, the control operation area is the compass operation area, the sliding control is the compass control, and the controlled object is the game character) as an example. Examples are described in detail.
在本申请实施例中,可以在电子设备显示的第一界面中,移动罗盘的罗盘操作区域以外的区域设置预判区域,当用户通过触控介质(如,手指或触控笔)拖动移动罗盘的罗盘控件来控制被控制对象移动时,若触控介质沿第一方向滑出移动罗盘的罗盘操作区域后又沿第二方向朝向罗盘操作区域折返滑动的滑动动作是在上述预判区域内,则电子设备可以根据触控介质在预判区域内沿第二方向朝向罗盘操作区域滑动时的触控报点,在罗盘操作区域内对应生成预报点,使移动罗盘的罗盘控件能够根据预报点进行移动。从而使触控介质沿第二方向滑动但还没有滑入罗盘操作区域内时罗盘控件便开始沿第二方向移动,降低用户通过触控介质的折返滑动以拖动移动罗盘的罗盘控件折返移动时的延迟。In this embodiment of the present application, in the first interface displayed by the electronic device, the pre-judgment area may be set by moving the area outside the compass operation area of the compass. When the compass control of the compass is used to control the movement of the controlled object, if the touch medium slides out of the compass operation area of the moving compass in the first direction and then slides back toward the compass operation area in the second direction, the sliding action is within the above-mentioned pre-judgment area. , the electronic device can generate a corresponding forecast point in the compass operation area according to the touch report point when the touch medium slides toward the compass operation area in the second direction in the forecast area, so that the compass control of the moving compass can be based on the forecast point. make a move. In this way, the compass control starts to move in the second direction when the touch medium slides in the second direction but has not yet slipped into the compass operation area, which reduces the need for the user to drag the compass control of the compass to move back by sliding the touch medium back and forth. Delay.
其中,电子设备的第一界面中设置的预判区域可以是预先设置在电子设备中的,也可以是电子设备根据收集的用户(或者说触控介质)在罗盘操作区域所处位置的预设区域范围内的历史触控操作(如历史触控操作产生的历史触控报点或触控轨迹)生成的。当然,在一些实施方式中,该预判区域还可以是预设有默认区域,然后随着用户的使用,电子设备再根据收集的用户历史触控操作产生的历史触控报点优化并刷新预判区域。其中,电子设备可以通过收集用户的触控操作对应的触控报点然后根据触控报点对预判区域进行优化,使预判区域更加适配相应的用户。The pre-judgment area set in the first interface of the electronic device may be preset in the electronic device, or may be preset by the electronic device according to the collected position of the user (or the touch medium) in the compass operation area Generated by historical touch operations within the area (such as historical touch reports or touch tracks generated by historical touch operations). Of course, in some embodiments, the pre-judgment area may also be preset with a default area, and then, as the user uses, the electronic device optimizes and refreshes the pre-determination according to the historical touch reports generated by the collected historical touch operations of the user. Judgment area. Wherein, the electronic device can collect the touch report points corresponding to the user's touch operation and then optimize the pre-judgment area according to the touch report points, so that the pre-judgment area is more suitable for the corresponding user.
示例地,电子设备中可以先预设默认的预判区域,例如,如图7所示,电子设备中显示有移动罗盘,该移动罗盘包括罗盘操作区域701以及位于罗盘操作区域701内的罗盘控件702。默认的预判区域703可以设置为在罗盘操作区域701外围绕罗盘操作区域701的圆环。该圆环的宽度可以根据实际情况进行设置,也可以基于内部测试大数据(即电子设备内部测试时获取的测试用户的触控操作的触控报点或触控轨迹数据),将测试用户在移动罗盘附近操作相对频繁的区域(即移动罗盘附近记录的触控报点或触控轨迹相对密集的区域)作为默认的预判区域703。然后,电子设备可以在用户实际使用过程中,对用户(或者说触控介质)触控操作对应的触控报点进行收集(可以是在电子设备显示移动罗盘时对用户的触控操作对应的触控报点或触控报点组成的触控轨迹进行收集)。例如,如图8所示,电子设备显示移动罗盘801时,收集用户在移动罗盘801附近的触控操作对应的触控报点组成的触控轨迹802。之后,电子设备可根据收集到的触控报点或触控轨迹,将移动罗盘附近触控报点相对密集的区域作为优化后的预判区域。例如,以电子设备收集的触控报点或触控轨迹如图8所示为例,如图9所示,根据收集到的触控报点或触控轨迹优化后的预判区域901,即为如图所示覆盖大部分触控报点或触控轨迹的圆形区域。需要说明的是,采集用户的触控操作对应的触控报点或触控轨迹之前,可以先根据显示画面,或者用户设置确定出移动罗盘的位置,然后再采集移动罗盘(或者说罗盘操作区域)附近的触控操作对应的触控报点或触控轨迹。For example, a default pre-judgment area may be preset in the electronic device. For example, as shown in FIG. 7 , a mobile compass is displayed in the electronic device, and the mobile compass includes a
示例地,图10示出了本申请实施例提供的一种触控方法的流程示意图。如图10所示,该触控方法可以包括以下S1001-S1004。For example, FIG. 10 shows a schematic flowchart of a touch control method provided by an embodiment of the present application. As shown in FIG. 10 , the touch control method may include the following S1001-S1004.
S1001、响应于用户(或者说触控介质)的触控操作,电子设备通过软件架构的底层根据用户的触控操作生成相应的触控报点。S1001. In response to a touch operation of a user (or a touch medium), the electronic device generates a corresponding touch report point according to the user's touch operation through the bottom layer of the software architecture.
其中,当用户进行触控操作时,电子设备可以实时生成触控操作相应的触控报点。示例地,当触控操作为用户通过触控介质(如用户的手机、触控笔等)进行的滑动操作时,电子设备可以按照一定的采样率生成触控报点(例如,当用户滑动操作时,生成如图4所示的触控报点)。Wherein, when the user performs a touch operation, the electronic device can generate a touch report point corresponding to the touch operation in real time. For example, when the touch operation is a sliding operation performed by a user through a touch medium (such as a user's mobile phone, a stylus, etc.), the electronic device may generate a touch report point according to a certain sampling rate (for example, when the user slides When the touch point is generated as shown in Figure 4).
可选地,在本申请实施例中,S1001之前,电子设备还可以响应于用户开启该触控方法的功能的操作以开启实现该触控方法的功能,以便于用户可以手动开启或关闭该功能。从而使电子设备在用户开启该功能时,才基于如图10所示的触控方法实现相应的功能。当然,若上述的预判区域需要根据收集到的用户的触控操作的触控报点进行设置,则可以在用户开启该功能后电子设备再收集用户设置预判区域的触控报点并生成预判区域。Optionally, in this embodiment of the present application, before S1001, the electronic device may also enable the function of implementing the touch-control method in response to an operation of the user to enable the function of the touch-control method, so that the user can manually turn on or turn off the function . Therefore, when the user enables the function, the electronic device realizes the corresponding function based on the touch control method shown in FIG. 10 . Of course, if the above-mentioned pre-judgment area needs to be set according to the collected touch report points of the user's touch operation, then the electronic device can collect the touch report points of the user's setting pre-judgment area after the user enables this function and generate Anticipated area.
例如,如图11所示,用户可以打开电子设备的系统设置来开启触控优化功能。如图11中的(a)所示,用户可以打开系统设置中的游戏模式选项。该游戏模式选项中可以包括设置选项“触控优化”。如图11中的(b)所示,用户可以通过点击该设置选项“触控优化”以开启触控优化功能。For example, as shown in FIG. 11 , the user can open the system settings of the electronic device to enable the touch optimization function. As shown in (a) of Figure 11, the user can turn on the game mode option in the system settings. The game mode options may include a setting option "touch optimization". As shown in (b) of FIG. 11 , the user can turn on the touch optimization function by clicking the setting option “touch optimization”.
当然,在一些其他可能的实施方式中,电子设备还可以默认实施如图10所示的方法,即不需要用户设置开启。Of course, in some other possible implementation manners, the electronic device may also implement the method shown in FIG. 10 by default, that is, the user does not need to set it to be turned on.
当电子设备根据用户的触控操作生成触控报点后,底层可以将触控报点发送(上报)给电子设备软件架构中的中间层。中间层接收到触控报点后,电子设备可以执行以下S1002。After the electronic device generates the touch report point according to the user's touch operation, the bottom layer can send (report) the touch report point to the middle layer in the software architecture of the electronic device. After the middle layer receives the touch reporting point, the electronic device may perform the following S1002.
S1002、电子设备通过软件架构的中间层根据触控报点确定用户的触控操作为在预判区域内朝向罗盘操作区域的折返滑动(其中,折返滑动即为触控介质在罗盘操作区域外由第一方向滑动改变方向以第二方向滑动)。S1002, the electronic device determines, through the middle layer of the software architecture, according to the touch reporting point, that the user's touch operation is a switchback sliding toward the compass operation area within the pre-judgment area (wherein, the switchback sliding means that the touch medium is moved by the touch medium outside the compass operation area) Swipe in the first direction to change the direction to swipe in the second direction).
在一些实施方式中,电子设备可以在预判区域内根据实施生成的触控报点对用户的触控操作进行判断。当依次生成的触控报点连接形成的滑动触控轨迹出现折返时,则可以确定此时用户的触控操作为在预判区域内朝向罗盘操作区域(或者说朝向移动罗盘)的折返滑动。例如,如图12所示,用户可以通过手指作为触控介质进行滑动触控操作。用户可以从罗盘操作区域1201内开始沿某个方向(如第一方向)滑动至罗盘操作区域1201外的预判区域1202,然后再改变方向以其他方向(如第二方向)滑动(即折返滑动)。如图13所示,当用户进行如图12所示的滑动触控操作时,随着用户的触控操作,电子设备依次生成的触控报点为报点1至报点10。其中,报点1至报点4位于罗盘操作区域1301内,报点5至报点10位于预判区域内1302内。当生成报点10时,由于报点1至报点10连接后形成的滑动触控轨迹在预判区域1302内出现了折返,因此,此时电子设备可以在生成报点10时便可确定此时用户的触控操作为折返滑动。In some embodiments, the electronic device may judge the user's touch operation in the pre-judgment area according to the touch report point generated by the implementation. When the sliding touch track formed by the sequentially generated touch reporting points is connected, it can be determined that the user's touch operation at this time is a return sliding toward the compass operation area (or toward the moving compass) within the pre-judgment area. For example, as shown in FIG. 12 , a user can perform a sliding touch operation by using a finger as a touch medium. The user can start to slide in a certain direction (such as the first direction) from the
其中,可选地,用户通过触控介质进行滑动触控时,滑动触控轨迹折返前的部分(例如图13中所示的报点1至报点9构成的滑动轨迹)与滑动触控轨迹折返滑动的部分(例如图13中所示的报点9至报点10构成的滑动轨迹)间的夹角小于一定的预设角度时(如30度、45度等)时则可确定依次连接的触控报点构成的滑动触控轨迹出现了折返。即,当电子设备根据依次生成的触控报点形成滑动触控轨迹后,若滑动触控轨迹的滑动方向出现了变化,且变化前后的滑动触控轨迹间的夹角小于一定的角度时,电子设备可确定用户当前的触控操作为折返滑动。当然,在其他一些实施方式中,也可以是只要滑动触控轨迹形成了弯折便确定出现了折返。Wherein, optionally, when the user performs sliding touch through the touch medium, the part of the sliding touch track before turning back (for example, the sliding track formed by the
需要说明的是,在本申请实施例中若预判区域为根据收集的用户触控操作对应的触控报点生成的,则在S1002或S1001之前,可以先生成预判区域。It should be noted that, in the embodiment of the present application, if the pre-judgment area is generated according to the collected touch points corresponding to the user's touch operation, the pre-judgment area may be generated first before S1002 or S1001.
在电子设备确定用户的触控操作为在预判区域内朝向罗盘操作区域的折返滑动时,电子设备可以根据后续的触控报点生成预报点。例如,电子设备可以执行以下S1003。When the electronic device determines that the user's touch operation is to slide back and forth toward the compass operation area within the pre-judgment area, the electronic device may generate a forecast point according to a subsequent touch point report point. For example, the electronic device may perform the following S1003.
S1003、电子设备通过软件架构的中间层根据触控报点生成位于移动罗盘的罗盘操作区域内的预报点。S1003 , the electronic device generates a forecast point located in the compass operation area of the moving compass according to the touch point forecast point through the middle layer of the software architecture.
在一些可能的实施方式中,当电子设备确定用户的触控操作为折返滑动(例如,如图12所示的滑动触控操作)时,电子设备根据后续的触控报点(即折返滑动过程中的触控报点)生成位于罗盘操作区域内的预报点,可以是基于折返滑动时的滑动方向,在罗盘操作区域内生成预报点。例如,如图14所示,电子设备根据用户操作依次生成报点1至报点10,其中,报点1至报点4位于罗盘操作区域1401内,报点5至报点10位于预判区域内1402内。当生成报点10时,电子设备根据报点1至报点10依次连接构成的滑动触控轨迹确定此时用户的触控操作为折返滑动。然后,电子设备可以根据报点9和报点10之间的连线构成的折返滑动的滑动触控轨迹,预测出该折返滑动时的滑动轨迹(例如图中虚线所示)。然后,可以沿该滑动轨迹在移动罗盘的罗盘操作区域1401内生成预报点(例如,图14中所示的预报点11至预报点14)。In some possible implementations, when the electronic device determines that the user's touch operation is a return sliding (for example, the sliding touch operation as shown in FIG. 12 ), the electronic device reports points according to subsequent touches (that is, the return sliding process). The touch report point in the compass operation area) generates the forecast point in the compass operation area, which can be based on the sliding direction when sliding back and forth, and generates the forecast point in the compass operation area. For example, as shown in FIG. 14 , the electronic device sequentially generates
可选地,上述预测的折返滑动时的滑动轨迹可以是根据折返滑动时生成的触控报点(例如图14中的报点9和报点10)之间的连线确定。因此,首个预报点的位置可以是折返滑动时生成的触控报点之间的连线与移动罗盘的罗盘操作区域的边界之间的交点。Optionally, the above-predicted sliding trajectory during the switchback sliding may be determined according to the connection between the touch points (eg point 9 and
示例地,以罗盘操作区域为圆形区域为例。如图15所示,罗盘操作区域的圆心为D0(x0,y0),半径为r。依次生成的触控报点包括D1至D6,其中折返滑动时的触控报点为D5(x5,y5)以及D6(x6,y6)。其中,x0、y0、r(即罗盘操作区域的圆心坐标和半径)可以根据移动罗盘相应的应用程序确定得到,也可以根据显示画面的相关参数得到此处不做限制。x5、y5、x6以及y6均可通过触控报点数据得到。因此,首个预报点的位置坐标可以满足以下公式:For example, take the compass operation area as a circular area as an example. As shown in FIG. 15 , the center of the compass operation area is D 0 (x 0 , y 0 ), and the radius is r. The touch notification points generated in sequence include D 1 to D 6 , wherein the touch notification points during the return sliding are D 5 (x 5 , y 5 ) and D 6 (x 6 , y 6 ). Among them, x 0 , y 0 , r (ie, the center coordinates and radius of the compass operation area) can be determined according to the corresponding application program of the mobile compass, and can also be obtained according to the relevant parameters of the display screen, which is not limited here. All of x 5 , y 5 , x 6 and y 6 can be obtained through touch reporting point data. Therefore, the position coordinates of the first forecast point can satisfy the following formula:
其中,上述方程组的解(x,y)可以作为首个预报点的位置坐标。需要说明的是,当(x,y)不存在时,则说明折返滑动时的触控报点间的连线(即折返滑动的方向)与罗盘操作区域不相交,因此电子设备不生成预报点。当(x,y)只存在一个值时,则说明折返滑动时的触控报点间的连线(即折返滑动的方向)与罗盘操作区域相切,因此电子设备不生成预报点。而当(x,y)存在两个值时,则说明折返滑动时的触控报点间的连线(即折返滑动的方向)与罗盘操作区域相交,因此电子设备可以生成预报点,且以两个(x,y)的值对应的坐标点中距离折返滑动时的触控报点(例如,如图15中所示的D5、D6点)较近的坐标点作为预报点(例如,如图15中所示的B1点)。Among them, the solution (x, y) of the above equation system can be used as the position coordinates of the first forecast point. It should be noted that when (x, y) does not exist, it means that the connection line between the touch reporting points (that is, the direction of the folding and sliding) does not intersect with the compass operation area during the return sliding, so the electronic device does not generate a forecast point. . When there is only one value of (x, y), it means that the connection line between the touch reporting points during the switchback sliding (ie the direction of switchback sliding) is tangent to the compass operation area, so the electronic device does not generate forecast points. When there are two values of (x, y), it means that the connection line between the touch reporting points (that is, the direction of the turning back and sliding) intersects with the compass operation area during the return sliding, so the electronic device can generate the forecast point, and use the Among the coordinate points corresponding to the two (x, y) values, the coordinate point that is closer to the touch reporting point (for example, points D 5 and D 6 as shown in FIG. 15 ) when sliding back and forth is used as the forecast point (for example, , as shown at point B 1 in Figure 15).
可选地,在电子设备生成首个预报点后,还可以根据用户的触控操作后续折返滑动时生成的触控报点持续生成相应的预报点。即,随着用户的折返滑动,当电子设备根据一定的采样率生成触控报点时,每生成一个触控报点相应地电子设备可以在罗盘操作区域内生成一个预报点。从而使生成的预报点能够与用户的折返滑动操作相同步。当然,在一些其他可能的实施方式中,电子设备也可以根据一定的时间间隔,随着用户后续的折返滑动持续生成预报点,此处不做限制。Optionally, after the electronic device generates the first forecast point, the corresponding forecast point may also be continuously generated according to the touch report point generated when the user's touch operation is followed by a return slide. That is, with the user's turning back and sliding, when the electronic device generates a touch report point according to a certain sampling rate, each time a touch report point is generated, the electronic device can generate a forecast point in the compass operation area accordingly. Thereby, the generated forecast point can be synchronized with the user's turn-back sliding operation. Of course, in some other possible implementation manners, the electronic device may also continuously generate forecast points according to a certain time interval along with the user's subsequent turn-back sliding, which is not limited here.
其中,各个预报点之间的间距可以按照一定的规律设置,如等比数列,等差数列等。也可以按照其他规则设置,如将各个预报点之间的间距设置相等,此处不做限制,可以根据实际情况对各个预报点间的间距进行设定。Among them, the distance between each forecast point can be set according to a certain rule, such as a proportional sequence, an arithmetic sequence, and so on. It can also be set according to other rules, such as setting the spacing between each forecast point to be equal, there is no restriction here, and the spacing between each forecast point can be set according to the actual situation.
例如,在一些可能的实施方式中,电子设备后续生成的预报点可以是沿折返滑动时的滑动方向(例如,如图15中所示的D5、D6点的连线),间距按照等比数列从首个预报点开始依次生成。其中,首个预报点与下一个预报点之间的间距(例如,如图15中所示的B1和B2之间的间距d1)可以设置为折返滑动时生成的触控报点(例如,如图15中所示的触控点D5和D6)之间的间距(或者当折返滑动时生成的触控报点之间的间距不相等时,可以取各间距的均值)。当然,也可以根据实际情况对首个预报点与下一个预报点之间的间距进行预设,或按照其他规则设置,此处不做限制。各个预报点之间的间距的公比可以根据实际情况进行设置,此处不做限制,例如,公比可以是0.5,0.8等。For example, in some possible implementations, the prediction point subsequently generated by the electronic device may be the sliding direction when sliding back and forth (for example, the line connecting the points D 5 and D 6 as shown in FIG. 15 ), and the spacing is according to etc. The ratio sequence is generated sequentially from the first forecast point. Wherein, the distance between the first forecast point and the next forecast point (for example, the distance d 1 between B 1 and B 2 as shown in FIG. 15 ) can be set as the touch point ( For example, as shown in FIG. 15 , the distance between the touch points D 5 and D 6 ) (or when the distance between the touch points generated during the switchback sliding is not equal, the average value of each distance can be taken). Of course, the distance between the first forecast point and the next forecast point can also be preset according to the actual situation, or set according to other rules, which is not limited here. The common ratio of the distance between each forecast point can be set according to the actual situation, which is not limited here, for example, the common ratio can be 0.5, 0.8, etc.
在另一些可能的实施方式中,电子设备后续生成的预报点还可以是沿折返滑动时的滑动方向(例如,如图15中所示的D5、D6点的连线),间距按照固定数值从首个预报点开始依次生成。其中,该固定数值可以是折返滑动时生成的触控报点(例如,如图15中所示的触控点D5和D6)之间的间距(或者当折返滑动时生成的触控报点之间的间距不相等时,可以取各间距的均值)。该固定值也可以是根据实际情况设定的其他数值,或根据其他规则设定的数值,此处不做限制。In some other possible implementation manners, the prediction point subsequently generated by the electronic device may also be the sliding direction when sliding back and forth (for example, the line connecting the points D 5 and D 6 as shown in FIG. 15 ), and the distance is fixed according to Values are generated sequentially starting from the first forecast point. Wherein, the fixed value can be the distance between touch points (for example, touch points D 5 and D 6 as shown in FIG. 15 ) generated when the sliding is turned back (or the touch notification generated when sliding is turned back) When the distances between the points are not equal, the average of the distances can be taken). The fixed value may also be other values set according to actual conditions, or values set according to other rules, which are not limited here.
示例地,以各个预报点间的间距按照等比数列设置,且等比数列的首项(即首个预报点与下一个预报点间的间距,例如,如图15中所示的预报点B1和预报点B2之间的间距d1)为折返滑动时生成的触控报点(例如,如图15中所示的触控点D5和D6)之间的间距,等比数列的公比为0.5为例。结合图15所示,折返滑动时的触控报点为D5(x5,y5)以及D6(x6,y6),即x5、y5、x6以及y6可根据触控报点数据确定为已知数值,生成的首个预报点为B1(x1,y1),即首个预报点的坐标值x1、y1为已知数值。当生成了首个预报点(例如,如图15中所示的预报点B1)后,后续的预报点Ba(xa,ya)可以根据以下公式计算:Illustratively, the distance between each forecast point is set according to the proportional sequence, and the first item of the proportional sequence (that is, the distance between the first forecast point and the next forecast point, for example, the forecast point B shown in FIG. 15 . The distance d 1 ) between 1 and the forecast point B 2 is the distance between the touch report points (for example, the touch points D 5 and D 6 as shown in FIG. 15 ) generated when sliding back and forth, which is a proportional sequence. The common ratio is 0.5 for example. With reference to FIG. 15 , the touch reporting points during the return sliding are D 5 (x 5 , y 5 ) and D 6 (x 6 , y 6 ), that is, x 5 , y 5 , x 6 and y 6 can be selected according to the touch The control point data is determined as a known value, and the first forecast point generated is B 1 (x 1 , y 1 ), that is, the coordinate values x 1 and y 1 of the first forecast point are known values. After the first forecast point (for example, the forecast point B 1 shown in Figure 15 ) is generated, the subsequent forecast points B a (x a , ya ) can be calculated according to the following formula:
其中,如图15所示,dn为预报点Ba和预报点Ba-1之间的间距。Among them, as shown in Fig. 15, dn is the distance between the forecast point B a and the forecast point B a-1 .
需要说明的是,当各个预报点间的间距按照上述等比数列设置时,根据上述等比数列求和公式的极值:It should be noted that when the distance between each forecast point is set according to the above-mentioned proportional sequence, the extreme value of the summation formula according to the above-mentioned proportional sequence is:
可知,此时移动罗盘的罗盘控件根据预报点移动时,移动的最大距离为2d1。It can be known that when the compass control of the moving compass moves according to the forecast point, the maximum distance moved is 2d 1 .
可选地,在一些可能的实现方式中,上述S1002和S1003可以在生成的触控报点位于预判区域时(即用户的触控操作进入到预判区域内时)执行,以节省用户在罗盘操作区域内对罗盘控件进行正常拖动时电子设备的计算功耗。Optionally, in some possible implementation manners, the above-mentioned S1002 and S1003 may be performed when the generated touch report point is located in the pre-judgment area (that is, when the user's touch operation enters the pre-judgment area), so as to save the user's Computational power consumption of the electronic device when the compass control is normally dragged in the compass operation area.
当电子设备生成预报点后中间层可以将预报点发送(上报)给电子设备的软件架构中的应用层以使移动罗盘中的罗盘控件能够根据预报点进行相应的移动。例如,电子设备执行以下S1004。After the electronic device generates the forecast point, the middle layer can send (report) the forecast point to the application layer in the software architecture of the electronic device, so that the compass control in the mobile compass can move accordingly according to the forecast point. For example, the electronic device executes the following S1004.
S1004、电子设备通过软件架构中的应用层根据预报点控制移动罗盘的罗盘控件移动,从而控制游戏人物相应移动。即,电子设备根据预报点控制罗盘控件移动到预报点所在位置。S1004, the electronic device controls the movement of the compass control of the moving compass according to the forecast point through the application layer in the software architecture, thereby controlling the corresponding movement of the game character. That is, the electronic device controls the compass control to move to the position of the forecast point according to the forecast point.
可选地,在一些其他实施例中,当电子设备显示的包括移动罗盘的画面为其他电子设备投屏或传送来的画面时,电子设备可以向其他电子设备发送预报点,以便于其他电子设备根据预报点控制移动罗盘的罗盘控件根据预报点移动。Optionally, in some other embodiments, when the picture including the moving compass displayed by the electronic device is the picture projected or transmitted by other electronic devices, the electronic device can send the forecast point to the other electronic devices, so as to facilitate other electronic devices. The compass controls that move the compass according to the forecast point control move according to the forecast point.
可选地,在本申请实施例中,电子设备生成预报点时,若用户触控操作过程中,通过触控介质折返滑动到移动罗盘的罗盘操作区域中后,电子设备可以不再生成预报点,后续移动罗盘的罗盘控件直接根据触控介质滑动时电子设备生成的触控报点(即用户触控的实际报点)进行移动。例如,用户折返滑动时滑动到罗盘操作区域内之后,中间层收到底层根据用户的触控操作生成的触控报点后不再生成预报点,而直接将触控报点上报给应用层便于罗盘控件此时根据触控报点进行移动。Optionally, in the embodiment of the present application, when the electronic device generates the forecast point, if the user switches back and slides the touch medium into the compass operation area of the mobile compass during the touch operation process, the electronic device may no longer generate the forecast point. , and the compass control of the subsequent moving compass directly moves according to the touch point reported by the electronic device when the touch medium slides (ie, the actual point touched by the user). For example, after the user slides back and slides into the compass operation area, the middle layer will not generate the forecast point after receiving the touch report point generated by the bottom layer according to the user's touch operation, but directly report the touch report point to the application layer for convenience The compass control now moves according to the touch point.
示例地,如图16所示,用户的触控操作对应的触控报点包括报点1至报点15,报点5至报点13位于预判区域1601内,其余报点均位于罗盘操作区域1602内。其中,当生成报点10(即用户触控滑动到报点10的位置)时,电子设备可以确定此时用户的触控操作为折返滑动。后续随着用户继续折返滑动时,电子设备可生成包括报点11至报点15的触控报点。相应地,由于报点11至报点13位于预判区域1601内没有进入罗盘操作区域1602,因此电子设备可以在罗盘操作区域1602内随着报点11至报点13的生成,依次生成预报点(例如图中所示的报点a、b、c)。当生成报点14(即用户触控滑动到报点14的位置)时,电子设备可根据报点14确定用户折返滑动的触控操作滑动到了罗盘操作区域1602内,此时在电子设备根据用户的触控操作生成下一个触控报点(例如图中所示的报点15)时,电子设备可以不再生成预报点,而是直接根据报点15及后续的触控报点控制罗盘控件移动。For example, as shown in FIG. 16 , the touch reporting points corresponding to the user's touch operation include
需要说明的是,在其他一些可能的实施方式中,当用户折返滑动到移动罗盘的罗盘操作区域内之后,只有当折返滑动对应的最新的触控报点在罗盘操作区域内与持续生成的最新的预报点近似重合,或最新的触控报点相比于最新的预报点在折返滑动方向上更超前(即最新的触控报点在折返滑动方向上追上了最新的预报点)时,电子设备才不再生成预报点以使后续罗盘控件直接根据触控介质滑动时电子设备生成的触控报点(即用户触控的实际报点)进行移动。从而,避免用户折返滑动到移动罗盘的罗盘操作区域内之后电子设备不再生成预报点时,由于折返滑动对应的触控报点没有追上预报点而导致罗盘控件根据触控报点又朝向折返滑动的反方向移动(即罗盘控件又被拉回)的情况发生。It should be noted that, in some other possible implementations, after the user slides back and slides into the compass operation area of the mobile compass, only when the latest touch point corresponding to the slide back and slide is in the compass operation area and the latest continuously generated When the forecast points of the touch control point are approximately coincident, or the latest touch point is more advanced than the latest forecast point in the return sliding direction (that is, the latest touch point catches up with the latest forecast point in the return sliding direction), The electronic device no longer generates forecast points, so that the subsequent compass controls move directly according to the touch points generated by the electronic device when the touch medium slides (ie, the actual points touched by the user). Therefore, when the electronic device no longer generates a forecast point after the user slides back and slides into the compass operation area of the mobile compass, the compass control will turn back according to the touch point because the touch point corresponding to the switchback slide does not catch up with the forecast point. This happens when the swipe moves in the opposite direction (ie the compass control is pulled back again).
可选地,在本申请实施例中,在触控介质沿第二方向滑动未进入罗盘操作区域内的情况下,若触控介质进行在罗盘操作区域外由折返滑动(沿第二方向的滑动)改变方向以第三方向滑动的触控操作(或称为第三操作)。则,响应于该第三操作,电子设备可以控制罗盘控件滑动至第二位置。其中,第二位置为触控介质与罗盘控件的默认位置(或称为初始位置)间连线与罗盘操作区域边界的交点。触控介质沿第三方向滑动的路径的延长线与罗盘操作区域不相交。需要说明的是,罗盘控件的默认位置可以是罗盘操作区域的几何中心。即,电子设备根据用户触控操作对应的触控报点确定在预判区域内触控操作为折返滑动时,电子设备根据后续的触控报点在移动罗盘的罗盘操作区域内生成预报点,若此时电子设备根据用户触控操作对应的触控报点,确定出用户触控操作还没有进入罗盘操作区域时滑动的方向在预判区域内又发生了变化(即用户折返滑动还没有滑动到罗盘操作区域内时滑动方向又发生了变化),且变化后的滑动方向与折返滑动的滑动方向相反,则电子设备可以不再生成预报点,而是直接根据后续的触控报点控制移动罗盘的罗盘控件移动(如,控制罗盘控件移动至上述的第二位置)。例如,用户折返滑动时还没有滑动到罗盘操作区域内时滑动方向在预判区域内又发生了变化,且变化后的滑动方向与折返滑动的滑动方向相反,则中间层收到底层根据用户的触控操作生成的触控报点后不再生成预报点,而直接将触控报点上报给应用层便于罗盘控件此时根据触控报点进行移动。Optionally, in this embodiment of the present application, when the touch medium slides in the second direction and does not enter the compass operation area, if the touch medium slides back and forth outside the compass operation area (sliding in the second direction) ) to change the direction and slide the touch operation in the third direction (or called the third operation). Then, in response to the third operation, the electronic device may control the compass control to slide to the second position. Wherein, the second position is the intersection of the line connecting the touch medium and the default position (or referred to as the initial position) of the compass control and the boundary of the compass operation area. The extension line of the path of the touch medium sliding in the third direction does not intersect with the compass operation area. It should be noted that the default position of the compass control may be the geometric center of the compass operation area. That is, when the electronic device determines, according to the touch report point corresponding to the user's touch operation, that the touch operation in the pre-judgment area is a turn-back sliding, the electronic device generates a prediction point in the compass operation area of the mobile compass according to the subsequent touch report point, If at this time, the electronic device determines, according to the touch report point corresponding to the user's touch operation, that the sliding direction has changed within the pre-judgment area when the user's touch operation has not yet entered the compass operation area (that is, the user has not slid while turning back and swiping). When the compass operation area is reached, the sliding direction changes again), and the changed sliding direction is opposite to the sliding direction of the return sliding, then the electronic device can no longer generate a forecast point, but directly control the movement according to the subsequent touch point reporting point. The compass control of the compass is moved (eg, the compass control is controlled to move to the second position described above). For example, if the user has not yet slid into the compass operation area when the user turns back and slides, the sliding direction changes again in the pre-judgment area, and the changed sliding direction is opposite to the sliding direction of the turn-back slide, then the middle layer receives the bottom layer according to the user's sliding direction. After the touch report point generated by the touch operation, the forecast point is no longer generated, and the touch report point is directly reported to the application layer, so that the compass control can move according to the touch report point at this time.
示例地,如图17所示,用户可以通过手指作为触控介质进行滑动触控操作。如图17中的(a)所示,用户可以从罗盘操作区域1701内开始沿某个方向(如第一方向)滑动至罗盘操作区域1701外的预判区域1702。此时罗盘控件1703可以沿第一方向滑动到罗盘操作区域1701的边界处。然后,用户可以再改变方向以其他方向(如第二方向)朝向罗盘操作区域1701滑动(即折返滑动)。此时,罗盘控件1703可以按照预报点沿第二方向由罗盘操作区域1701的边界处开始滑动。如图17中的(b)所示,用户沿第二方向还没有滑动到罗盘操作区域1701内时,又转变方向进行滑动(如以第三方向滑动)。此时罗盘控件1703可以按照用户当前触控的实际触控报点进行移动。如图18所示,当用户进行如图17所示的滑动触控操作时,随着用户的触控操作,用户的触控操作对应的触控报点包括报点1至报点16,报点5至报点16位于预判区域1801内,其余报点均位于罗盘操作区域1802内。其中,当生成报点10(即用户触控滑动到报点10的位置)时,电子设备可以确定此时用户的触控操作为折返滑动。后续随着用户继续折返滑动时,电子设备可生成包括报点11至报点13的触控报点。相应地,由于报点11至报点13位于预判区域1801内没有进入罗盘操作区域1802,因此电子设备可以在罗盘操作区域1802内随着报点11至报点13的生成,依次生成预报点(例如图中所示的报点a、b、c)。当生成报点14(即用户触控滑动到报点14的位置)时,电子设备可根据报点14确定用户的触控操作的滑动方向在预判区域1801内发生了变化,且变化后的方向与折返滑动的方向相反,此时电子设备可不再生成预报点,而直接根据报点14以及后续生成的触控报点(如图中所示的报点15和报点16)控制罗盘控件移动。For example, as shown in FIG. 17 , a user can perform a sliding touch operation by using a finger as a touch medium. As shown in (a) of FIG. 17 , the user can slide from the
需要说明的是,电子设备可以根据折返滑动的滑动轨迹与变化方向后的滑动轨迹,来判断滑动方向是否变化以及变化后的滑动方向是否与折返滑动的方向相反。例如,当变化后的滑动轨迹的方向(例如图18中所示的报点13指向报点14的方向)分解后的水平方向(即电子设备显示面板的横向方向)与折返滑动的方向分解后的水平方向相反时,可确定用户的触控操作的滑动方向发生了变化,且变化后的方向与折返滑动的滑动方向相反。It should be noted that the electronic device can determine whether the sliding direction has changed and whether the changed sliding direction is opposite to the direction of the folding sliding according to the sliding track of the return sliding and the sliding track after changing the direction. For example, when the direction of the changed sliding track (for example, the direction in which the
采用以上实施例中的方法,当用户需要通过触控介质(如,手指或触控笔)拖动滑动控件来控制被控制对象折返移动时,即使触控介质改变滑动方向进行折返滑动时没有在控制操作区域内,滑动控件也能够按照触控介质折返滑动的方向进行移动,以控制被控制对象相应移动。从而避免用户拖动滑动控件时,由于触控介质没有在控制操作区域内而需滑动一定距离待触控介质进入到控制操控区域后才能拖动滑动控件。降低了此时用户拖动滑动控件时的延迟,进而降低用户控制被控对象时的延迟。With the method in the above embodiment, when the user needs to drag the sliding control through a touch medium (eg, a finger or a stylus) to control the controlled object to move back and forth, even if the touch medium changes the sliding direction to perform the back slide In the control operation area, the sliding control can also move according to the direction of the touch medium return sliding, so as to control the controlled object to move accordingly. Therefore, when the user drags the sliding control, since the touch medium is not in the control operation area, it is necessary to slide a certain distance until the touch medium enters the control operation area before dragging the sliding control. The delay when the user drags the sliding control at this time is reduced, thereby reducing the delay when the user controls the controlled object.
对应于前述实施例中的方法,本申请实施例还提供一种触控装置。该装置可以应用于电子设备,用于实现前述实施例中的方法。该装置的功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。例如,图19示出了一种触控装置的结构示意图,如图19所示,该装置包括:显示模块1901和处理模块1902等。Corresponding to the methods in the foregoing embodiments, an embodiment of the present application further provides a touch control device. The apparatus can be applied to electronic equipment for implementing the methods in the foregoing embodiments. The functions of the apparatus may be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above functions. For example, FIG. 19 shows a schematic structural diagram of a touch device. As shown in FIG. 19 , the device includes: a
其中,显示模块1901,可以用于显示第一界面,第一界面包括控制操作区域以及位于控制操作区域内的滑动控件,滑动控件用于在控制操作区域内移动以控制被控制对象移动;处理模块1902,可以用于检测到触控介质由控制操作区域内沿第一方向滑动至控制操作区域外的第一操作,控制滑动控件沿第一方向移动至控制操作区域的边界的第一位置;检测到触控介质在控制操作区域外由第一方向滑动改变方向以第二方向滑动的第二操作,控制滑动控件在控制操作区域内沿第二方向移动;其中,触控介质沿第二方向滑动的路径的延长线与控制操作区域相交。Among them, the
在一种可能的实现方式中,处理模块1902,还可以用于检测到触控介质在控制操作区域外由第二方向滑动改变方向以第三方向滑动的第三操作,控制滑动控件移动至第二位置,第二位置为触控介质的触控位置与滑动控件的默认位置间连线与控制操作区域边界的交点;其中,触控介质沿第三方向滑动的路径的延长线与控制操作区域不相交。In a possible implementation manner, the
在另一种可能的实现方式中,处理模块1902,还可以用于控制被控制对象沿滑动控件的默认位置指向滑动控件所处位置的方向移动。In another possible implementation manner, the
在另一种可能的实现方式中,处理模块1902,具体用于根据第一操作过程中触控介质对应的触控报点控制滑动控件沿第一方向随触控介质滑动至控制操作区域的边界的第一位置。In another possible implementation manner, the
在另一种可能的实现方式中,处理模块1902,具体用于根据第二操作过程中触控介质对应的触控报点确定触控介质在控制操作区域外由第一方向滑动改变方向以第二方向滑动;根据第二操作过程中触控介质对应的触控报点在控制操作区域内沿第二方向生成预报点;根据预报点控制滑动控件在控制操作区域内沿第二方向移动。In another possible implementation manner, the
在另一种可能的实现方式中,在控制操作区域外设置有预判区域;第二操作为触控介质在预判区域内由第一方向滑动改变方向以第二方向滑动;处理模块1902,具体用于根据第二操作过程中对应的触控报点确定触控介质在预判区域内由第一方向滑动改变方向以第二方向滑动。In another possible implementation manner, a pre-judgment area is set outside the control operation area; the second operation is to slide the touch medium in the pre-judgment area by sliding in the first direction to change the direction and slide in the second direction; the
在另一种可能的实现方式中,预判区域为预先设置的,或,预判区域为根据触控介质在控制操作区域所处位置的预设区域范围内的历史触控操作生成的。In another possible implementation manner, the pre-judgment area is preset, or the pre-judgment area is generated according to historical touch operations of the touch medium within the range of the preset area where the control operation area is located.
在另一种可能的实现方式中,处理模块1902,还可以用于在触控介质沿第二方向滑动至控制操作区域内的情况下,根据触控介质对应的触控报点控制滑动控件随触控介质在控制操作区域内沿第二方向滑动。In another possible implementation manner, the
在另一种可能的实现方式中,处理模块1902,具体用于根据第三操作过程中触控介质对应的触控报点确定触控介质在控制操作区域外由第二方向滑动改变方向以第三方向滑动;控制滑动控件滑动至第二位置。In another possible implementation manner, the
在另一种可能的实现方式中,第一界面包括游戏界面,控制操作区域包括罗盘操作区域,滑动控件包括罗盘控件,被控制对象包括游戏界面中的游戏角色。In another possible implementation manner, the first interface includes a game interface, the control operation area includes a compass operation area, the sliding control includes a compass control, and the controlled object includes a game character in the game interface.
在另一种可能的实现方式中,触控介质包括触控笔、用户的手指等。In another possible implementation manner, the touch medium includes a stylus, a user's finger, and the like.
应理解以上装置中单元或模块(以下均称为单元)的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。It should be understood that the division of units or modules (hereinafter referred to as units) in the above apparatus is only a division of logical functions, and may be fully or partially integrated into a physical entity in actual implementation, or may be physically separated. And the units in the device can all be implemented in the form of software calling through the processing element; also all can be implemented in the form of hardware; some units can also be implemented in the form of software calling through the processing element, and some units can be implemented in the form of hardware.
例如,各个单元可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序的形式存储于存储器中,由装置的某一个处理元件调用并执行该单元的功能。此外这些单元全部或部分可以集成在一起,也可以独立实现。这里所述的处理元件又可以称为处理器,可以是一种具有信号的处理能力的集成电路。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路实现或者以软件通过处理元件调用的形式实现。For example, each unit can be a separately established processing element, or can be integrated in a certain chip of the device to be implemented, and can also be stored in the memory in the form of a program, which can be called by a certain processing element of the device and execute the unit's processing. Function. In addition, all or part of these units can be integrated together, and can also be implemented independently. The processing element described here may also be called a processor, which may be an integrated circuit with signal processing capability. In the implementation process, each step of the above method or each of the above units may be implemented by an integrated logic circuit of hardware in the processor element or implemented in the form of software being invoked by the processing element.
在一个例子中,以上装置中的单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或这些集成电路形式中至少两种的组合。In one example, the units in the above apparatus may be one or more integrated circuits configured to implement the above method, such as: one or more ASICs, or, one or more DSPs, or, one or more FPGAs, or a combination of at least two of these integrated circuit forms.
再如,当装置中的单元可以通过处理元件调度程序的形式实现时,该处理元件可以是通用处理器,例如CPU或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。For another example, when a unit in the apparatus can be implemented in the form of a processing element scheduler, the processing element can be a general-purpose processor, such as a CPU or other processors that can invoke programs. For another example, these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
在一种实现中,以上装置实现以上方法中各个对应步骤的单元可以通过处理元件调度程序的形式实现。例如,该装置可以包括处理元件和存储元件,处理元件调用存储元件存储的程序,以执行以上方法实施例所述的方法。存储元件可以为与处理元件处于同一芯片上的存储元件,即片内存储元件。In one implementation, the unit of the above apparatus for implementing each corresponding step in the above method may be implemented in the form of a processing element scheduler. For example, the apparatus may include a processing element and a storage element, and the processing element invokes a program stored in the storage element to execute the method described in the above method embodiments. The storage element may be a storage element on the same chip as the processing element, ie, an on-chip storage element.
在另一种实现中,用于执行以上方法的程序可以在与处理元件处于不同芯片上的存储元件,即片外存储元件。此时,处理元件从片外存储元件调用或加载程序于片内存储元件上,以调用并执行以上方法实施例所述的方法。In another implementation, the program for performing the above method may be in a storage element on a different chip from the processing element, ie, an off-chip storage element. At this time, the processing element calls or loads the program from the off-chip storage element to the on-chip storage element, so as to call and execute the methods described in the above method embodiments.
例如,本申请实施例还可以提供一种装置,如:电子设备,可以包括:处理器,用于存储该处理器可执行指令的存储器。该处理器被配置为执行上述指令时,使得该电子设备实现如前述实施例所述的触控方法。该存储器可以位于该电子设备之内,也可以位于该电子设备之外。且该处理器包括一个或多个。For example, an embodiment of the present application may further provide an apparatus, such as an electronic device, which may include a processor, and a memory for storing instructions executable by the processor. When the processor is configured to execute the above instructions, the electronic device implements the touch control method described in the foregoing embodiments. The memory may be located within the electronic device or external to the electronic device. And the processor includes one or more.
在又一种实现中,该装置实现以上方法中各个步骤的单元可以是被配置成一个或多个处理元件,这些处理元件可以设置于对应上述的电子设备上,这里的处理元件可以为集成电路,例如:一个或多个ASIC,或,一个或多个DSP,或,一个或者多个FPGA,或者这些类集成电路的组合。这些集成电路可以集成在一起,构成芯片。In yet another implementation, the unit of the apparatus for implementing each step in the above method may be configured as one or more processing elements, and these processing elements may be provided on the corresponding electronic equipment described above, and the processing elements here may be integrated circuits , for example: one or more ASICs, or, one or more DSPs, or, one or more FPGAs, or a combination of these types of integrated circuits. These integrated circuits can be integrated together to form chips.
例如,本申请实施例还提供一种芯片,该芯片可以应用于上述电子设备。芯片包括一个或多个接口电路和一个或多个处理器;接口电路和处理器通过线路互联;处理器通过接口电路从电子设备的存储器接收并执行计算机指令,以实现以上方法实施例中所述的方法。For example, an embodiment of the present application further provides a chip, which can be applied to the above electronic device. The chip includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the processor receives and executes computer instructions from the memory of the electronic device through the interface circuit, so as to realize the above method embodiments. Methods.
本申请实施例还提供一种计算机程序产品,包括电子设备,如上述电子设备,运行的计算机指令。Embodiments of the present application further provide a computer program product, including computer instructions for running an electronic device, such as the above-mentioned electronic device.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。From the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of the description, only the division of the above functional modules is used as an example for illustration. In practical applications, the above functions can be allocated as required. It is completed by different functional modules, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be Incorporation may either be integrated into another device, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place, or may be distributed to multiple different places . Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,如:程序。该软件产品存储在一个程序产品,如计算机可读存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application essentially or contribute to the prior art, or all or part of the technical solutions may be embodied in the form of software products, such as programs. The software product is stored in a program product, such as a computer-readable storage medium, and includes several instructions to cause a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) to execute all of the methods described in the various embodiments of the present application. or part of the steps. The aforementioned storage medium includes: a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk and other mediums that can store program codes.
例如,本申请实施例还可以提供一种计算机可读存储介质,其上存储有计算机程序指令。当计算机程序指令被电子设备执行时,使得电子设备实现如前述方法实施例中所述的触控方法。For example, the embodiments of the present application may further provide a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by the electronic device, the electronic device is made to implement the touch control method described in the foregoing method embodiments.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited to this, and any changes or substitutions within the technical scope disclosed in the present application should be covered within the protection scope of the present application. . Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110654261.5A CN113476822B (en) | 2021-06-11 | 2021-06-11 | Touch method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110654261.5A CN113476822B (en) | 2021-06-11 | 2021-06-11 | Touch method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113476822A CN113476822A (en) | 2021-10-08 |
CN113476822B true CN113476822B (en) | 2022-06-10 |
Family
ID=77934845
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110654261.5A Active CN113476822B (en) | 2021-06-11 | 2021-06-11 | Touch method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113476822B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114489457B (en) * | 2022-01-27 | 2024-01-19 | 北京字跳网络技术有限公司 | Virtual object control method and device, readable medium and electronic equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107008003A (en) * | 2017-04-13 | 2017-08-04 | 网易(杭州)网络有限公司 | Information processing method, device, electronic equipment and computer-readable recording medium |
CN111589127A (en) * | 2020-04-23 | 2020-08-28 | 腾讯科技(深圳)有限公司 | Control method, device and equipment of virtual role and storage medium |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1285330B1 (en) * | 2000-05-11 | 2006-08-30 | Nes Stewart Irvine | Zeroclick |
US7044854B2 (en) * | 2001-07-09 | 2006-05-16 | Abecassis David H | Area-based resource collection in a real-time strategy game |
CN106598465A (en) * | 2016-12-20 | 2017-04-26 | 上海逗屋网络科技有限公司 | Control method, device and equipment based on virtual rocker |
CN107168611B (en) * | 2017-06-16 | 2018-12-28 | 网易(杭州)网络有限公司 | Information processing method, device, electronic equipment and storage medium |
CN109753327A (en) * | 2018-11-19 | 2019-05-14 | 努比亚技术有限公司 | A kind of control layout method, terminal and computer readable storage medium |
CN111589112B (en) * | 2020-04-24 | 2021-10-22 | 腾讯科技(深圳)有限公司 | Interface display method, device, terminal and storage medium |
CN111481923B (en) * | 2020-05-18 | 2023-09-26 | 网易(杭州)网络有限公司 | Rocker display method and device, computer storage medium and electronic equipment |
CN111694494B (en) * | 2020-06-10 | 2022-04-26 | 维沃移动通信有限公司 | Control method and device |
CN112698780A (en) * | 2020-12-29 | 2021-04-23 | 贵阳动视云科技有限公司 | Virtual rocker control method and device |
-
2021
- 2021-06-11 CN CN202110654261.5A patent/CN113476822B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107008003A (en) * | 2017-04-13 | 2017-08-04 | 网易(杭州)网络有限公司 | Information processing method, device, electronic equipment and computer-readable recording medium |
CN111589127A (en) * | 2020-04-23 | 2020-08-28 | 腾讯科技(深圳)有限公司 | Control method, device and equipment of virtual role and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113476822A (en) | 2021-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230068100A1 (en) | Widget processing method and related apparatus | |
JP5507494B2 (en) | Portable electronic device with touch screen and control method | |
US8970503B2 (en) | Gestures for devices having one or more touch sensitive surfaces | |
US20180341324A1 (en) | Proximity detector in handheld device | |
KR102519800B1 (en) | Electronic device | |
JP5759660B2 (en) | Portable information terminal having touch screen and input method | |
WO2018082269A1 (en) | Menu display method and terminal | |
US20150185953A1 (en) | Optimization operation method and apparatus for terminal interface | |
US9459704B2 (en) | Method and apparatus for providing one-handed user interface in mobile device having touch screen | |
US20150160849A1 (en) | Bezel Gesture Techniques | |
US10963011B2 (en) | Touch input method and mobile terminal | |
CN107066167A (en) | A kind of regional selection method, device and graphic user interface | |
US20140035853A1 (en) | Method and apparatus for providing user interaction based on multi touch finger gesture | |
US9367230B2 (en) | Interaction models for indirect interaction devices | |
WO2019119799A1 (en) | Method for displaying application icon, and terminal device | |
CN107340948A (en) | A kind of video playing control method and mobile terminal | |
CN107526523B (en) | Method for controlling operation interface of mobile terminal and mobile terminal | |
CN105718204A (en) | Touch gesture based control method and device | |
CN113476822B (en) | Touch method and device | |
CN107562262A (en) | A kind of method, terminal and computer-readable recording medium for responding touch control operation | |
WO2022228097A1 (en) | Display method, display apparatus and electronic device | |
EP3605298B1 (en) | Method for adjusting scrolling speed of interface, related device, and computer program product | |
US20150153925A1 (en) | Method for operating gestures and method for calling cursor | |
WO2018076384A1 (en) | Screen locking method, terminal and screen locking device | |
US20170017389A1 (en) | Method and apparatus for smart device manipulation utilizing sides of device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040 Patentee after: Honor Terminal Co.,Ltd. Country or region after: China Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong Patentee before: Honor Device Co.,Ltd. Country or region before: China |