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
77f576e2
Unverified
Commit
77f576e2
authored
Apr 25, 2019
by
Rémi Verschelde
Committed by
GitHub
Apr 25, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #28418 from guilhermefelipecgs/fix_scroll
Fix scroll for texture_region and polygon_2d editor
parents
ae8f8530
f662f150
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
polygon_2d_editor_plugin.cpp
editor/plugins/polygon_2d_editor_plugin.cpp
+3
-3
texture_region_editor_plugin.cpp
editor/plugins/texture_region_editor_plugin.cpp
+4
-3
No files found.
editor/plugins/polygon_2d_editor_plugin.cpp
View file @
77f576e2
...
...
@@ -1060,8 +1060,7 @@ void Polygon2DEditor::_uv_draw() {
polygon_fill_color
.
push_back
(
pf
);
}
Color
prev_color
=
Color
(
0.5
,
0.5
,
0.5
);
Rect2
rect
(
Point2
(),
mtx
.
basis_xform
(
base_tex
->
get_size
()));
rect
.
expand_to
(
mtx
.
basis_xform
(
uv_edit_draw
->
get_size
()));
Rect2
rect
;
int
uv_draw_max
=
uvs
.
size
();
...
...
@@ -1204,7 +1203,8 @@ void Polygon2DEditor::_uv_draw() {
uv_edit_draw
->
draw_circle
(
bone_paint_pos
,
bone_paint_radius
->
get_value
()
*
EDSCALE
,
Color
(
1
,
1
,
1
,
0.1
));
}
rect
=
rect
.
grow
(
200
);
rect
.
position
-=
uv_edit_draw
->
get_size
();
rect
.
size
+=
uv_edit_draw
->
get_size
()
*
2.0
;
updating_uv_scroll
=
true
;
uv_hscroll
->
set_min
(
rect
.
position
.
x
);
uv_hscroll
->
set_max
(
rect
.
position
.
x
+
rect
.
size
.
x
);
...
...
editor/plugins/texture_region_editor_plugin.cpp
View file @
77f576e2
...
...
@@ -135,8 +135,7 @@ void TextureRegionEditor::_region_draw() {
Ref
<
Texture
>
select_handle
=
get_icon
(
"EditorHandle"
,
"EditorIcons"
);
Rect2
scroll_rect
(
Point2
(),
mtx
.
basis_xform
(
base_tex
->
get_size
()));
scroll_rect
.
expand_to
(
mtx
.
basis_xform
(
edit_draw
->
get_size
()));
Rect2
scroll_rect
;
Vector2
endpoints
[
4
]
=
{
mtx
.
basis_xform
(
rect
.
position
),
...
...
@@ -167,7 +166,9 @@ void TextureRegionEditor::_region_draw() {
scroll_rect
.
expand_to
(
endpoints
[
i
]);
}
scroll_rect
=
scroll_rect
.
grow
(
200
);
scroll_rect
.
position
-=
edit_draw
->
get_size
();
scroll_rect
.
size
+=
edit_draw
->
get_size
()
*
2.0
;
updating_scroll
=
true
;
hscroll
->
set_min
(
scroll_rect
.
position
.
x
);
hscroll
->
set_max
(
scroll_rect
.
position
.
x
+
scroll_rect
.
size
.
x
);
...
...
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