Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SK
MDPro3
Commits
a2364503
Commit
a2364503
authored
Mar 17, 2026
by
SherryChaos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug Fix: Card Protector items bleed outside
parent
6367fe13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
15 deletions
+31
-15
Assets/Scripts/MDPro3/Helper/ABLoader.cs
Assets/Scripts/MDPro3/Helper/ABLoader.cs
+15
-5
Assets/Scripts/MDPro3/UI/SelectionButton/SelectionToggle_AppearanceItem.cs
...Pro3/UI/SelectionButton/SelectionToggle_AppearanceItem.cs
+16
-10
No files found.
Assets/Scripts/MDPro3/Helper/ABLoader.cs
View file @
a2364503
...
@@ -331,7 +331,16 @@ namespace MDPro3
...
@@ -331,7 +331,16 @@ namespace MDPro3
}
}
}
}
private
static
Shader
defaultProtectorShader
;
private
const
string
defaultProtectorCode
=
"1070002"
;
public
static
async
UniTask
<
Material
>
LoadProtectorMaterial
(
string
code
,
CancellationToken
token
)
public
static
async
UniTask
<
Material
>
LoadProtectorMaterial
(
string
code
,
CancellationToken
token
)
{
if
(
defaultProtectorShader
==
null
)
await
InternalLoadProtectorMaterialAsync
(
defaultProtectorCode
,
token
);
return
await
InternalLoadProtectorMaterialAsync
(
code
,
token
);
}
public
static
async
UniTask
<
Material
>
InternalLoadProtectorMaterialAsync
(
string
code
,
CancellationToken
token
)
{
{
await
protectorSemaphoreSlim
.
WaitAsync
(
token
);
await
protectorSemaphoreSlim
.
WaitAsync
(
token
);
...
@@ -381,14 +390,15 @@ namespace MDPro3
...
@@ -381,14 +390,15 @@ namespace MDPro3
return
null
;
return
null
;
}
}
if
(
defaultProtectorShader
==
null
&&
code
==
defaultProtectorCode
)
defaultProtectorShader
=
material
.
shader
;
if
(
material
.
shader
.
name
.
Contains
(
"3D"
))
material
.
shader
=
defaultProtectorShader
;
material
.
renderQueue
=
3000
;
material
.
renderQueue
=
3000
;
foreach
(
var
bundle
in
bundles
)
foreach
(
var
bundle
in
bundles
)
bundle
.
Unload
(
false
);
bundle
.
Unload
(
false
);
cachedPMat
.
TryAdd
(
code
,
material
);
if
(
cachedPMat
.
ContainsKey
(
code
))
material
=
cachedPMat
[
code
];
else
cachedPMat
.
Add
(
code
,
material
);
return
material
;
return
material
;
}
}
...
...
Assets/Scripts/MDPro3/UI/SelectionButton/SelectionToggle_AppearanceItem.cs
View file @
a2364503
...
@@ -55,8 +55,9 @@ namespace MDPro3.UI
...
@@ -55,8 +55,9 @@ namespace MDPro3.UI
private
Image
premiumOverlayIcon
;
private
Image
premiumOverlayIcon
;
private
Coroutine
premiumCrossfadeCoroutine
;
private
Coroutine
premiumCrossfadeCoroutine
;
private
const
float
CrossfadeHoldSeconds
=
2.0f
;
private
const
float
CrossfadeHoldSeconds
=
3.0f
;
private
const
float
CrossfadeFadeSeconds
=
0.6f
;
private
const
float
CrossfadeFadeSeconds
=
1.0f
;
private
static
readonly
Dictionary
<
int
,
Sprite
>
cachedArtSprites
=
new
();
protected
override
void
Awake
()
protected
override
void
Awake
()
{
{
...
@@ -84,16 +85,15 @@ namespace MDPro3.UI
...
@@ -84,16 +85,15 @@ namespace MDPro3.UI
if
(
path
.
StartsWith
(
"Protector"
))
if
(
path
.
StartsWith
(
"Protector"
))
{
{
Protector
.
material
=
await
ABLoader
.
LoadProtector
.
material
(
itemID
.
ToString
(),
destroyCancellationToken
);
Protector
.
color
=
Color
.
white
;
Icon
.
gameObject
.
SetActive
(
false
);
Icon
.
gameObject
.
SetActive
(
false
);
Protector
.
material
=
await
ABLoader
.
LoadProtectorMaterial
(
itemID
.
ToString
(),
destroyCancellationToken
);
Protector
.
color
=
Color
.
white
;
}
}
else
if
(
path
.
Length
>
0
)
else
if
(
path
.
Length
>
0
)
{
{
Icon
.
sprite
=
await
Program
.
items
.
LoadItemIconAsync
(
itemID
.
ToString
(),
Items
.
ItemType
.
Unknown
);
Icon
.
sprite
=
await
Program
.
items
.
LoadItemIconAsync
(
itemID
.
ToString
(),
Items
.
ItemType
.
Unknown
);
if
(
cancellationToken
.
IsCancellationRequested
||
this
==
null
||
Manager
==
null
)
if
(
cancellationToken
.
IsCancellationRequested
||
this
==
null
||
Manager
==
null
)
return
;
return
;
Icon
.
color
=
Color
.
white
;
if
(
path
.
StartsWith
(
"ProfileFrame"
))
if
(
path
.
StartsWith
(
"ProfileFrame"
))
{
{
Icon
.
rectTransform
.
localScale
=
Vector3
.
one
*
0.8f
;
Icon
.
rectTransform
.
localScale
=
Vector3
.
one
*
0.8f
;
...
@@ -102,7 +102,6 @@ namespace MDPro3.UI
...
@@ -102,7 +102,6 @@ namespace MDPro3.UI
return
;
return
;
Icon
.
material
.
SetTexture
(
"_ProfileFrameTex"
,
Icon
.
sprite
.
texture
);
Icon
.
material
.
SetTexture
(
"_ProfileFrameTex"
,
Icon
.
sprite
.
texture
);
Icon
.
sprite
=
TextureManager
.
container
.
black
;
Icon
.
sprite
=
TextureManager
.
container
.
black
;
Icon
.
color
=
Color
.
white
;
}
}
else
if
(
path
.
StartsWith
(
"DeckCase"
))
else
if
(
path
.
StartsWith
(
"DeckCase"
))
{
{
...
@@ -112,15 +111,22 @@ namespace MDPro3.UI
...
@@ -112,15 +111,22 @@ namespace MDPro3.UI
{
{
WallpaperBG
.
gameObject
.
SetActive
(
true
);
WallpaperBG
.
gameObject
.
SetActive
(
true
);
}
}
Icon
.
color
=
Color
.
white
;
Protector
.
gameObject
.
SetActive
(
false
);
Protector
.
gameObject
.
SetActive
(
false
);
}
}
else
//CrossDuel Mate
else
//CrossDuel Mate
{
{
var
art
=
await
CardImageLoader
.
LoadArtAsync
(
itemID
,
true
,
cancellationToken
);
if
(!
cachedArtSprites
.
TryGetValue
(
itemID
,
out
var
sprite
))
if
(
cancellationToken
.
IsCancellationRequested
||
this
==
null
)
{
return
;
var
art
=
await
CardImageLoader
.
LoadArtAsync
(
itemID
,
true
,
cancellationToken
);
if
(
cancellationToken
.
IsCancellationRequested
||
this
==
null
)
return
;
sprite
=
TextureManager
.
Texture2Sprite
(
art
);
cachedArtSprites
.
TryAdd
(
itemID
,
sprite
);
}
Icon
.
sprite
=
sprite
;
Icon
.
color
=
Color
.
white
;
Icon
.
color
=
Color
.
white
;
Icon
.
sprite
=
TextureManager
.
Texture2Sprite
(
art
);
Protector
.
gameObject
.
SetActive
(
false
);
Protector
.
gameObject
.
SetActive
(
false
);
}
}
...
...
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