diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 16287e040..da3d61395 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -1745,6 +1745,27 @@ PS_OUT PS_Broomstick(PS_IN In) return Out; } +PS_OUT PS_SpellLearn(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + + float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r; + Color = tex; + + tex1 *= 0.95f; + + Color.a = tex1; + + Color.a *= Alpha; + + Out.vColor = Color; + return Out; +} + struct VS_IN3D { float3 vPosition : POSITION; @@ -2305,6 +2326,16 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Broomstick(); } + pass SpellLearn + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_SpellLearn(); + } + pass Enemy_Detection { SetRasterizerState(RS_Nocull); diff --git a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp index 40050137e..6ce105aa7 100644 --- a/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp +++ b/Jusin154_Team3D/Client/Private/Goblin_Mage.cpp @@ -326,6 +326,8 @@ void CGoblin_Mage::OnCollision(CGameObject* pOther, void* pDesc) m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo); if (0 == damagePair.second) { m_pFSM->Change_State(FSMSTATE::DEAD); + _int ID = m_pStat->Get_Stat().iObjectID; + m_pInfoInstance->Event_CallBack(TEXT("MonsterDead"), &ID); return; } diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index d57394f52..5c8ed4930 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -262,9 +262,9 @@ void CInfoInstance::Event_CallBack(_wstring EventName, void* pArg) } } -QUESTINFO CInfoInstance::Get_Quest(_int QuestID) +QUESTINFO CInfoInstance::Get_Quest(_int QuestType, _int QuestID) { - return m_pQuestInfo->Get_Quest(QuestID); + return m_pQuestInfo->Get_Quest(QuestType, QuestID); } _int CInfoInstance::Get_Quest_Count(_int Index) diff --git a/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp b/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp index 5da8c63a2..accca3075 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp @@ -44,6 +44,8 @@ HRESULT CQuest_Canvas::Initialize(void* pArg) } Visible(false); m_pInfoInstance->Set_AcceptQuest(0); + m_pInfoInstance->Set_AcceptQuest(1); + m_pInfoInstance->Set_AcceptQuest(2); return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Quest_Data.cpp b/Jusin154_Team3D/Client/Private/Quest_Data.cpp index e7eb9b0e0..6e850b057 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Data.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Data.cpp @@ -95,9 +95,20 @@ HRESULT CQuest_Data::Load_QuestInfo(const _char* pFilePath) return S_OK; } -QUESTINFO CQuest_Data::Get_Quest(_int QuestID) +QUESTINFO CQuest_Data::Get_Quest(_int QuestType, _int QuestID) { - return QuestInfos[QuestID]; + switch (QuestType) + { + case 0: + return QuestInfos[QuestID]; + case 1: + return m_QuestAcceptedInfos[QuestID]; + case 2: + return m_QuestEndInfos[QuestID]; + default: + return QuestInfos[QuestID]; + } + } const vector& CQuest_Data::Get_AllQuest() const @@ -164,18 +175,24 @@ void CQuest_Data::Set_ClearQuest(_int Index) void CQuest_Data::Update_AcceptQuest(_int MonsterID) { - m_QuestAcceptedInfoObject.erase(remove_if(m_QuestAcceptedInfoObject.begin(), m_QuestAcceptedInfoObject.end(), - [MonsterID, this](auto& it) { - CQuestInstance* instance = static_cast(it); - if (static_cast(it)->Update_Objective(MonsterID) == true) - { - Set_ClearQuest(static_cast(it)->Get_QuestID()); - return true; - } - return false; - }), - m_QuestAcceptedInfoObject.end() - ); + vector<_int> toRemoveIndex; + + _int index = 0; + for (auto* instance : m_QuestAcceptedInfoObject) + { + if (static_cast(instance)->Update_Objective(MonsterID)) + { + Set_ClearQuest(static_cast(instance)->Get_QuestID()); + toRemoveIndex.push_back(index); + } + index++; + } + + for (auto it = toRemoveIndex.rbegin(); it != toRemoveIndex.rend(); ++it) + { + m_QuestAcceptedInfoObject.erase(m_QuestAcceptedInfoObject.begin() + *it); + m_QuestAcceptedInfos.erase(m_QuestAcceptedInfos.begin() + *it); + } } CQuest_Data* CQuest_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) diff --git a/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp b/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp index a00e26462..c782b597a 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp @@ -40,11 +40,11 @@ HRESULT CQuest_Entry_Line::Initialize(void* pArg) m_fAlpha = 1.f; m_fAlphaTime = 5.f; m_vNine_Slice = _float4(0.f, 256.f, 0.f, 64.f); - m_fFontX = 928.f; + m_fFontX = 948.f; m_fFontY = 520.f; SizeUpX(800.f); SizeUpY(15.f); - static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); }); Visible(false); return S_OK; } @@ -120,7 +120,7 @@ HRESULT CQuest_Entry_Line::Render() if (FAILED(m_pVIBufferCom->Render())) { return E_FAIL; } - + _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("보 상")) - 22) * 0.5f; m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("조 건"), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); @@ -208,9 +208,12 @@ HRESULT CQuest_Entry_Line::Ready_Components(void* pArg) return S_OK; } -void CQuest_Entry_Line::Set_Hover(_int Index) +void CQuest_Entry_Line::Set_Hover(void* pArg) { - m_iQuest_Index = Index; + CURRENTQUESTSECETINFO* Desc = static_cast(pArg); + + m_iCurrentQuest = Desc->iQuestCategory; + m_iQuest_Index = Desc->iQuestIndex; if (m_iQuest_Index == -1) { Visible(false); diff --git a/Jusin154_Team3D/Client/Private/Quest_Info.cpp b/Jusin154_Team3D/Client/Private/Quest_Info.cpp index 1bbad4523..d15c82661 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Info.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Info.cpp @@ -51,7 +51,7 @@ HRESULT CQuest_Info::Initialize(void* pArg) m_fFontY = 500.f; m_iPerQuestIndex = -1; Visible(false); - static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); }); return S_OK; } @@ -129,7 +129,7 @@ HRESULT CQuest_Info::Render() return E_FAIL; } - m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestInfo.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest ,m_iQuest_Index).pQuestInfo.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); return S_OK; } @@ -217,9 +217,12 @@ HRESULT CQuest_Info::Ready_Components(void* pArg) return S_OK; } -void CQuest_Info::Set_Hover(_int Index) +void CQuest_Info::Set_Hover(void* pArg) { - m_iQuest_Index = Index; + CURRENTQUESTSECETINFO* Desc = static_cast(pArg); + + m_iCurrentQuest = Desc->iQuestCategory; + m_iQuest_Index = Desc->iQuestIndex; if (m_iQuest_Index == -1) { Visible(false); diff --git a/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp b/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp index 44ef44382..4d80896d8 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp @@ -48,7 +48,7 @@ HRESULT CQuest_Info_Header::Initialize(void* pArg) m_iColor = 2; SizeUpX(1105.f); SizeUpY(60.f); - static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); }); Visible(false); return S_OK; } @@ -129,8 +129,8 @@ HRESULT CQuest_Info_Header::Render() return E_FAIL; } - _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestName.c_str()) - 30) * 0.5f; - m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iQuest_Index).pQuestName.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest, m_iQuest_Index).pQuestName.c_str()) - 30) * 0.5f; + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_iCurrentQuest, m_iQuest_Index).pQuestName.c_str(), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); return S_OK; } @@ -214,9 +214,12 @@ HRESULT CQuest_Info_Header::Ready_Components(void* pArg) return S_OK; } -void CQuest_Info_Header::Set_Hover(_int Index) +void CQuest_Info_Header::Set_Hover(void* pArg) { - m_iQuest_Index = Index; + CURRENTQUESTSECETINFO* Desc = static_cast(pArg); + + m_iCurrentQuest = Desc->iQuestCategory; + m_iQuest_Index = Desc->iQuestIndex; if (m_iQuest_Index == -1) { Visible(false); diff --git a/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp b/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp index 64ed82ffc..c3d12233d 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp @@ -42,7 +42,7 @@ HRESULT CQuest_Info_Line::Initialize(void* pArg) m_vNine_Slice = _float4(11.f, 245.f, 0.f, 64.f); SizeUpX(934.f); SizeUpY(15.f); - static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(p); }); Visible(false); return S_OK; } @@ -202,9 +202,12 @@ HRESULT CQuest_Info_Line::Ready_Components(void* pArg) return S_OK; } -void CQuest_Info_Line::Set_Hover(_int Index) +void CQuest_Info_Line::Set_Hover(void* pArg) { - m_iQuest_Index = Index; + CURRENTQUESTSECETINFO* Desc = static_cast(pArg); + + m_iCurrentQuest = Desc->iQuestCategory; + m_iQuest_Index = Desc->iQuestIndex; if (m_iQuest_Index == -1) { Visible(false); diff --git a/Jusin154_Team3D/Client/Private/Quest_Slot.cpp b/Jusin154_Team3D/Client/Private/Quest_Slot.cpp index 0b5d8f058..f927a1486 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Slot.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Slot.cpp @@ -49,12 +49,15 @@ HRESULT CQuest_Slot::Initialize(void* pArg) m_fOffSetX = 0.f; m_fOffSetY = 85; m_iCols = 1; + m_fPositionX = -475.f; + m_fPositionY = 330.f; SizeUpX(495.f); SizeUpY(80.f); m_pVIBufferCom->Set_Cloned(true); - m_pVIBufferCom->Set_Pos(-475.f, 330.f, m_fOffSetX, m_fOffSetY, m_iCols); + m_pVIBufferCom->Set_Pos(m_fPositionX, m_fPositionY, m_fOffSetX, m_fOffSetY, m_iCols); m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY); m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::NONE)); + Set_QuestType(ENUM_CLASS(QUESTSTATE::NONE)); Visible(true); return S_OK; } @@ -99,8 +102,7 @@ void CQuest_Slot::Update(_float fTimeDelta) } } Hover(); - - static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_iQuestIndex); + static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_Info); m_fTime += fTimeDelta * m_fTimeMult; @@ -139,19 +141,73 @@ HRESULT CQuest_Slot::Render() return E_FAIL; } + for (_int i = 0; i < m_iQuestCount; ++i) + { + m_pGameInstance->Render_Text(m_Fonts[i].pFontSizeName.c_str(), m_Fonts[i].pQuestName.c_str(), m_Fonts[i].m_fFontSize); + } + return S_OK; +} + +void CQuest_Slot::Font_Size() +{ for (_int i = 0; i < m_iQuestCount; ++i) { m_fFontY = 190 + i * 85.f; - if (i == m_iQuestIndex) + if (m_Index == -1) { - m_pGameInstance->Render_Text(TEXT("Font_size30"), m_pInfoInstance->Get_Quest(i).pQuestName.c_str(), _float2(m_fFontX - 10.f + m_fX, m_fFontY - 10.F - m_fY)); + m_Fonts[i].pFontSizeName = TEXT("Font_size20"); + m_Fonts[i].m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY); } else { - m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(i).pQuestName.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY)); + if (i == m_Index) + { + m_Fonts[i].pFontSizeName = TEXT("Font_size30"); + m_Fonts[i].m_fFontSize = _float2(m_fFontX - 10.f + m_fX, m_fFontY - 10.f - m_fY); + } + else + { + m_Fonts[i].pFontSizeName = TEXT("Font_size20"); + m_Fonts[i].m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY); + } } } - return S_OK; +} + +void CQuest_Slot::Font_Setting(_int Index) +{ + m_Fonts.clear(); + FontInfo Fonts; + + for (_int i = 0; i < Index; ++i) + { + m_fFontY = 190 + i * 85.f; + Fonts.pFontSizeName = TEXT("Font_size20"); + Fonts.pQuestName = m_pInfoInstance->Get_Quest(m_Info.iQuestCategory, i).pQuestName.c_str(); + Fonts.m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY); + + m_Fonts.push_back(Fonts); + } +} + +_int CQuest_Slot::Mousechack(POINT Mouse) +{ + for (_int i = 0; i < m_iQuestCount; ++i) + { + RECT Box = { + long(m_fPositionX - m_fSizeX * 0.5f), + long((m_fPositionY - (i * m_fOffSetY)) - m_fSizeY * 0.5f), + long(m_fPositionX + m_fSizeX * 0.5f), + long((m_fPositionY + (i * m_fOffSetY)) + m_fSizeY * 0.5f) }; + + if (PtInRect(&Box, Mouse)) + { + return i; + } + } + + + return -1; } _vector CQuest_Slot::Get_WorldPostion() @@ -258,9 +314,14 @@ void CQuest_Slot::Hover() fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f); fMouse.y = -(ptMouse.y - (g_iWinSizeY * 0.5f)); - m_iQuestIndex = m_pVIBufferCom->Set_Mouse_Hover(fMouse); + POINT Mouse{}; + Mouse.x = _long(fMouse.x); + Mouse.y = _long(fMouse.y); + + m_Index = Mousechack(Mouse); - if (m_iQuestIndex != -1) + m_pVIBufferCom->Set_Hover(m_Index); + if (m_Index != -1) { m_bHover = true; } @@ -268,23 +329,28 @@ void CQuest_Slot::Hover() { m_bHover = false; } + Font_Size(); } + void CQuest_Slot::Set_QuestType(_int Index) { switch (Index) { case 0: + m_Info.iQuestCategory = ENUM_CLASS(QUESTSTATE::NONE); m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::NONE)); m_pVIBufferCom->Set_Draw(-1); break; case 1: + m_Info.iQuestCategory = ENUM_CLASS(QUESTSTATE::ACCEPTED); m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::ACCEPTED)); m_pVIBufferCom->Set_Draw(m_iQuestCount); break; case 2: + m_Info.iQuestCategory = ENUM_CLASS(QUESTSTATE::CLEARED); m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::CLEARED)); m_pVIBufferCom->Set_Draw(m_iQuestCount); break; @@ -292,6 +358,7 @@ void CQuest_Slot::Set_QuestType(_int Index) default: break; } + Font_Setting(m_iQuestCount); } CQuest_Slot* CQuest_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) diff --git a/Jusin154_Team3D/Client/Private/Troll.cpp b/Jusin154_Team3D/Client/Private/Troll.cpp index a9f0ec97d..0bf500331 100644 --- a/Jusin154_Team3D/Client/Private/Troll.cpp +++ b/Jusin154_Team3D/Client/Private/Troll.cpp @@ -402,6 +402,8 @@ void CTroll::OnCollision(CGameObject* pOther, void* pDesc) m_pInfoInstance->Event_CallBack(TEXT("Monster_Hit"), &m_DamageInfo); if (0 == damagePair.second) { m_pFSM->Change_State(FSMSTATE::DEAD); + _int ID = m_pStat->Get_Stat().iObjectID; + m_pInfoInstance->Event_CallBack(TEXT("MonsterDead"), &ID); return; } m_pFSM->Change_State(FSMSTATE::HIT); diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 92c5ff8f9..dcf9216d9 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -67,7 +67,7 @@ DECLARE_SINGLETON(CInfoInstance) void Event_CallBack(_wstring EventName, void* pArg = nullptr); #pragma endregion #pragma region QuestINFO - QUESTINFO Get_Quest(_int QuestID); + QUESTINFO Get_Quest(_int QuestType, _int QuestID); _int Get_Quest_Count(_int Index); const vector& Get_AllQuest() const; const vector& Get_ClearQuest() const; diff --git a/Jusin154_Team3D/Client/Public/Quest_Data.h b/Jusin154_Team3D/Client/Public/Quest_Data.h index 256bca4cc..eb283bcbd 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Data.h +++ b/Jusin154_Team3D/Client/Public/Quest_Data.h @@ -25,7 +25,7 @@ class CQuest_Data final : public CBase void Update_AcceptQuest(_int MonsterIndex = -1); public: - QUESTINFO Get_Quest(_int QuestID); + QUESTINFO Get_Quest(_int QuestType, _int QuestID); _int Get_Count(_int Index); const vector& Get_AllQuest() const; const vector& Get_ClearQuest() const; diff --git a/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h b/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h index 9bde54342..c26680ae6 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h +++ b/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h @@ -32,7 +32,7 @@ class CQuest_Entry_Line final : public CElementObject virtual HRESULT Initialize(void* pArg) override; public: - void Set_Hover(_int Index); + void Set_Hover(void* pArg); private: CTexture* m_pDiffuse_TextureCom = { nullptr }; @@ -41,6 +41,7 @@ class CQuest_Entry_Line final : public CElementObject _int m_iColor = { false }; _int m_iQuest_Index{}; + _int m_iCurrentQuest{}; public: static CQuest_Entry_Line* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/Quest_Info.h b/Jusin154_Team3D/Client/Public/Quest_Info.h index c80b80d3b..062e89e10 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Info.h +++ b/Jusin154_Team3D/Client/Public/Quest_Info.h @@ -32,7 +32,7 @@ class CQuest_Info final : public CElementObject virtual HRESULT Initialize(void* pArg) override; public: - void Set_Hover(_int Index); + void Set_Hover(void* pArg); private: CTexture* m_pDiffuse_TextureCom = { nullptr }; @@ -46,7 +46,9 @@ class CQuest_Info final : public CElementObject _float m_fOriginPerviewSize{}; _float m_fPreviewOffSet{}; _float4 m_vHeaderBack{}; + _int m_iQuest_Index{}; + _int m_iCurrentQuest{}; _int m_iPerQuestIndex{}; public: diff --git a/Jusin154_Team3D/Client/Public/Quest_Info_Header.h b/Jusin154_Team3D/Client/Public/Quest_Info_Header.h index c2d336332..c40271cf7 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Info_Header.h +++ b/Jusin154_Team3D/Client/Public/Quest_Info_Header.h @@ -32,7 +32,7 @@ class CQuest_Info_Header final : public CElementObject virtual HRESULT Initialize(void* pArg) override; public: - void Set_Hover(_int Index); + void Set_Hover(void* pArg); private: CTexture* m_pDiffuse_TextureCom = { nullptr }; @@ -42,6 +42,7 @@ class CQuest_Info_Header final : public CElementObject _int m_iColor = true; _int m_iQuest_Index{}; + _int m_iCurrentQuest{}; public: static CQuest_Info_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/Quest_Info_Line.h b/Jusin154_Team3D/Client/Public/Quest_Info_Line.h index a08b0d8db..4eb33ea1b 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Info_Line.h +++ b/Jusin154_Team3D/Client/Public/Quest_Info_Line.h @@ -32,7 +32,7 @@ class CQuest_Info_Line final : public CElementObject virtual HRESULT Initialize(void* pArg) override; public: - void Set_Hover(_int Index); + void Set_Hover(void* pArg); private: CTexture* m_pDiffuse_TextureCom = { nullptr }; @@ -41,7 +41,7 @@ class CQuest_Info_Line final : public CElementObject _int m_iColor = { false }; _int m_iQuest_Index{}; - + _int m_iCurrentQuest{}; public: static CQuest_Info_Line* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/Quest_Slot.h b/Jusin154_Team3D/Client/Public/Quest_Slot.h index 55992e9cc..5a51a0bcf 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Slot.h +++ b/Jusin154_Team3D/Client/Public/Quest_Slot.h @@ -13,6 +13,12 @@ NS_BEGIN(Client) class CQuest_Slot final : public CElementObject { + struct FontInfo + { + _wstring pFontSizeName; + _wstring pQuestName; + _float2 m_fFontSize{}; + }; private: CQuest_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CQuest_Slot(const CQuest_Slot& rhs); @@ -37,6 +43,10 @@ class CQuest_Slot final : public CElementObject private: void Hover(); + void Font_Size(); + void Font_Setting(_int Index); + + _int Mousechack(POINT Mouse); public: void Set_QuestType(_int Index); @@ -46,14 +56,20 @@ class CQuest_Slot final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr }; CInfoInstance* m_pInfoInstance = { nullptr }; - + CURRENTQUESTSECETINFO m_Info; _float m_fOffSetX{}; _float m_fOffSetY{}; _uint m_iCols{}; _int m_iColor{}; - _int m_iQuestIndex{}; + _int m_iCurrentQeustClick{}; _int m_iQuestCount{}; + + _float m_fPositionX{}; + _float m_fPositionY{}; + + _int m_Index{}; + vector m_Fonts; public: static CQuest_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml new file mode 100644 index 000000000..34ec5ed9b --- /dev/null +++ b/Jusin154_Team3D/Editor/Bin/Resources/Data/UI/Data.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index 16287e040..da3d61395 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -1745,6 +1745,27 @@ PS_OUT PS_Broomstick(PS_IN In) return Out; } +PS_OUT PS_SpellLearn(PS_IN In) +{ + PS_OUT Out; + float Alpha = g_fAlpha * g_fOwnerAlpha * g_fCanvasAlpha; + + float4 Color = float4(1.f, 1.f, 1.f, 1.f); + + float4 tex = g_Texture.Sample(DefaultSampler, In.vTexcoord); + float tex1 = g_Texture1.Sample(DefaultSampler, In.vTexcoord).r; + Color = tex; + + tex1 *= 0.95f; + + Color.a = tex1; + + Color.a *= Alpha; + + Out.vColor = Color; + return Out; +} + struct VS_IN3D { float3 vPosition : POSITION; @@ -2305,6 +2326,16 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Broomstick(); } + pass SpellLearn + { + SetRasterizerState(RS_Nocull); + SetDepthStencilState(DSS_Default, 0); + SetBlendState(BS_AlphaBlend, float4(0.f, 0.f, 0.f, 0.f), 0xffffffff); + VertexShader = compile vs_5_0 VS_MAIN(); + GeometryShader = NULL; + PixelShader = compile ps_5_0 PS_SpellLearn(); + } + pass Enemy_Detection { SetRasterizerState(RS_Nocull); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/SpellLearn.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/SpellLearn.png new file mode 100644 index 000000000..97ff44aed Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/SpellLearn.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Accio_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Accio_Path.png new file mode 100644 index 000000000..eed73b87d Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Accio_Path.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Descendo_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Descendo_Path.png new file mode 100644 index 000000000..b6a2f11f3 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Descendo_Path.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Levioso_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Levioso_Path.png new file mode 100644 index 000000000..bbc9cc45e Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Levioso_Path.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Lumos_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Lumos_Path.png new file mode 100644 index 000000000..431c70c4a Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Lumos_Path.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Revelio_Path.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Revelio_Path.png new file mode 100644 index 000000000..75edd419f Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SU_Revelio_Path.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SpellLinkDivide.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SpellLinkDivide.png index 7da69c4b5..3c8d8edb6 100644 Binary files a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SpellLinkDivide.png and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_SpellLinkDivide.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_Spell_Name.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_Spell_Name.png new file mode 100644 index 000000000..52d774819 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/SpellUnlock/UI_T_Spell_Name.png differ diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index ed7bf8cef..39ddab3ef 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -197,6 +197,11 @@ call Update_Shaders.bat + + + + + @@ -415,6 +420,11 @@ call Update_Shaders.bat + + + + + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index da3bf4584..86f8427ad 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -610,6 +610,21 @@ {a2d06f57-c74f-4604-91b4-884bf6586584} + + {91999870-f29b-4c24-b888-09eb08b8e10c} + + + {37571a2a-97dd-447b-a25b-11194584a57a} + + + {f4d24f99-186c-4074-90ef-48a95d74fb47} + + + {7a016450-f745-4313-ba9d-781fa5909b76} + + + {d9382839-c0b8-4b3d-9227-6dcf65fba44f} + @@ -1218,6 +1233,21 @@ 50.UI\QuestInstance + + 50.UI\SpellLearn_Canvas + + + 50.UI\SpellLearn_Canvas\SpellLearn_Panel + + + 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name + + + 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn + + + 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer + @@ -1828,6 +1858,21 @@ 50.UI\QuestInstance + + 50.UI\SpellLearn_Canvas + + + 50.UI\SpellLearn_Canvas\SpellLearn_Panel + + + 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_Name + + + 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn + + + 50.UI\SpellLearn_Canvas\SpellLearn_Panel\SpellLearn_MovePointer + diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 24b66f5a8..fb134adbf 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -111,6 +111,12 @@ #include "QuestInstance.h" +#include "SpellLearn_Canvas.h" +#include "SpellLearn_Panel.h" +#include "SpellLearn_Name.h" +#include "SpellLearn.h" +#include "SpellLearn_MovePointer.h" + #include "IMGUIUI.h" #pragma endregion @@ -531,6 +537,22 @@ HRESULT CLoader::Loading_For_UI() _wstring wstrFilePath = CMyTools::ToWstring(strFilePath); + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName, + CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) { + return E_FAIL; + } + + return S_OK; + + }); + + Asset_FileLoad("../Bin/Resources/Textures/SpellUnlock", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath) + { + + _string strFilePath = pFilePath; + _wstring wstrFilePath = CMyTools::ToWstring(strFilePath); + + if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName, CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) { return E_FAIL; @@ -1184,6 +1206,27 @@ HRESULT CLoader::Loading_For_UI() { return E_FAIL; } + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Canvas::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_Name::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CSpellLearn_MovePointer::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext)))) { diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn.cpp new file mode 100644 index 000000000..947fe07b2 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/SpellLearn.cpp @@ -0,0 +1,223 @@ +#include "pch.h" +#include "SpellLearn.h" +#include "GameInstance.h" + +CSpellLearn::CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpellLearn::CSpellLearn(const CSpellLearn& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpellLearn::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpellLearn::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 600.f; + Desc.fY = 0.f; + Desc.fSizeX = 550.f; + Desc.fSizeY = 550.f; + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 5.f; + Visible(false); + return S_OK; +} + +void CSpellLearn::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpellLearn::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + { + m_fAlpha += fTimeDelta * m_fAlphaTime; + } + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta * m_fAlphaTime;; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CSpellLearn::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CSpellLearn::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpellLearn::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpellLearn::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpellLearn::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SU_Levioso_Path"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CSpellLearn* CSpellLearn::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn* pInstance = new CSpellLearn(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpellLearn"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpellLearn::Clone(void* pArg, CGameObject* pOwner) +{ + CSpellLearn* pInstance = new CSpellLearn(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpell_Header"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CSpellLearn::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Canvas.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Canvas.cpp new file mode 100644 index 000000000..c77af7192 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Canvas.cpp @@ -0,0 +1,138 @@ +#include "pch.h" +#include "UI_Manager.h" +#include "SpellLearn_Canvas.h" +#include "GameInstance.h" +#include "SpellLearn_Panel.h" + +CSpellLearn_Canvas::CSpellLearn_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CCanvasObject(pDevice, pContext) +{ +} + +CSpellLearn_Canvas::CSpellLearn_Canvas(const CSpellLearn_Canvas& rhs) + :CCanvasObject(rhs) +{ +} + +HRESULT CSpellLearn_Canvas::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpellLearn_Canvas::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 1920.f; + Desc.fSizeY = 1080.f; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + if (FAILED(Ready_Panel(pArg))) + { + return E_FAIL; + } + Visible(false); + return S_OK; +} + +void CSpellLearn_Canvas::Priority_Update(_float fTimeDelta) +{ + __super::Priority_Update(fTimeDelta); +} + +void CSpellLearn_Canvas::Update(_float fTimeDelta) +{ + __super::Update(fTimeDelta); +} + +void CSpellLearn_Canvas::Late_Update(_float fTimeDelta) +{ + if (m_bVisible) { + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CSpellLearn_Canvas::Render() +{ + return S_OK; +} + +_vector CSpellLearn_Canvas::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpellLearn_Canvas::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CSpellLearn_Canvas::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CSpellLearn_Canvas::Ready_Panel(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pSpellLearn_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("SpellLearn_Panel"), m_pSpellLearn_Panel); + + return S_OK; +} + +void CSpellLearn_Canvas::Clear_Penel() +{ +} + +CSpellLearn_Canvas* CSpellLearn_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn_Canvas* pInstance = new CSpellLearn_Canvas(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpellLearn_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpellLearn_Canvas::Clone(void* pArg, CGameObject* pOwner) +{ + CSpellLearn_Canvas* pInstance = new CSpellLearn_Canvas(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpellLearn_Canvas"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn_Canvas::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} + +void CSpellLearn_Canvas::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp new file mode 100644 index 000000000..86b1ccd78 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_MovePointer.cpp @@ -0,0 +1,272 @@ +#include "pch.h" +#include "SpellLearn_MovePointer.h" +#include "GameInstance.h" + +CSpellLearn_MovePointer::CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpellLearn_MovePointer::CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpellLearn_MovePointer::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpellLearn_MovePointer::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 454.f; + Desc.fY = -240.f; + Desc.fSizeX = 32.f; + Desc.fSizeY = 32.f; + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 5.f; + m_fMoveSpeed = 15.f; + m_MoveLine.push_back(XMVectorSet(454.f, -240.f, 0.f, 1.f)); + m_MoveLine.push_back(XMVectorSet(454.f, 90.f, 0.f, 1.f)); + + + + Index = 0; + + Visible(false); + return S_OK; +} + +void CSpellLearn_MovePointer::SpellLearn(_int Index) +{ + m_iSpell = Index; + m_bMoveStart = true; +} + +void CSpellLearn_MovePointer::Line(_float fTime) +{ + m_vLerp_Position = m_MoveLine[Index]; + + if (Start_Lerp(m_fMoveSpeed * fTime) == true) + { + if (Index < m_MoveLine.size() -1) + { + ++Index; + } + else + { + m_bMoveStart = false; + } + } + +} + +void CSpellLearn_MovePointer::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpellLearn_MovePointer::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + { + m_fAlpha += fTimeDelta * m_fAlphaTime; + } + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta * m_fAlphaTime;; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + if (m_pGameInstance->Key_Down(DIK_L)) + { + m_bMoveStart = true; + } + + if (m_bMoveStart == true) + { + if (m_iSpell == ENUM_CLASS(SPELL_LINE::LINE)) + { + Line(fTimeDelta); + } + else if (m_iSpell == ENUM_CLASS(SPELL_LINE::CURVE)) + { + //Curve(); + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CSpellLearn_MovePointer::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CSpellLearn_MovePointer::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpellLearn_MovePointer::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpellLearn_MovePointer::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpellLearn_MovePointer::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SU_Cursor"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CSpellLearn_MovePointer* CSpellLearn_MovePointer::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn_MovePointer* pInstance = new CSpellLearn_MovePointer(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpellLearn_MovePointer"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpellLearn_MovePointer::Clone(void* pArg, CGameObject* pOwner) +{ + CSpellLearn_MovePointer* pInstance = new CSpellLearn_MovePointer(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpellLearn_MovePointer"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn_MovePointer::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CSpellLearn_MovePointer::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Name.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Name.cpp new file mode 100644 index 000000000..ed9106018 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Name.cpp @@ -0,0 +1,243 @@ +#include "pch.h" +#include "SpellLearn_Name.h" + +CSpellLearn_Name::CSpellLearn_Name(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CSpellLearn_Name::CSpellLearn_Name(const CSpellLearn_Name& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CSpellLearn_Name::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpellLearn_Name::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 600.f; + Desc.fY = 420.f; + Desc.fSizeX = 432.f; + Desc.fSizeY = 27.f; + m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) }; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + + m_fTimeMult = 3.f; + m_fAlpha = 1.f; + m_fAlphaTime = 5.f; + m_vNine_Slice = _float4(216.f, 216.f, 0.f, 27.f); + m_fFontX = 944.f; + m_fFontY = 520.f; + SizeUpX(550.f); + SizeUpY(27.f); + Visible(false); + return S_OK; +} + + +void CSpellLearn_Name::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpellLearn_Name::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bFadeIn == true) + { + if (m_fAlpha <= 1.f) + { + m_fAlpha += fTimeDelta * m_fAlphaTime; + } + + if (m_fAlpha >= 1.f) + { + m_bFadeIn = false; + m_fAlpha = 1.f; + } + } + + if (m_bFadeOut == true) + { + if (m_fAlpha >= 0.f) + m_fAlpha -= fTimeDelta * m_fAlphaTime;; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CSpellLearn_Name::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CSpellLearn_Name::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_BORDER)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + _float OffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), TEXT("봄바르다")) - 30) * 0.5f; + m_pGameInstance->Render_Text(TEXT("Font_size20"), TEXT("봄바르다"), _float2((m_fFontX + m_fX) - OffSet, m_fFontY - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + + return S_OK; +} + +_vector CSpellLearn_Name::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpellLearn_Name::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fNine_Slice", &m_vNine_Slice, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOrigin_Size", &m_fOrigin_Size, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpellLearn_Name::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_Spell_Name"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +CSpellLearn_Name* CSpellLearn_Name::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn_Name* pInstance = new CSpellLearn_Name(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpellLearn_Name"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpellLearn_Name::Clone(void* pArg, CGameObject* pOwner) +{ + CSpellLearn_Name* pInstance = new CSpellLearn_Name(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpellLearn_Name"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn_Name::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CSpellLearn_Name::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp b/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp new file mode 100644 index 000000000..fc448de6a --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/SpellLearn_Panel.cpp @@ -0,0 +1,229 @@ +#include "pch.h" +#include "SpellLearn_Panel.h" +#include "GameInstance.h" +#include "SpellLearn_Name.h" +#include "SpellLearn.h" +#include "SpellLearn_MovePointer.h" + +CSpellLearn_Panel::CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CSpellLearn_Panel::CSpellLearn_Panel(const CSpellLearn_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CSpellLearn_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CSpellLearn_Panel::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 960.f; + Desc.fY = -540.f; + Desc.fSizeX = g_iWinSizeX; + Desc.fSizeY = g_iWinSizeY; + + if (FAILED(__super::Initialize(&Desc))) + { + return E_FAIL; + } + if (FAILED(Ready_Components(pArg))) + { + return E_FAIL; + } + if (FAILED(Ready_Element(pArg))) + { + return E_FAIL; + } + m_fCanvasAlpha = 1.f; + m_fSortZ = 0.05f; + m_fDelayTime = 1.f; + Visible(true); + ElementAllVisible(true); + return S_OK; +} + +void CSpellLearn_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CSpellLearn_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Update(fTimeDelta); +} + +void CSpellLearn_Panel::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CSpellLearn_Panel::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::SPELL_LEARN)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CSpellLearn_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CSpellLearn_Panel::Bind_ShaderResources() +{ + if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix"))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0))) + { + return E_FAIL; + } + if (FAILED(m_pDiffuse_TextureCom1->Bind_ShaderResource(m_pShaderCom, "g_Texture1", 0))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float)))) + { + return E_FAIL; + } + return S_OK; +} + +HRESULT CSpellLearn_Panel::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_SpellLearn"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SpellLinkDivide"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CSpellLearn_Panel::Ready_Element(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Name)))) + { + return E_FAIL; + } + Add_Element(TEXT("SpellLearn_Name"), m_pSpellLearn_Name); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn)))) + { + return E_FAIL; + } + Add_Element(TEXT("SpellLearn"), m_pSpellLearn); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_MovePointer)))) + { + return E_FAIL; + } + Add_Element(TEXT("SpellLearn_MovePointer"), m_pSpellLearn_MovePointer); + + return S_OK; +} + +CSpellLearn_Panel* CSpellLearn_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CSpellLearn_Panel* pInstance = new CSpellLearn_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CSpellLearn_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CSpellLearn_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CSpellLearn_Panel* pInstance = new CSpellLearn_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CSpellLearn_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CSpellLearn_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CSpellLearn_Panel::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Spell_Canvas.cpp b/Jusin154_Team3D/Editor/Private/Spell_Canvas.cpp index 1b53268cb..347f2947e 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Canvas.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Canvas.cpp @@ -92,6 +92,7 @@ HRESULT CSpell_Canvas::Ready_Panel(void* pArg) return E_FAIL; } Add_Panel(TEXT("Spell_Panel"), m_pSpell_Panel); + return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/UI_Manager.cpp b/Jusin154_Team3D/Editor/Private/UI_Manager.cpp index 7d42624bf..b8d75a4dc 100644 --- a/Jusin154_Team3D/Editor/Private/UI_Manager.cpp +++ b/Jusin154_Team3D/Editor/Private/UI_Manager.cpp @@ -4,6 +4,7 @@ #include "GamePlay_Canvas.h" #include "Spell_Canvas.h" #include "Quest_Canvas.h" +#include "SpellLearn_Canvas.h" #include "Mouse_Cursor.h" #include "CameraLockOn.h" #include "Loding_Canvas.h" @@ -165,6 +166,11 @@ HRESULT CUI_Manager::Ready_Components(void* pArg) } Add_Canvas(TEXT("Quest_Canves"), m_pQuest_Canves); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pSpellLearn_Canvas)))) { + return E_FAIL; + } + Add_Canvas(TEXT("SpellLearn_Canvas"), m_pSpellLearn_Canvas); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pMouse_Cursor)))) { return E_FAIL; } diff --git a/Jusin154_Team3D/Editor/Public/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index f1f6529c7..35c5b4156 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -34,6 +34,7 @@ namespace Editor REVELIO, POTION, MAGIC_ITEM, SPELL_PREVIEW, SPELL_HEADER, SPELL_HEADER_LINE, SPELL_DRAG, CAMERA_LOCKON, LODING_SCREEN, ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK, + SPELL_LEARN, ENEMY_DETECTION, INTERACTION_OBJECT, END }; enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, WEIGHTBLEND, NON_WORLD, NON_WORLD_BLUR, BLEND, BLEND_NOWORLD, BLOOM, BLOOM_NOWORLD, BLUR_NO_EMMISVE, BLUR_NO_WORLD_NO_EMISSIVE, WEIGHTBLEND_FOR_BLEND, DEPTH_STOP, WB_CULLING, SCREEN_FX , DISTORTION ,END }; enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, UVALPHABLEND, MAGIC_METER, SPELL_LIST, EESSENTIAL_SPELL_SOLT, EESSENTIAL_SPELL, COLOR, SPELL_HOVER, SPELL_SLOT_EFFECT, SPELL_SLOT, SPELL_LOCK, QUEST_SLOT, END }; @@ -58,6 +59,8 @@ namespace Editor END }; + enum class SPELL_LINE { LINE, CURVE }; + enum class BLOOM_TYPE { NONE, BASIC, MULTIPLY, END }; enum class ELEMENT_INTERACTABLE_ID { BARREL, BOX, END }; diff --git a/Jusin154_Team3D/Editor/Public/IMGUIUI.h b/Jusin154_Team3D/Editor/Public/IMGUIUI.h index 69d0a7a48..d8a26a832 100644 --- a/Jusin154_Team3D/Editor/Public/IMGUIUI.h +++ b/Jusin154_Team3D/Editor/Public/IMGUIUI.h @@ -101,6 +101,7 @@ class CIMGUIUI final : public CGameObject _float2 m_fFontPos {}; _float m_fFontX {}; _float m_fFontY {}; + public: static CIMGUIUI* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn.h b/Jusin154_Team3D/Editor/Public/SpellLearn.h new file mode 100644 index 000000000..e5dcfcd5b --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/SpellLearn.h @@ -0,0 +1,40 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CSpellLearn final : public CElementObject +{ +private: + CSpellLearn(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpellLearn(const CSpellLearn& rhs); + virtual ~CSpellLearn() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CSpellLearn* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_Canvas.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Canvas.h new file mode 100644 index 000000000..bd7299667 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Canvas.h @@ -0,0 +1,48 @@ +#pragma once + +#include "Editor_Define.h" +#include "CanvasObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CSpellLearn_Canvas final : public CCanvasObject +{ +private: + CSpellLearn_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpellLearn_Canvas(const CSpellLearn_Canvas& rhs); + virtual ~CSpellLearn_Canvas() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Ready_Panel(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +public: + void Clear_Penel(); + +private: + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CGameObject* m_pSpellLearn_Panel = { nullptr }; + +public: + static CSpellLearn_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h b/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h new file mode 100644 index 000000000..1cbad5c47 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/SpellLearn_MovePointer.h @@ -0,0 +1,52 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CSpellLearn_MovePointer final : public CElementObject +{ +private: + CSpellLearn_MovePointer(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpellLearn_MovePointer(const CSpellLearn_MovePointer& rhs); + virtual ~CSpellLearn_MovePointer() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +public: + void SpellLearn(_int Index); +private: + void Line(_float fTime); + + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _bool m_bMoveStart = { false }; + _int m_iSpell{}; + + _int Index{}; + vector<_vector> m_MoveLine; + +public: + static CSpellLearn_MovePointer* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_Name.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Name.h new file mode 100644 index 000000000..6449ec521 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Name.h @@ -0,0 +1,40 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CSpellLearn_Name final : public CElementObject +{ +private: + CSpellLearn_Name(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpellLearn_Name(const CSpellLearn_Name& rhs); + virtual ~CSpellLearn_Name() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CSpellLearn_Name* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h b/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h new file mode 100644 index 000000000..8cb5c3066 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/SpellLearn_Panel.h @@ -0,0 +1,51 @@ +#pragma once + +#include "Editor_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CSpellLearn_Panel final : public CPanelObject +{ + +private: + CSpellLearn_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CSpellLearn_Panel(const CSpellLearn_Panel& rhs); + virtual ~CSpellLearn_Panel() = default; + +public: + virtual void Priority_Update(_float fTimeDelta); + virtual void Update(_float fTimeDelta); + virtual void Late_Update(_float fTimeDelta); + virtual HRESULT Render() override; + virtual _vector Get_WorldPostion() override; + +private: + virtual HRESULT Bind_ShaderResources() override; + virtual HRESULT Ready_Components(void* pArg) override; + virtual HRESULT Ready_Element(void* pArg) override; + virtual HRESULT Initialize_Prototype() override; + virtual HRESULT Initialize(void* pArg) override; + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CGameObject* m_pSpellLearn_Name = { nullptr }; + CGameObject* m_pSpellLearn = { nullptr }; + CGameObject* m_pSpellLearn_MovePointer = { nullptr }; + +public: + static CSpellLearn_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; + void Describe_Entity() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Editor/Public/UI_Manager.h b/Jusin154_Team3D/Editor/Public/UI_Manager.h index 9461bd7df..7f3a92171 100644 --- a/Jusin154_Team3D/Editor/Public/UI_Manager.h +++ b/Jusin154_Team3D/Editor/Public/UI_Manager.h @@ -53,6 +53,7 @@ class CUI_Manager final : public CUIObject CGameObject* m_pSpell_Canvas = { nullptr }; CGameObject* m_pLoding_Canvas= { nullptr }; CGameObject* m_pQuest_Canves= { nullptr }; + CGameObject* m_pSpellLearn_Canvas = { nullptr }; CGameObject* m_pMouse_Cursor = { nullptr }; CGameObject* m_pCamera_LockOn = { nullptr }; _bool m_bCanvas_Change = { false }; diff --git a/Jusin154_Team3D/Engine/Private/ElementObject.cpp b/Jusin154_Team3D/Engine/Private/ElementObject.cpp index ae0cb26f6..92e573c9f 100644 --- a/Jusin154_Team3D/Engine/Private/ElementObject.cpp +++ b/Jusin154_Team3D/Engine/Private/ElementObject.cpp @@ -130,7 +130,7 @@ _float CElementObject::Get_Nine_Slice_Bottom() return m_vNine_Slice.w; } -void CElementObject::Start_Lerp(_float fTimeDelta) +_bool CElementObject::Start_Lerp(_float fTimeDelta) { _vector Pos = m_fCurrent_Position; @@ -146,7 +146,7 @@ void CElementObject::Start_Lerp(_float fTimeDelta) { m_fX = m_vLerp_Position.m128_f32[0]; m_fY = m_vLerp_Position.m128_f32[1]; - m_bLerpOn = false; + return true; } else @@ -154,6 +154,7 @@ void CElementObject::Start_Lerp(_float fTimeDelta) XMVECTOR DirNorm = XMVector3Normalize(Dir); m_fX = (Pos + DirNorm * move).m128_f32[0]; m_fY = (Pos + DirNorm * move).m128_f32[1]; + return false; } } diff --git a/Jusin154_Team3D/Engine/Private/UIObject.cpp b/Jusin154_Team3D/Engine/Private/UIObject.cpp index abfb41447..d88e3d418 100644 --- a/Jusin154_Team3D/Engine/Private/UIObject.cpp +++ b/Jusin154_Team3D/Engine/Private/UIObject.cpp @@ -304,7 +304,7 @@ void CUIObject::Nine_Slice_Left(_float X) void CUIObject::Nine_Slice_Right(_float Y) { - m_vNine_Slice.y =Y; + m_vNine_Slice.y = Y; } void CUIObject::Nine_Slice_Top(_float Z) @@ -367,8 +367,14 @@ void CUIObject::Lerp_PosY(_float PosY) m_fLerpY = PosY; } -void CUIObject::Start_Lerp(_float fTimeDelta) +_bool CUIObject::Start_Lerp(_float fTimeDelta) { + return false; +} + +_bool CUIObject::Start_Bezier(_float fTimeDelta) +{ + return _bool(); } void CUIObject::Reset_Pos(_float fTimeDelta) diff --git a/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp b/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp index 9fcd697a4..5c6c197e2 100644 --- a/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp +++ b/Jusin154_Team3D/Engine/Private/VIBuffer_UI_Instance.cpp @@ -336,6 +336,32 @@ _int CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos) return hoveredIndex; } +void CVIBuffer_UI_Instance::Set_Hover(_int Index) +{ + D3D11_MAPPED_SUBRESOURCE SubResource{}; + + m_pContext->Map(m_pVBInstance, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &SubResource); + + VTX_INSTANCE_UI* pVertices = static_cast(SubResource.pData); + + if(Index == -1) + for (_uint i = 0; i < m_iNumInstance; i++) + pVertices[i].bHover = 0.f; + + for (_uint i = 0; i < m_iNumInstance; i++) + { + if (i == Index) + { + pVertices[i].bHover = 1.f; + } + else + { + pVertices[i].bHover = 0.f; + } + } + m_pContext->Unmap(m_pVBInstance, 0); +} + void CVIBuffer_UI_Instance::Set_Hover_Index(_uint iIndex) { D3D11_MAPPED_SUBRESOURCE SubResource{}; diff --git a/Jusin154_Team3D/Engine/Public/ElementObject.h b/Jusin154_Team3D/Engine/Public/ElementObject.h index 8ace2e23b..90b5c68b5 100644 --- a/Jusin154_Team3D/Engine/Public/ElementObject.h +++ b/Jusin154_Team3D/Engine/Public/ElementObject.h @@ -30,7 +30,7 @@ class ENGINE_DLL CElementObject abstract : public CUIObject virtual _float Get_Nine_Slice_Top() override; virtual _float Get_Nine_Slice_Bottom() override; - virtual void Start_Lerp(_float fTimeDelta) override; + virtual _bool Start_Lerp(_float fTimeDelta) override; virtual void Reset_Pos(_float fTimeDelta)override; virtual void Start_Size_Lerp(_float fTimeDelta) override; virtual void Reset_Size_Lerp(_float fTimeDelta) override; @@ -41,6 +41,8 @@ class ENGINE_DLL CElementObject abstract : public CUIObject virtual HRESULT Initialize(void* pArg); virtual HRESULT Ready_Components(void* pArg) override; + _float m_fBezierTime = 0; + public: virtual void Free() override; }; diff --git a/Jusin154_Team3D/Engine/Public/UIObject.h b/Jusin154_Team3D/Engine/Public/UIObject.h index 8f823ba89..cbd2bff11 100644 --- a/Jusin154_Team3D/Engine/Public/UIObject.h +++ b/Jusin154_Team3D/Engine/Public/UIObject.h @@ -67,6 +67,13 @@ typedef struct SlotHover _int iSlotID{}; _int iHover_Index{}; }HOVER_INFO; + +typedef struct tagCurrentQeustSerectInfo +{ + _int iQuestCategory{}; + _int iQuestIndex{}; +}CURRENTQUESTSECETINFO; + protected: CUIObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); CUIObject(const CUIObject& rhs); @@ -134,7 +141,8 @@ typedef struct SlotHover virtual void Lerp_PosX(_float PosX); virtual void Lerp_PosY(_float PosY); - virtual void Start_Lerp(_float fTimeDelta); + virtual _bool Start_Lerp(_float fTimeDelta); + virtual _bool Start_Bezier(_float fTimeDelta); virtual void Reset_Pos(_float fTimeDelta); virtual void Start_Size_Lerp(_float fTimeDelta); virtual void Reset_Size_Lerp(_float fTimeDelta); diff --git a/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h b/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h index fe5e72dc6..7238bcae2 100644 --- a/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h +++ b/Jusin154_Team3D/Engine/Public/VIBuffer_UI_Instance.h @@ -36,6 +36,7 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance void Set_Index_Renge_Color(_uint StartIndex, _uint EndIndex, _float vColor); void Set_Index_Color(_int Index, _float vColor); _int Set_Mouse_Hover(_float2 fMousePos); + void Set_Hover(_int Index); void Set_Hover_Index(_uint iIndex); void Set_Equip_Index(_uint iIndex); void Set_Draw(_int iCount = -1);