Welcome,
Guest
. Please
login
or
register
.
May 06, 2026, 06:04:44 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Texture/Sprite Corners visibility bug
« previous
next »
Print
Pages: [
1
]
Author
Topic: Texture/Sprite Corners visibility bug (Read 7612 times)
Eugene
Newbie
Thank You
-Given: 1
-Receive: 0
Posts: 3
Texture/Sprite Corners visibility bug
«
on:
February 15, 2017, 01:45:56 PM »
I believe it's not the way it's supposed to work:
http://clip2net.com/s/3Hyx7He
The problem place is (UIBasicSprite::981).
This bit:
if
(
(
y
==
0
&&
bottomType
!=
AdvancedType
.
Invisible
)
||
(
y
==
2
&&
topType
!=
AdvancedType
.
Invisible
)
||
(
x
==
0
&&
leftType
!=
AdvancedType
.
Invisible
)
||
(
x
==
2
&&
rightType
!=
AdvancedType
.
Invisible
)
)
Should be changed to this:
bool
show
=
true
;
if
(
y
==
0
&&
bottomType
==
AdvancedType
.
Invisible
)
show
=
false
;
if
(
y
==
2
&&
topType
==
AdvancedType
.
Invisible
)
show
=
false
;
if
(
x
==
0
&&
leftType
==
AdvancedType
.
Invisible
)
show
=
false
;
if
(
x
==
2
&&
rightType
==
AdvancedType
.
Invisible
)
show
=
false
;
if
(
show
)
{
And then it should work as it should. Please, add it to next NGUI patch.
Cheers.
Logged
mdeletrain
Jr. Member
Thank You
-Given: 0
-Receive: 1
Posts: 71
Re: Texture/Sprite Corners visibility bug
«
Reply #1 on:
February 16, 2017, 05:58:31 AM »
I may be wrong but I think this is the same as :
if
(
(
y
!=
0
||
bottomType
!=
AdvancedType
.
Invisible
)
&&
(
y
!=
2
||
topType
!=
AdvancedType
.
Invisible
)
&&
(
x
!=
0
||
leftType
!=
AdvancedType
.
Invisible
)
&&
(
x
!=
2
||
rightType
!=
AdvancedType
.
Invisible
)
)
So to keep initial form... but it's less readable.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Texture/Sprite Corners visibility bug
«
Reply #2 on:
February 18, 2017, 07:04:19 PM »
I think you mean...
if
(
y
==
0
&&
bottomType
==
AdvancedType
.
Invisible
)
continue
;
if
(
y
==
2
&&
topType
==
AdvancedType
.
Invisible
)
continue
;
if
(
x
==
0
&&
leftType
==
AdvancedType
.
Invisible
)
continue
;
if
(
x
==
2
&&
rightType
==
AdvancedType
.
Invisible
)
continue
;
Fill
(
verts, uvs, cols,
mTempPos
[
x
]
.
x
, mTempPos
[
x2
]
.
x
,
mTempPos
[
y
]
.
y
, mTempPos
[
y2
]
.
y
,
mTempUVs
[
x
]
.
x
, mTempUVs
[
x2
]
.
x
,
mTempUVs
[
y
]
.
y
, mTempUVs
[
y2
]
.
y
, c
)
;
I've ran into this before myself and always thought to myself, "well it has been this way since the beginning... why change it now?". I can see how the current approach can cause some confusion though, seeing as there is no way to explicitly hide corners.
Logged
Eugene
Newbie
Thank You
-Given: 1
-Receive: 0
Posts: 3
Re: Texture/Sprite Corners visibility bug
«
Reply #3 on:
February 19, 2017, 01:15:04 PM »
@ArenMook, yeah. As long as I can keep ngui changes in my project to the minimum, it works for me. Thanks!
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Texture/Sprite Corners visibility bug