fix(deck): 카드 picker 표시·클릭 복구 + UIGroup 렌더 순서/덱 레이아웃 조정
덱창(카드 picker)의 카드가 표시·클릭되지 않던 두 버그를 근본 수정.
표시 버그: 덱뷰 render(RenderAllDeck/RenderClassDeckTabs/RenderDeckInspect)가
비-DefaultGroup(DeckUIGroup) 카드를 직접 e.Enable로 켰는데, 깊게 중첩된
ExecSpace 6 호출이라 .Enable 토글이 스코프 상실로 무효(문서화된 afac34d 버그).
Maker 저작 DeckAllHud 카드는 기본 enable=false라 안 보였음. → SetEntityEnabled
(ExecSpace 2 ClientOnly, 인라인 실행) 경유로 변경(전투 HUD와 동일 패턴).
클릭 버그: Maker 저작 DeckAllHud 카드 120장의 SpriteGUIRendererComponent.
RaycastTarget=false라 클릭 레이를 못 받아 런타임 부착 ButtonComponent에 클릭이
도달 못함(같은 패널 탭/Close는 raycast=true라 정상이던 게 결정적 단서). →
BindButtons 카드 루프에서 RaycastTarget=true 런타임 주입.
README: 디버그 단축키 섹션 추가(Ctrl+Shift+C 카드 picker / Ctrl+Shift+E 에너지).
Maker UI 저작(메이커 편집분 동반): 6개 UIGroup GroupOrder 재배치
(DeckUIGroup 최상단 4→6 등) + DeckUIGroup 카드 그리드 위치 조정(180장).
산출물 재생성: SlayDeckController.codeblock.
검증: cbgap GAP 0, JS 미러 41/41, 인게임 클릭 동작 확인.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -42,23 +42,18 @@ if count > 60 then
|
||||
suffix = suffix .. " - 60장까지 표시"
|
||||
end
|
||||
self:SetText("/ui/DeckUIGroup/DeckInspectHud/Title", title .. suffix)
|
||||
local empty = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud/Empty")
|
||||
if empty ~= nil then
|
||||
empty.Enable = count <= 0
|
||||
end
|
||||
self:SetEntityEnabled("/ui/DeckUIGroup/DeckInspectHud/Empty", count <= 0)
|
||||
for i = 1, 60 do
|
||||
local e = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckInspectHud/Grid/Card" .. tostring(i))
|
||||
if e ~= nil then
|
||||
local cardId = nil
|
||||
if pile ~= nil then
|
||||
cardId = pile[i]
|
||||
end
|
||||
if cardId == nil then
|
||||
e.Enable = false
|
||||
else
|
||||
e.Enable = true
|
||||
self:ApplyInspectCardVisual(i, cardId)
|
||||
end
|
||||
local path = "/ui/DeckUIGroup/DeckInspectHud/Grid/Card" .. tostring(i)
|
||||
local cardId = nil
|
||||
if pile ~= nil then
|
||||
cardId = pile[i]
|
||||
end
|
||||
if cardId == nil then
|
||||
self:SetEntityEnabled(path, false)
|
||||
else
|
||||
self:SetEntityEnabled(path, true)
|
||||
self:ApplyInspectCardVisual(i, cardId)
|
||||
end
|
||||
end`, [
|
||||
{ Type: 'any', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'pile' },
|
||||
@@ -171,15 +166,13 @@ self:RenderClassDeckTabs()`, [{ Type: 'string', DefaultValue: null, SyncDirectio
|
||||
{ path = "/ui/DeckUIGroup/DeckAllHud/MageTab", cls = "magician" },
|
||||
}
|
||||
for i = 1, #tabs do
|
||||
self:SetEntityEnabled(tabs[i].path, self.ClassDeckMode == true)
|
||||
local e = _EntityService:GetEntityByPath(tabs[i].path)
|
||||
if e ~= nil then
|
||||
e.Enable = self.ClassDeckMode == true
|
||||
if e.SpriteGUIRendererComponent ~= nil then
|
||||
if self.ClassDeckClass == tabs[i].cls then
|
||||
e.SpriteGUIRendererComponent.Color = Color(0.22, 0.28, 0.34, 1)
|
||||
else
|
||||
e.SpriteGUIRendererComponent.Color = Color(0.11, 0.13, 0.16, 1)
|
||||
end
|
||||
if e ~= nil and e.SpriteGUIRendererComponent ~= nil then
|
||||
if self.ClassDeckClass == tabs[i].cls then
|
||||
e.SpriteGUIRendererComponent.Color = Color(0.22, 0.28, 0.34, 1)
|
||||
else
|
||||
e.SpriteGUIRendererComponent.Color = Color(0.11, 0.13, 0.16, 1)
|
||||
end
|
||||
end
|
||||
end`),
|
||||
@@ -230,20 +223,15 @@ end
|
||||
local count = #pile
|
||||
self:SetText("/ui/DeckUIGroup/DeckAllHud/Title", title .. " (" .. tostring(count) .. ")")
|
||||
self:RenderClassDeckTabs()
|
||||
local empty = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Empty")
|
||||
if empty ~= nil then
|
||||
empty.Enable = count <= 0
|
||||
end
|
||||
self:SetEntityEnabled("/ui/DeckUIGroup/DeckAllHud/Empty", count <= 0)
|
||||
for i = 1, 120 do
|
||||
local e = _EntityService:GetEntityByPath("/ui/DeckUIGroup/DeckAllHud/Grid/Card" .. tostring(i))
|
||||
if e ~= nil then
|
||||
local cardId = pile[i]
|
||||
if cardId == nil then
|
||||
e.Enable = false
|
||||
else
|
||||
e.Enable = true
|
||||
self:ApplyAllDeckCardVisual(i, cardId)
|
||||
end
|
||||
local path = "/ui/DeckUIGroup/DeckAllHud/Grid/Card" .. tostring(i)
|
||||
local cardId = pile[i]
|
||||
if cardId == nil then
|
||||
self:SetEntityEnabled(path, false)
|
||||
else
|
||||
self:SetEntityEnabled(path, true)
|
||||
self:ApplyAllDeckCardVisual(i, cardId)
|
||||
end
|
||||
end`),
|
||||
method('ApplyAllDeckCardVisual', `self:ApplyCardFace("/ui/DeckUIGroup/DeckAllHud/Grid/Card" .. tostring(slot), cardId)`, [
|
||||
|
||||
Reference in New Issue
Block a user