Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
e253451a
Commit
e253451a
authored
May 07, 2020
by
Mateo Kuruk Miccino
Committed by
Rémi Verschelde
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GUI: Touch screen button click area now is synced with its draw
(cherry picked from commit 1cba7fb1804c35917c075e323b6d303f5a900df6)
parent
d7b85fba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
touch_screen_button.cpp
scene/2d/touch_screen_button.cpp
+3
-2
No files found.
scene/2d/touch_screen_button.cpp
View file @
e253451a
...
...
@@ -260,9 +260,10 @@ bool TouchScreenButton::_is_point_inside(const Point2 &p_point) {
bool
check_rect
=
true
;
if
(
shape
.
is_valid
())
{
check_rect
=
false
;
Transform2D
xform
=
shape_centered
?
Transform2D
().
translated
(
shape
->
get_rect
().
size
*
0.5
f
)
:
Transform2D
();
Vector2
size
=
texture
.
is_null
()
?
shape
->
get_rect
().
size
:
texture
->
get_size
();
Transform2D
xform
=
shape_centered
?
Transform2D
().
translated
(
size
*
0.5
f
)
:
Transform2D
();
touched
=
shape
->
collide
(
xform
,
unit_rect
,
Transform2D
(
0
,
coord
+
Vector2
(
0.5
,
0.5
)));
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment