diff --git a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index d0309f2b0..53caeee60 100644 --- a/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Client/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -63,6 +63,7 @@ Texture2D g_DiffuseTexture; Texture2D g_MaskingTexture; int g_iHover; +int g_iClick; int g_iColor; int g_iStep1 = 0; @@ -1621,6 +1622,128 @@ PS_OUT PS_Quest_Info(PS_IN In) return Out; } +PS_OUT PS_Quest_Status(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); + + if (g_iClick == 0) + { + if (g_iHover == 0) + { + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + tex1.rgb *= float3(60.f, 80.f, 150.f) / 255.f; + Color = tex1; + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy); + float2 safeUV = saturate(atlasUV); + float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV); + Color = lerp(Color, tex2, tex2.a); + } + } + else + { + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + Color = tex1; + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy); + float2 safeUV = saturate(atlasUV); + float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV); + Color = lerp(Color, tex2, tex2.a); + } + } + } + else + { + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + Color = tex1; + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy); + float2 safeUV = saturate(atlasUV); + float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV); + Color = lerp(Color, tex2, tex2.a); + } + float mask = g_Texture2.Sample(DefaultSampler, In.vTexcoord).r; + float3 glowColor = float3(1.0f, 1.0f, 1.0f); + Color.rgb += glowColor * mask * 0.5f; + Color.rgb *= float3(140.f, 140.f, 20.f) / 255.f; + } + + + + Color.a *= Alpha; + Out.vColor = Color; + return Out; +} + +PS_OUT PS_Broomstick(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); + + float2 center = float2(0.5f, 0.5f); + float2 uv = In.vTexcoord - center; + uv *= sqrt(2.0f); + float2 Rotation = In.vTexcoord; + Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle); + Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle); + Rotation += center; + + float2 startUV = g_fImageUV.xy; + float2 endUV = g_fImageUV.zw; + + float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV); + + float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + float4 tex2 = g_Texture1.Sample(ClampSampler, atlasUV); + tex1.rgb *= 0.4f; + color = tex1; + tex2.rgb *= 0.3f; + + color = lerp(color, tex2, tex2.a); + + + float2 texpos1 = g_fItemPosition1 / g_fCurrent_Size; + float2 texsize1 = g_fItemImageSizes1 / g_fCurrent_Size; + float2 texlocal1 = (In.vTexcoord - texpos1) / texsize1; + bool inside = all(texlocal1 >= 0.0f && texlocal1 <= 1.0f); + if(inside) + { + float4 tex3 = g_Texture2.Sample(ClampSampler, texlocal1); + color = lerp(color, tex3, tex3.a); + + float CoolTime = 0.f + g_fDeltaV; + float CoolTime2 = 0.f + g_fDeltaV + 0.1f; + atlasUV = startUV + texlocal1 * (endUV - startUV); + + float4 tex4 = g_Texture3.Sample(DefaultSampler, atlasUV); + } + + color.a *= Alpha; + + Out.vColor = color; + return Out; +} + struct VS_IN3D { float3 vPosition : POSITION; @@ -2104,6 +2227,26 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Quest_Info(); } + pass Quest_Status + { + 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_Quest_Status(); + } + + pass Broomstick + { + 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_Broomstick(); + } + pass Enemy_Detection { SetRasterizerState(RS_Nocull); diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj b/Jusin154_Team3D/Client/Default/Client.vcxproj index 1dbcd5007..5fe36891b 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj @@ -167,6 +167,7 @@ call Update_Resources.bat + @@ -182,6 +183,7 @@ call Update_Resources.bat + @@ -204,6 +206,7 @@ call Update_Resources.bat + @@ -212,6 +215,8 @@ call Update_Resources.bat + + @@ -365,6 +370,7 @@ call Update_Resources.bat + @@ -381,6 +387,7 @@ call Update_Resources.bat + @@ -399,6 +406,7 @@ call Update_Resources.bat + @@ -407,6 +415,8 @@ call Update_Resources.bat + + diff --git a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters index 0cac07f0a..94d3dc90c 100644 --- a/Jusin154_Team3D/Client/Default/Client.vcxproj.filters +++ b/Jusin154_Team3D/Client/Default/Client.vcxproj.filters @@ -604,8 +604,23 @@ 02.GameObjects\Effect\ScreenFX - + + + 02.GameObjects\UI\Quest_Canvas\Quest_Status_Panel + + + 02.GameObjects\UI\Quest_Canvas\InProgress_Panel + + + 02.GameObjects\UI\Quest_Canvas\Completed_Panel + + + 02.GameObjects\UI\Quest_Canvas\Quest_Status_Panel\Quest_Status + + + 04.Mechanic\Quest + @@ -1269,10 +1284,25 @@ {125737f1-56b3-4746-9be2-ea1bcb90c013} - + {9e8bccb6-c491-4f3a-bdb8-5f03f13ad84d} + + {9060b2e1-d8cb-4259-a17a-f8ee2407d37c} + + + {c25a401b-91f1-4e01-8805-51fffef366a6} + + + {2bd79ab2-fae7-4757-81b3-26231a4496cf} + + + {bffcced5-6951-4db4-9df1-44b33b52ece7} + + + {fe64513c-fbb3-4577-b424-82d99c9075a3} + @@ -1823,6 +1853,21 @@ 02.GameObjects\Effect\ScreenFX + + 02.GameObjects\UI\Quest_Canvas\Quest_Status_Panel + + + 02.GameObjects\UI\Quest_Canvas\InProgress_Panel + + + 02.GameObjects\UI\Quest_Canvas\Completed_Panel + + + 02.GameObjects\UI\Quest_Canvas\Quest_Status_Panel\Quest_Status + + + 04.Mechanic\Quest + diff --git a/Jusin154_Team3D/Client/Private/Action_Panel.cpp b/Jusin154_Team3D/Client/Private/Action_Panel.cpp index 7f2fc0aea..e6068d780 100644 --- a/Jusin154_Team3D/Client/Private/Action_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Action_Panel.cpp @@ -33,7 +33,7 @@ HRESULT CAction_Panel::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 1150.f; - Desc.fY = 850.f; + Desc.fY = -850.f; Desc.fSizeX = 1650.f; Desc.fSizeY = 450.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) }; @@ -180,7 +180,7 @@ void CAction_Panel::Magic_Meter_UV() for (_uint i = 0; i < 5; ++i) { m_vMagic_MeterUV[i].x = 570.f - (55.f * i); - m_vMagic_MeterUV[i].y = 145.f; + m_vMagic_MeterUV[i].y = -145.f; } } diff --git a/Jusin154_Team3D/Client/Private/Boss_HpBar.cpp b/Jusin154_Team3D/Client/Private/Boss_HpBar.cpp index d376f6f89..68956d68e 100644 --- a/Jusin154_Team3D/Client/Private/Boss_HpBar.cpp +++ b/Jusin154_Team3D/Client/Private/Boss_HpBar.cpp @@ -25,7 +25,7 @@ HRESULT CBoss_HpBar::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 0.f; - Desc.fY = 40.f; + Desc.fY = -40.f; Desc.fSizeX = 218.f; Desc.fSizeY = 82.f; diff --git a/Jusin154_Team3D/Client/Private/Completed_Panel.cpp b/Jusin154_Team3D/Client/Private/Completed_Panel.cpp new file mode 100644 index 000000000..ed402e72a --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Completed_Panel.cpp @@ -0,0 +1,202 @@ +#include "pch.h" +#include "Completed_Panel.h" +#include "GameInstance.h" + +CCompleted_Panel::CCompleted_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CCompleted_Panel::CCompleted_Panel(const CCompleted_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CCompleted_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CCompleted_Panel::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 1575.f; + 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.04f; + Visible(false); + ElementAllVisible(true); + return S_OK; +} + +void CCompleted_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CCompleted_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + __super::Update(fTimeDelta); +} + +void CCompleted_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 CCompleted_Panel::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CCompleted_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CCompleted_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_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 CCompleted_Panel::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), 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; +} + +HRESULT CCompleted_Panel::Ready_Element(void* pArg) +{ + return S_OK; +} + +CCompleted_Panel* CCompleted_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CCompleted_Panel* pInstance = new CCompleted_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CCompleted_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CCompleted_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CCompleted_Panel* pInstance = new CCompleted_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CCompleted_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CCompleted_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CCompleted_Panel::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp b/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp index ff539516d..6a3f6f0ca 100644 --- a/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp +++ b/Jusin154_Team3D/Client/Private/Enemy_HpBar.cpp @@ -25,7 +25,7 @@ HRESULT CEnemy_HpBar::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 0.f; - Desc.fY = 40.f; + Desc.fY = -40.f; Desc.fSizeX = 128.f; Desc.fSizeY = 20.f; diff --git a/Jusin154_Team3D/Client/Private/Enemy_Info.cpp b/Jusin154_Team3D/Client/Private/Enemy_Info.cpp index 6da9b42f5..24452833d 100644 --- a/Jusin154_Team3D/Client/Private/Enemy_Info.cpp +++ b/Jusin154_Team3D/Client/Private/Enemy_Info.cpp @@ -25,7 +25,7 @@ HRESULT CEnemy_Info::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = -180.f; - Desc.fY = 40.f; + Desc.fY = -40.f; Desc.fSizeX = 50.f; Desc.fSizeY = 50.f; @@ -132,8 +132,8 @@ HRESULT CEnemy_Info::Render() - m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pEnemy_Name.c_str(), _float2(m_fFontPos.x + m_fX - m_fFontOffSet, m_fFontPos.y + m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); - m_pGameInstance->Render_Text(TEXT("UI_size15"), m_pLevel.c_str(), _float2(m_fFontX + m_fX - m_fFont2OffSet, m_fFontY + m_fY), XMVectorSet(0.f, (120.f / 255.f) * m_fAlpha, 0.f, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pEnemy_Name.c_str(), _float2(m_fFontPos.x + m_fX - m_fFontOffSet, m_fFontPos.y - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("UI_size15"), m_pLevel.c_str(), _float2(m_fFontX + m_fX - m_fFont2OffSet, m_fFontY - m_fY), XMVectorSet(0.f, (120.f / 255.f) * m_fAlpha, 0.f, m_fAlpha)); } return S_OK; @@ -218,13 +218,13 @@ void CEnemy_Info::Set_Font_Move(_bool Boss) if (m_bBoss == true) { MoveX(-315.f); - MoveY(50.f); + MoveY(-50.f); m_fFontPos = _float2(1250, 0.f); } else { MoveX(-180.f); - MoveY(40.f); + MoveY(-40.f); m_fFontPos = _float2(1115.f, 0.f); } } diff --git a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp index 35147ac54..34b99e202 100644 --- a/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Enemy_Panel.cpp @@ -28,7 +28,7 @@ HRESULT CEnemy_Panel::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 960.f; - Desc.fY = 50.f; + Desc.fY = -50.f; Desc.fSizeX = 960.f; Desc.fSizeY = 150.f; diff --git a/Jusin154_Team3D/Client/Private/HpBarBG.cpp b/Jusin154_Team3D/Client/Private/HpBarBG.cpp index 4d87dc2ec..97071e63d 100644 --- a/Jusin154_Team3D/Client/Private/HpBarBG.cpp +++ b/Jusin154_Team3D/Client/Private/HpBarBG.cpp @@ -24,7 +24,7 @@ HRESULT CHpBarBG::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 600.f; - Desc.fY = 180.f; + Desc.fY = -180.f; Desc.fSizeX = 144.f; Desc.fSizeY = 50.f; diff --git a/Jusin154_Team3D/Client/Private/InProgress_Panel.cpp b/Jusin154_Team3D/Client/Private/InProgress_Panel.cpp new file mode 100644 index 000000000..1eafbed4b --- /dev/null +++ b/Jusin154_Team3D/Client/Private/InProgress_Panel.cpp @@ -0,0 +1,201 @@ +#include "pch.h" +#include "InProgress_Panel.h" +#include "GameInstance.h" + +CInProgress_Panel::CInProgress_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CInProgress_Panel::CInProgress_Panel(const CInProgress_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CInProgress_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CInProgress_Panel::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 1575.f; + 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.04f; + Visible(false); + ElementAllVisible(true); + return S_OK; +} + +void CInProgress_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CInProgress_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + __super::Update(fTimeDelta); +} + +void CInProgress_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 CInProgress_Panel::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CInProgress_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CInProgress_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_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 CInProgress_Panel::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), 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; +} + +HRESULT CInProgress_Panel::Ready_Element(void* pArg) +{ + return S_OK; +} + +CInProgress_Panel* CInProgress_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CInProgress_Panel* pInstance = new CInProgress_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CInProgress_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CInProgress_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CInProgress_Panel* pInstance = new CInProgress_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CInProgress_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CInProgress_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CInProgress_Panel::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/InfoInstance.cpp b/Jusin154_Team3D/Client/Private/InfoInstance.cpp index c1b819ec9..e5be18947 100644 --- a/Jusin154_Team3D/Client/Private/InfoInstance.cpp +++ b/Jusin154_Team3D/Client/Private/InfoInstance.cpp @@ -6,6 +6,7 @@ #include "PlayerInfo.h" #include "InteractiveInfo.h" #include "Skill_Data.h" +#include "Quest_Data.h" #include "Damage_Font.h" #include "Player.h" @@ -261,6 +262,11 @@ void CInfoInstance::Event_CallBack(_wstring EventName, void* pArg) } } +QUESTINFO CInfoInstance::Get_Quest_Info(_int QuestID) +{ + return m_pQuestInfo->Get_Quest(QuestID); +} + HRESULT CInfoInstance::Regist_ActiveInteractive(CMapElement_Interactable* pInteractive) { if (nullptr == s_pInstance || nullptr == m_pInteractiveInfo) { @@ -316,6 +322,10 @@ HRESULT CInfoInstance::Initialize_Information(ID3D11Device* pDevice, ID3D11Devic if (nullptr == m_pSkillInfo) { return E_FAIL; } + m_pQuestInfo = CQuest_Data::Create(pDevice, pContext); + if (nullptr == m_pQuestInfo) { + return E_FAIL; + } m_pInteractiveInfo = CInteractiveInfo::Create(pDevice, pContext); if (nullptr == m_pInteractiveInfo) { return E_FAIL; @@ -362,6 +372,7 @@ void CInfoInstance::Release_Information() SAFE_RELEASE(m_pPlayerInfo); SAFE_RELEASE(m_pMonsterInfo); SAFE_RELEASE(m_pSkillInfo); + SAFE_RELEASE(m_pQuestInfo); SAFE_RELEASE(m_pInteractiveInfo); SAFE_RELEASE(m_pDevice); SAFE_RELEASE(m_pContext); diff --git a/Jusin154_Team3D/Client/Private/Loader.cpp b/Jusin154_Team3D/Client/Private/Loader.cpp index 26b92baa3..f985a0a02 100644 --- a/Jusin154_Team3D/Client/Private/Loader.cpp +++ b/Jusin154_Team3D/Client/Private/Loader.cpp @@ -112,6 +112,12 @@ #include "Quest_Info_Line.h" #include "Quest_Entry_Line.h" +#include "Quest_Status_Panel.h" +#include "Quest_Status.h" + +#include "Completed_Panel.h" +#include "InProgress_Panel.h" + #pragma endregion #pragma region PHYSX @@ -2028,6 +2034,28 @@ HRESULT CLoader::Loading_For_GamePlay() { return E_FAIL; } + + /* For.Prototype_GameObject_Quest_Status_Panel*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Status_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_Quest_Status*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Status::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + + /* For.Prototype_GameObject_Completed_Panel*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCompleted_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + /* For.Prototype_GameObject_InProgress_Panel*/ + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CInProgress_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } /* For.Prototype_GameObject_Damage_Font*/ if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CDamage_Font::Create(m_pDevice, m_pContext)))) diff --git a/Jusin154_Team3D/Client/Private/LoadingWidget.cpp b/Jusin154_Team3D/Client/Private/LoadingWidget.cpp index e6cbd7789..a10288c27 100644 --- a/Jusin154_Team3D/Client/Private/LoadingWidget.cpp +++ b/Jusin154_Team3D/Client/Private/LoadingWidget.cpp @@ -22,7 +22,7 @@ HRESULT CLoadingWidget::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 800.f; - Desc.fY = 400.f; + Desc.fY = -400.f; Desc.fSizeX = 200.f; Desc.fSizeY = 200.f; diff --git a/Jusin154_Team3D/Client/Private/LoadingWidget_Flame.cpp b/Jusin154_Team3D/Client/Private/LoadingWidget_Flame.cpp index f45001382..50192b5c9 100644 --- a/Jusin154_Team3D/Client/Private/LoadingWidget_Flame.cpp +++ b/Jusin154_Team3D/Client/Private/LoadingWidget_Flame.cpp @@ -22,7 +22,7 @@ HRESULT CLoadingWidget_Flame::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = -237.f; - Desc.fY = 90.f; + Desc.fY = -90.f; Desc.fSizeX = 100.f; Desc.fSizeY = 100.f; diff --git a/Jusin154_Team3D/Client/Private/Loading_Panel.cpp b/Jusin154_Team3D/Client/Private/Loading_Panel.cpp index 4fc492be4..55973eb04 100644 --- a/Jusin154_Team3D/Client/Private/Loading_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Loading_Panel.cpp @@ -24,7 +24,7 @@ HRESULT CLoading_Panel::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 1200.f; - Desc.fY = 900.f; + Desc.fY = -900.f; Desc.fSizeX = 1515.f; Desc.fSizeY = 300.f; diff --git a/Jusin154_Team3D/Client/Private/Magic_Icon.cpp b/Jusin154_Team3D/Client/Private/Magic_Icon.cpp index 6c17c2683..f03b052b3 100644 --- a/Jusin154_Team3D/Client/Private/Magic_Icon.cpp +++ b/Jusin154_Team3D/Client/Private/Magic_Icon.cpp @@ -22,7 +22,7 @@ HRESULT CMagic_Icon::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 630.f; - Desc.fY = 125.f; + Desc.fY = -125.f; Desc.fSizeX = 65.f; Desc.fSizeY = 65.f; diff --git a/Jusin154_Team3D/Client/Private/Magic_Item.cpp b/Jusin154_Team3D/Client/Private/Magic_Item.cpp index 577303621..3a23c3b48 100644 --- a/Jusin154_Team3D/Client/Private/Magic_Item.cpp +++ b/Jusin154_Team3D/Client/Private/Magic_Item.cpp @@ -22,7 +22,7 @@ HRESULT CMagic_Item::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = -800.f; - Desc.fY = 70.f; + Desc.fY = -70.f; Desc.fSizeX = 100.f; Desc.fSizeY = 100.f; @@ -184,7 +184,7 @@ HRESULT CMagic_Item::Render() { return E_FAIL; } - m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY - m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha)); return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Magic_Meter.cpp b/Jusin154_Team3D/Client/Private/Magic_Meter.cpp index f2d0a7d3e..355fda382 100644 --- a/Jusin154_Team3D/Client/Private/Magic_Meter.cpp +++ b/Jusin154_Team3D/Client/Private/Magic_Meter.cpp @@ -23,7 +23,7 @@ HRESULT CMagic_Meter::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 190.f; - Desc.fY = 145.f; + Desc.fY = -145.f; Desc.fSizeX = 70.f; Desc.fSizeY = 20.f; diff --git a/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp b/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp index f47084c13..9e6c91082 100644 --- a/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/MiniMap_Panel.cpp @@ -24,7 +24,7 @@ HRESULT CMiniMap_Panel::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 170.f; - Desc.fY = 920.f; + Desc.fY = -920.f; Desc.fSizeX = 280.f; Desc.fSizeY = 280.f; diff --git a/Jusin154_Team3D/Client/Private/NoMountIcon.cpp b/Jusin154_Team3D/Client/Private/NoMountIcon.cpp index 9c015b9f8..27d3f788b 100644 --- a/Jusin154_Team3D/Client/Private/NoMountIcon.cpp +++ b/Jusin154_Team3D/Client/Private/NoMountIcon.cpp @@ -22,7 +22,7 @@ HRESULT CNoMountIcon::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 120.f; - Desc.fY = -90; + Desc.fY = 90; Desc.fSizeX = 65.f; Desc.fSizeY = 65.f; diff --git a/Jusin154_Team3D/Client/Private/Potion.cpp b/Jusin154_Team3D/Client/Private/Potion.cpp index c16c19c53..0ba23048c 100644 --- a/Jusin154_Team3D/Client/Private/Potion.cpp +++ b/Jusin154_Team3D/Client/Private/Potion.cpp @@ -24,7 +24,7 @@ HRESULT CPotion::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 700.f; - Desc.fY = 150.f; + Desc.fY = -150.f; Desc.fSizeX = 80.f; Desc.fSizeY = 80.f; @@ -141,7 +141,7 @@ HRESULT CPotion::Render() if (FAILED(m_pVIBufferCom->Render())) { return E_FAIL; } - m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY - m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f) * m_fAlpha, m_fAlpha)); return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Quest_Border.cpp b/Jusin154_Team3D/Client/Private/Quest_Border.cpp index a6cd0e3ef..3e4f65db0 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Border.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Border.cpp @@ -21,8 +21,8 @@ HRESULT CQuest_Border::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = -485.f; - Desc.fY = -150.f; + Desc.fX = -475.f; + Desc.fY = 150.f; Desc.fSizeX = 192.f; Desc.fSizeY = 192.f; @@ -41,8 +41,8 @@ HRESULT CQuest_Border::Initialize(void* pArg) m_fAlphaTime = 5.f; m_vNine_Slice = _float4(48.f, 148.f, 48.f, 148.f); m_fSortZ = 0.02f; - m_fFontX = 740.f; - m_fFontY = 500.f; + m_fFontX = -31.5f; + m_fFontY = -50.f; SizeUpX(500.f); SizeUpY(500.f); Visible(true); @@ -124,7 +124,9 @@ HRESULT CQuest_Border::Render() return E_FAIL; } - //m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, (m_fFontY + m_fY) - m_fPreviewOffSet * 0.5f), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + _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)); + return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp b/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp index 7da26c311..52b848b66 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Canvas.cpp @@ -3,30 +3,33 @@ #include "Quest_Canvas.h" #include "GameInstance.h" #include "Quest_Panel.h" +#include "Quest_Status_Panel.h" +#include "Completed_Panel.h" +#include "InProgress_Panel.h" CQuest_Canvas::CQuest_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CCanvasObject(pDevice, pContext) + :CCanvasObject(pDevice, pContext) { } CQuest_Canvas::CQuest_Canvas(const CQuest_Canvas& rhs) - :CCanvasObject(rhs) + :CCanvasObject(rhs) { } HRESULT CQuest_Canvas::Initialize_Prototype() { - return S_OK; + return S_OK; } HRESULT CQuest_Canvas::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = 0.f; - Desc.fY = 0.f; - Desc.fSizeX = 1920.f; - Desc.fSizeY = 1080.f; + Desc.fX = 960.f; + Desc.fY = 540.f; + Desc.fSizeX = g_iWinSizeX; + Desc.fSizeY = g_iWinSizeY; if (FAILED(__super::Initialize(&Desc))) { @@ -40,7 +43,13 @@ HRESULT CQuest_Canvas::Initialize(void* pArg) { return E_FAIL; } + m_fAlpha = 1.f; + m_fOwnerAlpha = 1.f; + m_fCanvasAlpha = 1.f; + m_fSortZ = 0.05f; Visible(false); + m_iIndex = -1; + Add_Function(TEXT("QuestPanelUpdate"), [this](void* p) {this->Update_Panel(*reinterpret_cast<_int*>(p)); }); return S_OK; } @@ -57,12 +66,27 @@ void CQuest_Canvas::Update(_float fTimeDelta) void CQuest_Canvas::Late_Update(_float fTimeDelta) { if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); } + __super::Late_Update(fTimeDelta); } HRESULT CQuest_Canvas::Render() { + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + return S_OK; } @@ -73,12 +97,54 @@ _vector CQuest_Canvas::Get_WorldPostion() HRESULT CQuest_Canvas::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_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 CQuest_Canvas::Ready_Components(void* pArg) { - if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Quest_Widget"), 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; } @@ -92,6 +158,25 @@ HRESULT CQuest_Canvas::Ready_Panel(void* pArg) return E_FAIL; } Add_Panel(TEXT("Quest_Panel"), m_pQuest_Panel); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pCompleted_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("Completed_Panel"), m_pCompleted_Panel); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pInProgress_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("InProgress_Panel"), m_pInProgress_Panel); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pQuest_Status_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("Quest_Status_Panel"), m_pQuest_Status_Panel); + return S_OK; } @@ -99,6 +184,28 @@ void CQuest_Canvas::Clear_Penel() { } +void CQuest_Canvas::Update_Panel(_int Index) +{ + if (m_iIndex == Index) + return; + + m_iIndex = Index; + for (_int i = 0; i < 3; ++i) + { + if (i == Index) + { + m_bClick[i] = true; + } + else + { + m_bClick[i] = false; + } + } + static_cast(m_pQuest_Panel)->Visible(m_bClick[0]); + static_cast(m_pCompleted_Panel)->Visible(m_bClick[1]); + static_cast(m_pInProgress_Panel)->Visible(m_bClick[2]); +} + CQuest_Canvas* CQuest_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CQuest_Canvas* pInstance = new CQuest_Canvas(pDevice, pContext); @@ -129,6 +236,8 @@ void CQuest_Canvas::Free() { __super::Free(); + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } diff --git a/Jusin154_Team3D/Client/Private/Quest_Data.cpp b/Jusin154_Team3D/Client/Private/Quest_Data.cpp new file mode 100644 index 000000000..ef88bbdf7 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Quest_Data.cpp @@ -0,0 +1,119 @@ +#include "pch.h" +#include "Quest_Data.h" +#include "GameObject.h" +#include "UIObject.h" +#include "tinyxml2.h" +#include "InfoInstance.h" + +CQuest_Data::CQuest_Data() + : m_pInfoInstance(CInfoInstance::GetInstance()) { +} + +HRESULT CQuest_Data::Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex) +{ + + return S_OK; +} + +void CQuest_Data::Update(_float fTimeDelta) +{ + Load_QuestInfo("../Bin/Resources/Data/Quest/QuestData.xml"); +} + +HRESULT CQuest_Data::Load_QuestInfo(const _char* pFilePath) +{ + tinyxml2::XMLDocument doc; + tinyxml2::XMLError Error = doc.LoadFile(pFilePath); + if (Error != tinyxml2::XML_SUCCESS) + return E_FAIL; + + tinyxml2::XMLElement* pQuestInfo = doc.FirstChildElement("QuestInfo"); + if (!pQuestInfo) + return E_FAIL; + + tinyxml2::XMLElement* pQuestData = pQuestInfo->FirstChildElement("QuestData"); + if (!pQuestData) + return E_FAIL; + + tinyxml2::XMLElement* pQuest = pQuestData->FirstChildElement("Quest"); + while (pQuest) + { + QUESTINFO quest{}; + + pQuest->QueryIntAttribute("QuestID", &quest.iQuestID); + pQuest->QueryIntAttribute("QuestType", &quest.iType); + quest.pQuestName = CMyTools::ToWstring(pQuest->Attribute("QuestName")); + quest.pQuestInfo = CMyTools::ToWstring(pQuest->Attribute("QuestInfo")); + + tinyxml2::XMLElement* pObjectives = pQuest->FirstChildElement("Objectives"); + if (pObjectives) + { + tinyxml2::XMLElement* pObjective = pObjectives->FirstChildElement("Objective"); + while (pObjective) + { + OBJECTIVEINFO obj{}; + + pObjective->QueryIntAttribute("Objective", &obj.iObjectType); + pObjective->QueryIntAttribute("TargetID", &obj.iTargetID); + pObjective->QueryIntAttribute("RequiredCount", &obj.iRequiredCount); + pObjective->QueryIntAttribute("CurrentCount", &obj.iCurrentCount); + + quest.ObjectiveInfo.push_back(obj); + + pObjective = pObjective->NextSiblingElement("Objective"); + } + } + + tinyxml2::XMLElement* pRewards = pQuest->FirstChildElement("Rewards"); + if (pRewards) + { + tinyxml2::XMLElement* pReward = pRewards->FirstChildElement("Reward"); + while (pReward) + { + REWARDSINFO reward{}; + + pReward->QueryIntAttribute("RequiredCount", &reward.iRewardType); + pReward->QueryIntAttribute("CurrentCount", &reward.iRewardID); + + quest.RewardsInfo.push_back(reward); + + pReward = pReward->NextSiblingElement("Reward"); + } + } + m_iQuest_Count++; + QuestInfos.push_back(quest); + + pQuest = pQuest->NextSiblingElement("Quest"); + } + + return S_OK; +} + +QUESTINFO CQuest_Data::Get_Quest(_int QuestID) +{ + return QuestInfos[QuestID]; +} + +_int CQuest_Data::Get_Count() +{ + return m_iQuest_Count; +} + +CQuest_Data* CQuest_Data::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CQuest_Data* pInstance = new CQuest_Data(); + + if (FAILED(pInstance->Initialize(pDevice, pContext))) + { + MSG_BOX("Failed to Created : CQuest_Data"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CQuest_Data::Free() +{ + __super::Free(); + +} diff --git a/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp b/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp index 1d954871c..3dec4de70 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Entry_Line.cpp @@ -22,7 +22,7 @@ HRESULT CQuest_Entry_Line::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 330.f; - Desc.fY = -230.f; + Desc.fY = 230.f; Desc.fSizeX = 256.f; Desc.fSizeY = 64.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) }; @@ -44,7 +44,8 @@ HRESULT CQuest_Entry_Line::Initialize(void* pArg) m_fFontY = 520.f; SizeUpX(800.f); SizeUpY(15.f); - Visible(true); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); + Visible(false); return S_OK; } @@ -121,7 +122,7 @@ HRESULT CQuest_Entry_Line::Render() } _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)); + 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; } @@ -207,6 +208,19 @@ HRESULT CQuest_Entry_Line::Ready_Components(void* pArg) return S_OK; } +void CQuest_Entry_Line::Set_Hover(_int Index) +{ + m_iQuest_Index = Index; + if (m_iQuest_Index == -1) + { + Visible(false); + } + else + { + Visible(true); + } +} + CQuest_Entry_Line* CQuest_Entry_Line::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CQuest_Entry_Line* pInstance = new CQuest_Entry_Line(pDevice, pContext); diff --git a/Jusin154_Team3D/Client/Private/Quest_Header.cpp b/Jusin154_Team3D/Client/Private/Quest_Header.cpp index eec368e65..2d265e46a 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Header.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Header.cpp @@ -21,8 +21,8 @@ HRESULT CQuest_Header::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = -485.f; - Desc.fY = -352.f; + Desc.fX = -475.f; + Desc.fY = 352.f; Desc.fSizeX = 128.f; Desc.fSizeY = 32.f; @@ -125,7 +125,7 @@ HRESULT CQuest_Header::Render() } _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)); + 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; } diff --git a/Jusin154_Team3D/Client/Private/Quest_HeaderLine.cpp b/Jusin154_Team3D/Client/Private/Quest_HeaderLine.cpp index fc9fbe9dd..94b9f2bb9 100644 --- a/Jusin154_Team3D/Client/Private/Quest_HeaderLine.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_HeaderLine.cpp @@ -3,26 +3,26 @@ #include "GameInstance.h" CQuest_HeaderLine::CQuest_HeaderLine(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CElementObject(pDevice, pContext) + :CElementObject(pDevice, pContext) { } CQuest_HeaderLine::CQuest_HeaderLine(const CQuest_HeaderLine& rhs) - :CElementObject(rhs) + :CElementObject(rhs) { } HRESULT CQuest_HeaderLine::Initialize_Prototype() { - return S_OK; + return S_OK; } HRESULT CQuest_HeaderLine::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = -485.f; - Desc.fY = -310.f; + Desc.fX = -475.f; + Desc.fY = 310.f; Desc.fSizeX = 480.f; Desc.fSizeY = 10.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) }; diff --git a/Jusin154_Team3D/Client/Private/Quest_Info.cpp b/Jusin154_Team3D/Client/Private/Quest_Info.cpp index e502afdce..591d611b0 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Info.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Info.cpp @@ -22,7 +22,7 @@ HRESULT CQuest_Info::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 325.f; - Desc.fY = -250.f; + Desc.fY = 250.f; Desc.fSizeX = 128.f; Desc.fSizeY = 128.f; @@ -49,6 +49,7 @@ HRESULT CQuest_Info::Initialize(void* pArg) m_fFontY = 500.f; m_iPerQuestIndex = -1; Visible(true); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); return S_OK; } @@ -96,7 +97,6 @@ void CQuest_Info::Update(_float fTimeDelta) } } m_fTime += fTimeDelta * m_fTimeMult; - Hover(); m_pRect.left = long(m_fX - m_vScale.x * 0.5f); m_pRect.top = long(m_fY - m_vScale.y * 0.5f); m_pRect.right = long(m_fX + m_vScale.x * 0.5f); @@ -218,21 +218,17 @@ HRESULT CQuest_Info::Ready_Components(void* pArg) return S_OK; } -void CQuest_Info::Hover() +void CQuest_Info::Set_Hover(_int Index) { - POINT ptMouse{}; - GetCursorPos(&ptMouse); - ScreenToClient(g_hWnd, &ptMouse); - _float2 fMouse; - fMouse.x = ptMouse.x - g_iWinSizeX * 0.5f; - fMouse.y = -(ptMouse.y - g_iWinSizeY * 0.5f); - - if (fMouse.x >= m_pRect.left && fMouse.x <= m_pRect.right && - fMouse.y >= m_pRect.top && fMouse.y <= m_pRect.bottom) + m_iQuest_Index = Index; + if (m_iQuest_Index == -1) { - _int a = 0; + Visible(false); + } + else + { + Visible(true); } - } CQuest_Info* CQuest_Info::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) diff --git a/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp b/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp index 8ba1034cc..5ccff0435 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Info_Header.cpp @@ -22,7 +22,7 @@ HRESULT CQuest_Info_Header::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 345.f; - Desc.fY = -350.f; + Desc.fY = 350.f; Desc.fSizeX = 128.f; Desc.fSizeY = 32.f; @@ -46,7 +46,8 @@ HRESULT CQuest_Info_Header::Initialize(void* pArg) m_iColor = 2; SizeUpX(1105.f); SizeUpY(60.f); - Visible(true); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); + Visible(false); return S_OK; } @@ -127,7 +128,7 @@ HRESULT CQuest_Info_Header::Render() } _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)); + 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; } @@ -211,6 +212,19 @@ HRESULT CQuest_Info_Header::Ready_Components(void* pArg) return S_OK; } +void CQuest_Info_Header::Set_Hover(_int Index) +{ + m_iQuest_Index = Index; + if (m_iQuest_Index == -1) + { + Visible(false); + } + else + { + Visible(true); + } +} + CQuest_Info_Header* CQuest_Info_Header::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CQuest_Info_Header* pInstance = new CQuest_Info_Header(pDevice, pContext); diff --git a/Jusin154_Team3D/Client/Private/Quest_Info_Header.h b/Jusin154_Team3D/Client/Private/Quest_Info_Header.h new file mode 100644 index 000000000..de74f7283 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Quest_Info_Header.h @@ -0,0 +1,53 @@ +#pragma once + +#include "Client_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CQuest_Info_Header final : public CElementObject +{ +private: + CQuest_Info_Header(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CQuest_Info_Header(const CQuest_Info_Header& rhs); + virtual ~CQuest_Info_Header() = 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 Set_Hover(_int Index); + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _int m_iColor = true; + _int m_iQuest_Index{}; +public: + static CQuest_Info_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp b/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp index 18d74a099..63a32434f 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Info_Line.cpp @@ -3,18 +3,18 @@ #include "GameInstance.h" CQuest_Info_Line::CQuest_Info_Line(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CElementObject(pDevice, pContext) + :CElementObject(pDevice, pContext) { } CQuest_Info_Line::CQuest_Info_Line(const CQuest_Info_Line& rhs) - :CElementObject(rhs) + :CElementObject(rhs) { } HRESULT CQuest_Info_Line::Initialize_Prototype() { - return S_OK; + return S_OK; } HRESULT CQuest_Info_Line::Initialize(void* pArg) @@ -22,7 +22,7 @@ HRESULT CQuest_Info_Line::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 323.f; - Desc.fY = -315.f; + Desc.fY = 315.f; Desc.fSizeX = 256.f; Desc.fSizeY = 64.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) }; @@ -42,7 +42,8 @@ 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); - Visible(true); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); + Visible(false); return S_OK; } @@ -201,6 +202,19 @@ HRESULT CQuest_Info_Line::Ready_Components(void* pArg) return S_OK; } +void CQuest_Info_Line::Set_Hover(_int Index) +{ + m_iQuest_Index = Index; + if (m_iQuest_Index == -1) + { + Visible(false); + } + else + { + Visible(true); + } +} + CQuest_Info_Line* CQuest_Info_Line::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CQuest_Info_Line* pInstance = new CQuest_Info_Line(pDevice, pContext); diff --git a/Jusin154_Team3D/Client/Private/Quest_List.cpp b/Jusin154_Team3D/Client/Private/Quest_List.cpp index b9a71af12..41c7e36bd 100644 --- a/Jusin154_Team3D/Client/Private/Quest_List.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_List.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "Quest_List.h" #include "GameInstance.h" +#include "InfoInstance.h" CQuest_List::CQuest_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -8,7 +9,8 @@ CQuest_List::CQuest_List(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) } CQuest_List::CQuest_List(const CQuest_List& rhs) - :CElementObject(rhs) + :CElementObject(rhs), + m_pInfoInstance(CInfoInstance::GetInstance()) { } @@ -21,8 +23,8 @@ HRESULT CQuest_List::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = -485.f; - Desc.fY = 150.f; + Desc.fX = -475.f; + Desc.fY = -150.f; Desc.fSizeX = 256.f; Desc.fSizeY = 64.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) }; @@ -87,6 +89,28 @@ void CQuest_List::Update(_float fTimeDelta) } } + Hover(); + if (m_bHover == true) + { + m_fSizeX = 505.f; + m_fSizeY = 90.f; + m_fFontX = 765.f; + m_fFontY = 520.f; + m_pFontSize = TEXT("Font_size21"); + m_pQuest_ID = 0; + static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_pQuest_ID); + } + else + { + m_fSizeX = 495.f; + m_fSizeY = 80.f; + m_fFontX = 770.f; + m_fFontY = 520.f; + m_pFontSize = TEXT("Font_size20"); + m_pQuest_ID = -1; + static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_pQuest_ID); + } + m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } @@ -118,6 +142,8 @@ HRESULT CQuest_List::Render() return E_FAIL; } + m_pGameInstance->Render_Text(m_pFontSize, m_pQuest_Name.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY)); + return S_OK; } @@ -163,7 +189,7 @@ HRESULT CQuest_List::Bind_ShaderResources() 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; @@ -201,6 +227,34 @@ HRESULT CQuest_List::Ready_Components(void* pArg) return S_OK; } +void CQuest_List::Hover() +{ + POINT ptMouse{}; + GetCursorPos(&ptMouse); + ScreenToClient(g_hWnd, &ptMouse); + _float2 fMouse{}; + fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f); + fMouse.y = -(ptMouse.y - (g_iWinSizeY * 0.5f)); + POINT pt{}; + pt.x = _long(fMouse.x); + pt.y = _long(fMouse.y); + + if (PtInRect(&m_pRect, pt)) + { + m_bHover = true; + } + else + { + m_bHover = false; + } +} + +void CQuest_List::Set_Name(_wstring Name, _int ID) +{ + m_pQuest_Name = Name; + m_pQuest_ID = ID; +} + CQuest_List* CQuest_List::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CQuest_List* pInstance = new CQuest_List(pDevice, pContext); diff --git a/Jusin154_Team3D/Client/Private/Quest_Panel.cpp b/Jusin154_Team3D/Client/Private/Quest_Panel.cpp index 147487e98..2ebe8114f 100644 --- a/Jusin154_Team3D/Client/Private/Quest_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Quest_Panel.cpp @@ -11,27 +11,27 @@ #include "Quest_Entry_Line.h" CQuest_Panel::CQuest_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) - :CPanelObject(pDevice, pContext) + :CPanelObject(pDevice, pContext) { } CQuest_Panel::CQuest_Panel(const CQuest_Panel& rhs) - :CPanelObject(rhs) + :CPanelObject(rhs) { } HRESULT CQuest_Panel::Initialize_Prototype() { - return S_OK; + return S_OK; } HRESULT CQuest_Panel::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = 960.f; - Desc.fY = 540.f; - Desc.fSizeX = g_iWinSizeX; + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 1575.f; Desc.fSizeY = g_iWinSizeY; if (FAILED(__super::Initialize(&Desc))) @@ -47,7 +47,7 @@ HRESULT CQuest_Panel::Initialize(void* pArg) return E_FAIL; } m_fCanvasAlpha = 1.f; - m_fSortZ = 0.05f; + m_fSortZ = 0.04f; m_iSpellType = -1; m_fDelayTime = 1.f; Visible(true); @@ -88,18 +88,6 @@ void CQuest_Panel::Late_Update(_float fTimeDelta) HRESULT CQuest_Panel::Render() { - if (FAILED(Bind_ShaderResources())) { - return E_FAIL; - } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) { - return E_FAIL; - } - if (FAILED(m_pVIBufferCom->Bind_Resources())) { - return E_FAIL; - } - if (FAILED(m_pVIBufferCom->Render())) { - return E_FAIL; - } return S_OK; } @@ -111,56 +99,11 @@ _vector CQuest_Panel::Get_WorldPostion() HRESULT CQuest_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_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 CQuest_Panel::Ready_Components(void* pArg) { - if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) - { - return E_FAIL; - } - if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Quest_Widget"), 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; } @@ -214,7 +157,7 @@ HRESULT CQuest_Panel::Ready_Element(void* pArg) } Add_Element(TEXT("Quest_Entry_Line"), m_pQuest_Entry_Line); - return S_OK; + return S_OK; } CQuest_Panel* CQuest_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) @@ -247,8 +190,6 @@ void CQuest_Panel::Free() { __super::Free(); - SAFE_RELEASE(m_pDiffuse_TextureCom); - SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } diff --git a/Jusin154_Team3D/Client/Private/Quest_Status.cpp b/Jusin154_Team3D/Client/Private/Quest_Status.cpp new file mode 100644 index 000000000..fa937fdfa --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Quest_Status.cpp @@ -0,0 +1,366 @@ +#include "pch.h" +#include "Quest_Status.h" +#include "GameInstance.h" + +CQuest_Status::CQuest_Status(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CQuest_Status::CQuest_Status(const CQuest_Status& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CQuest_Status::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CQuest_Status::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 180.f; + Desc.fSizeX = 128.f; + Desc.fSizeY = 128.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_fAlpha = 1.f; + m_fTimeMult = 3.f; + m_fAlphaTime = 1.f; + Compute_UI(0); + m_vImageposi = _float4{ 32.f, 32.f, 64.f, 64.f }; + m_fFontX = 80.f; + m_fFontY = 480.f; + Visible(true); + return S_OK; +} + +void CQuest_Status::Priority_Update(_float fTimeDelta) +{ + + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CQuest_Status::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; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + Hover(); + if (m_bHover == true) + { + if (m_pGameInstance->Mouse_Down(DIM_LBUTTON)) + { + m_bClick = true; + static_cast(m_pOwner)->Function_Callback(TEXT("Click"), &m_iIndex); + } + } + + if (m_bClick == true) + { + m_fSizeX = 148.f; + m_fSizeY = 148.f; + m_vImageposi = _float4{ 42.f, 42.f, 64.f, 64.f }; + } + else + { + m_fSizeX = m_fOrigin_Size.x; + m_fSizeY = m_fOrigin_Size.y; + m_vImageposi = _float4{ 32.f, 32.f, 64.f, 64.f }; + m_bClick = false; + } + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CQuest_Status::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CQuest_Status::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_STATUS)))) + { + 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"), m_pName.c_str()) - 30) * 0.5f; + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pName.c_str(), _float2((m_fFontX - m_fX) - OffSet, m_fFontY - m_fY)); + + return S_OK; +} + +_vector CQuest_Status::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CQuest_Status::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_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 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; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_vImageposi, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iHover", &m_bHover, sizeof(_bool)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iClick", &m_bClick, sizeof(_bool)))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CQuest_Status::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Buttom_Slot"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_Quest_Atlas"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Texture_UI_T_SpellMiniGame_ButtonRing"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +void CQuest_Status::Compute_UI(_int Index) +{ + _float2 fImage_Size = { 192.f, 64.f }; + + _uint iCountX = 3; + _uint iCountY = 1; + + _float iImageX = 64.f; + _float iImageY = 64.f; + + _uint iframeX = Index % iCountX; + _uint iframeY = Index / iCountX; + + _float2 UVStart; + UVStart.x = iframeX * iImageX / fImage_Size.x; + UVStart.y = iframeY * iImageY / fImage_Size.y; + + _float2 UVEnd; + UVEnd.x = UVStart.x + (iImageX / fImage_Size.x); + UVEnd.y = UVStart.y + (iImageY / fImage_Size.y); + + _float4 UV = _float4{ UVStart.x, UVStart.y, UVEnd.x, UVEnd.y }; + m_vUV = UV; +} + +void CQuest_Status::Set_Status(_int Index, _float m_fPosY, _wstring Text) +{ + m_iIndex = Index; + Compute_UI(Index); + MoveY(m_fPosY); + m_pName = Text; +} + +void CQuest_Status::Set_Click(_bool bClick) +{ + m_bClick = bClick; +} + +void CQuest_Status::Hover() +{ + POINT ptMouse{}; + GetCursorPos(&ptMouse); + ScreenToClient(g_hWnd, &ptMouse); + + // 2. UI 중심 기준으로 변환 (현재 구조 유지) + _float2 fMouse; + fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f); + fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f); + + // 3. 이미지 중심 좌표 + _float2 center; + center.x = m_fX + m_pOwner->Get_WorldPostion().m128_f32[0]; + center.y = m_fY + m_pOwner->Get_WorldPostion().m128_f32[1]; + + // 4. 반지름 계산 (원형이면 가로 기준) + float radius = m_fSizeX * 0.4f; + + // 5. 거리 제곱 계산 + float dx = fMouse.x - center.x; + float dy = fMouse.y - center.y; + float distSq = dx * dx + dy * dy; + + // 6. 원 안 체크 + if (distSq <= radius * radius) + { + m_bHover = true; + } + else + { + m_bHover = false; + } +} + +CQuest_Status* CQuest_Status::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CQuest_Status* pInstance = new CQuest_Status(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CQuest_Status"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CQuest_Status::Clone(void* pArg, CGameObject* pOwner) +{ + CQuest_Status* pInstance = new CQuest_Status(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CQuest_Status"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CQuest_Status::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CQuest_Status::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Quest_Status_Panel.cpp b/Jusin154_Team3D/Client/Private/Quest_Status_Panel.cpp new file mode 100644 index 000000000..410ab2832 --- /dev/null +++ b/Jusin154_Team3D/Client/Private/Quest_Status_Panel.cpp @@ -0,0 +1,197 @@ +#include "pch.h" +#include "Quest_Status_Panel.h" +#include "GameInstance.h" +#include "Quest_Status.h" + +CQuest_Status_Panel::CQuest_Status_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CQuest_Status_Panel::CQuest_Status_Panel(const CQuest_Status_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CQuest_Status_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CQuest_Status_Panel::Initialize(void* pArg) +{ + + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = -860.f; + Desc.fY = 120.f; + Desc.fSizeX = 175.f; + Desc.fSizeY = 680.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; + } + if (FAILED(Ready_Element(pArg))) + { + return E_FAIL; + } + + m_fCanvasAlpha = 1.f; + m_fSortZ = 0.04f; + Visible(true); + Set_Status(); + Add_Function(TEXT("Click"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); }); + return S_OK; +} + +void CQuest_Status_Panel::Set_Status() +{ + static_cast(m_pQuest_Status1)->Set_Status(0, 180.f, TEXT("전 체")); + static_cast(m_pQuest_Status2)->Set_Status(1, 0.f, TEXT("진행중")); + static_cast(m_pQuest_Status3)->Set_Status(2, -180.f, TEXT("완 료")); + static_cast(m_pQuest_Status1)->Set_Click(true); + m_bClick[0] = true; + m_bClick[1] = false; + m_bClick[2] = false; +} + +void CQuest_Status_Panel::Slot_Hover(_int Index) +{ + for (_int i = 0; i < 3; ++i) + { + if (i == Index) + { + m_bClick[i] = true; + } + else + { + m_bClick[i] = false; + } + } + static_cast(m_pQuest_Status1)->Set_Click(m_bClick[0]); + static_cast(m_pQuest_Status2)->Set_Click(m_bClick[1]); + static_cast(m_pQuest_Status3)->Set_Click(m_bClick[2]); + static_cast(m_pOwner)->Function_Callback(TEXT("QuestPanelUpdate"), &Index); +} + +void CQuest_Status_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CQuest_Status_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Update(fTimeDelta); +} + +void CQuest_Status_Panel::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CQuest_Status_Panel::Render() +{ + return S_OK; +} + +_vector CQuest_Status_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CQuest_Status_Panel::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CQuest_Status_Panel::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CQuest_Status_Panel::Ready_Element(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status1)))) + { + return E_FAIL; + } + Add_Element(TEXT("Quest_Status1"), m_pQuest_Status1); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status2)))) + { + return E_FAIL; + } + Add_Element(TEXT("Quest_Status2"), m_pQuest_Status2); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status3)))) + { + return E_FAIL; + } + Add_Element(TEXT("Quest_Status3"), m_pQuest_Status3); + + return S_OK; +} + +CQuest_Status_Panel* CQuest_Status_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CQuest_Status_Panel* pInstance = new CQuest_Status_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CQuest_Status_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CQuest_Status_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CQuest_Status_Panel* pInstance = new CQuest_Status_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CQuest_Status_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CQuest_Status_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} + +#ifdef _DEBUG +void CQuest_Status_Panel::Describe_Entity() +{ +} +#endif // _DEBUG diff --git a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp index 34b4f071c..2aae6a746 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Anim.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Anim.cpp @@ -25,7 +25,7 @@ HRESULT CSpell_Anim::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 590.f; - Desc.fY = -100.f; + Desc.fY = 100.f; Desc.fSizeX = 470.f; Desc.fSizeY = 250.f; @@ -111,7 +111,7 @@ void CSpell_Anim::Update(_float fTimeDelta) if (m_iPerSpell != -1) { - m_fY = m_fOrigin_Position.y + m_pInfoInstance->Get_Spell_Info(m_iPerSpell).fVidio; + m_fY = m_fOrigin_Position.y - m_pInfoInstance->Get_Spell_Info(m_iPerSpell).fVidio; } __super::Update(fTimeDelta); diff --git a/Jusin154_Team3D/Client/Private/Spell_Drag.cpp b/Jusin154_Team3D/Client/Private/Spell_Drag.cpp index d5290e3e4..ab7c6aecd 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Drag.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Drag.cpp @@ -112,7 +112,7 @@ void CSpell_Drag::Update(_float fTimeDelta) ScreenToClient(g_hWnd, &m_pPt); _float2 fMouse{}; fMouse.x = m_pPt.x - (g_iWinSizeX * 0.5f); - fMouse.y = m_pPt.y - (g_iWinSizeY * 0.5f); + fMouse.y = -m_pPt.y + (g_iWinSizeY * 0.5f); m_vStart_MousePos = XMVectorSet(fMouse.x, fMouse.y, 0.f, 1.f); m_bFalse = false; @@ -127,7 +127,7 @@ void CSpell_Drag::Update(_float fTimeDelta) ScreenToClient(g_hWnd, &pt); float moveX = pt.x - (g_iWinSizeX * 0.5f); - float moveY = pt.y - (g_iWinSizeY * 0.5f); + float moveY = -pt.y + (g_iWinSizeY * 0.5f); m_vMove_MousePos = XMVectorSet(moveX, moveY, 0.f, 1.f); @@ -351,7 +351,7 @@ _float2 CSpell_Drag::Get_MousePos() ScreenToClient(g_hWnd, &m_pPt); _float2 fMouse{}; fMouse.x = m_pPt.x - (g_iWinSizeX * 0.5f); - fMouse.y = m_pPt.y - (g_iWinSizeY * 0.5f); + fMouse.y = -m_pPt.y + (g_iWinSizeY * 0.5f); m_vMove_MousePos = XMVectorSet(fMouse.x, fMouse.y, 0.f, 1.f); return fMouse; diff --git a/Jusin154_Team3D/Client/Private/Spell_Header.cpp b/Jusin154_Team3D/Client/Private/Spell_Header.cpp index 685d50aa5..8aa1ecd82 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Header.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Header.cpp @@ -24,7 +24,7 @@ HRESULT CSpell_Header::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 600.f; - Desc.fY = -385.f; + Desc.fY = 385.f; Desc.fSizeX = 512.f; Desc.fSizeY = 80.f; @@ -144,8 +144,8 @@ HRESULT CSpell_Header::Render() m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pSpell_Name.c_str()) - 53.f) * 0.5f; - m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet((215.f / 255.f) * m_fAlpha, (185.f / 255.f) * m_fAlpha, (95.f / 255.f) * m_fAlpha, m_fAlpha)); - m_pGameInstance->Render_Text(TEXT("Font_size13"), m_fSpell_Type.c_str(), _float2(m_fType.x + m_fX, m_fType.y + 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_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY - m_fY), XMVectorSet((215.f / 255.f) * m_fAlpha, (185.f / 255.f) * m_fAlpha, (95.f / 255.f) * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("Font_size13"), m_fSpell_Type.c_str(), _float2(m_fType.x + m_fX, m_fType.y - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp b/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp index c9f9518db..7c6963c48 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Header_Line.cpp @@ -22,7 +22,7 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 600.f; - Desc.fY = -340.f; + Desc.fY = 340.f; Desc.fSizeX = 487.f; Desc.fSizeY = 18.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) }; diff --git a/Jusin154_Team3D/Client/Private/Spell_Overlay.cpp b/Jusin154_Team3D/Client/Private/Spell_Overlay.cpp index 86a0bc7aa..8566798e0 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Overlay.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Overlay.cpp @@ -24,7 +24,7 @@ HRESULT CSpell_Overlay::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 380.f; - Desc.fY = 30.f; + Desc.fY = -30.f; Desc.fSizeX = 105.f; Desc.fSizeY = 105.f; diff --git a/Jusin154_Team3D/Client/Private/Spell_Panel.cpp b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp index c631ef00b..4d1ad1088 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Panel.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Panel.cpp @@ -39,7 +39,7 @@ HRESULT CSpell_Panel::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 960.f; - Desc.fY = 540.f; + Desc.fY = -540.f; Desc.fSizeX = g_iWinSizeX; Desc.fSizeY = g_iWinSizeY; @@ -330,10 +330,6 @@ HRESULT CSpell_Panel::Ready_Element(void* pArg) } Add_Element(TEXT("Spell_Drag"), m_pSpell_Drag); - //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, m_Info, nullptr, reinterpret_cast(&m_pSpell_Data)))) - //{ - // return E_FAIL; - //} return S_OK; } diff --git a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp index 074f99af1..2aa0b77bc 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Preview.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Preview.cpp @@ -3,7 +3,6 @@ #include "GameInstance.h" #include "InfoInstance.h" - CSpell_Preview::CSpell_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) { @@ -25,7 +24,7 @@ HRESULT CSpell_Preview::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 400.f; - Desc.fY = -365.f; + Desc.fY = 500.f; Desc.fSizeX = 128.f; Desc.fSizeY = 128.f; @@ -46,7 +45,7 @@ HRESULT CSpell_Preview::Initialize(void* pArg) m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f); m_fTopY = m_fY - m_vScale.y * 0.5f; m_fPreviewOffSet = 0.f; - m_fOriginPerviewSize = 280.f; + m_fOriginPerviewSize = 280; SizeUpX(512.f); SizeUpY(m_fOriginPerviewSize); m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL); @@ -103,19 +102,16 @@ void CSpell_Preview::Update(_float fTimeDelta) m_fAlpha = 0.f; } } + m_fTime += fTimeDelta * m_fTimeMult; - if (m_bFadeOut == false) + if (m_iSpellType != -1 && m_iPerSpellIndex != m_iSpellType) { - if (m_iSpellType != -1) - { - m_pSpell_Info = m_pInfoInstance->Get_Spell_Info(m_iSpellType).pSpellInfo; - m_fPreviewOffSet = m_pInfoInstance->Get_Spell_Info(m_iSpellType).fPreview; - SizeUpY(m_fOriginPerviewSize + m_fPreviewOffSet); - m_iPerSpellIndex = m_iSpellType; - } + m_pSpell_Info = m_pInfoInstance->Get_Spell_Info(m_iSpellType).pSpellInfo; + m_fPreviewOffSet = m_pInfoInstance->Get_Spell_Info(m_iSpellType).fPreview; + SizeUpY(m_fOriginPerviewSize + m_fPreviewOffSet); + m_iPerSpellIndex = m_iSpellType; } - m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } @@ -146,9 +142,7 @@ HRESULT CSpell_Preview::Render() return E_FAIL; } - - m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, (m_fFontY + m_fY) - m_fPreviewOffSet * 0.5f), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); - + m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, (m_fFontY - m_fY) - m_fPreviewOffSet * 0.5f), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); return S_OK; } @@ -163,17 +157,14 @@ void CSpell_Preview::SizeUpX(_float fSizeX) m_fSizeX = fSizeX; m_fX += fX; m_fLerpX += fX; - } void CSpell_Preview::SizeUpY(_float fSizeY) { _float prevY = m_fY; m_fSizeY = fSizeY; - m_fY = m_fTopY + fSizeY * 0.5f; - + m_fY = m_fTopY - fSizeY * 0.5f; _float deltaY = m_fY - prevY; - } HRESULT CSpell_Preview::Bind_ShaderResources() @@ -309,6 +300,7 @@ void CSpell_Preview::Free() SAFE_RELEASE(m_pVIBufferCom); } + #ifdef _DEBUG void CSpell_Preview::Describe_Entity() { diff --git a/Jusin154_Team3D/Client/Private/Spell_UI.cpp b/Jusin154_Team3D/Client/Private/Spell_UI.cpp index fecb52a8c..b2f7b927a 100644 --- a/Jusin154_Team3D/Client/Private/Spell_UI.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_UI.cpp @@ -22,7 +22,7 @@ HRESULT CSpell_UI::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 650.f; - Desc.fY = -60.f; + Desc.fY = 60.f; Desc.fSizeX = 180.f; Desc.fSizeY = 50.f; diff --git a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp index 2aa6094a2..fd15278fb 100644 --- a/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp +++ b/Jusin154_Team3D/Client/Private/Spell_Vidio_Border.cpp @@ -24,7 +24,7 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 590.f; - Desc.fY = -100.f; + Desc.fY = 100.f; Desc.fSizeX = 520.f; Desc.fSizeY = 275.f; @@ -98,7 +98,7 @@ void CSpell_Vidio_Border::Update(_float fTimeDelta) { if (m_iSpellType != -1) { - m_fY = m_fOrigin_Position.y + m_pInfoInstance->Get_Spell_Info(m_iSpellType).fVidio; + m_fY = m_fOrigin_Position.y - m_pInfoInstance->Get_Spell_Info(m_iSpellType).fVidio; } } diff --git a/Jusin154_Team3D/Client/Public/Client_Enum.h b/Jusin154_Team3D/Client/Public/Client_Enum.h index bf72d947e..94955a638 100644 --- a/Jusin154_Team3D/Client/Public/Client_Enum.h +++ b/Jusin154_Team3D/Client/Public/Client_Enum.h @@ -18,8 +18,8 @@ namespace Client ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, 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, - ENEMY_DETECTION, END}; + ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK, + ENEMY_DETECTION, 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, END }; enum class SHADER_PASS_NPC_PBR_ANIM { diff --git a/Jusin154_Team3D/Client/Public/Client_Struct.h b/Jusin154_Team3D/Client/Public/Client_Struct.h index 41143c307..5bb4a18b5 100644 --- a/Jusin154_Team3D/Client/Public/Client_Struct.h +++ b/Jusin154_Team3D/Client/Public/Client_Struct.h @@ -66,6 +66,29 @@ namespace Client DAMAGE_TYPE eType = DAMAGE_TYPE::NOMAL; }DAMAGE_INFO; + typedef struct tagObjectiveInfo + { + _int iObjectType{}; + _int iTargetID{}; + _int iRequiredCount{}; + _int iCurrentCount{}; + }OBJECTIVEINFO; + + typedef struct tagRewardsInfo + { + _int iRewardType{}; + _int iRewardID{}; + }REWARDSINFO; + + typedef struct tagQuestInfo + { + _int iQuestID{}; + _int iType{}; + _wstring pQuestName; + _wstring pQuestInfo; + vector ObjectiveInfo; + vector RewardsInfo; + }QUESTINFO; typedef struct tagEffectInfo { diff --git a/Jusin154_Team3D/Client/Public/Completed_Panel.h b/Jusin154_Team3D/Client/Public/Completed_Panel.h new file mode 100644 index 000000000..707251e79 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Completed_Panel.h @@ -0,0 +1,49 @@ +#pragma once + +#include "Client_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CCompleted_Panel final : public CPanelObject +{ +private: + CCompleted_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CCompleted_Panel(const CCompleted_Panel& rhs); + virtual ~CCompleted_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 }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CCompleted_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/InProgress_Panel.h b/Jusin154_Team3D/Client/Public/InProgress_Panel.h new file mode 100644 index 000000000..38f3b5168 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/InProgress_Panel.h @@ -0,0 +1,49 @@ +#pragma once + +#include "Client_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CInProgress_Panel final : public CPanelObject +{ +private: + CInProgress_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CInProgress_Panel(const CInProgress_Panel& rhs); + virtual ~CInProgress_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 }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CInProgress_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/InfoInstance.h b/Jusin154_Team3D/Client/Public/InfoInstance.h index 80542594f..128013fa3 100644 --- a/Jusin154_Team3D/Client/Public/InfoInstance.h +++ b/Jusin154_Team3D/Client/Public/InfoInstance.h @@ -66,6 +66,9 @@ DECLARE_SINGLETON(CInfoInstance) void Add_Event(_wstring EventName, function Event); void Event_CallBack(_wstring EventName, void* pArg = nullptr); #pragma endregion +#pragma region Spell_INFO +#pragma endregion + QUESTINFO Get_Quest_Info(_int QuestID); #pragma region Interactive_INFO HRESULT Regist_ActiveInteractive(class CMapElement_Interactable* pInteractive); HRESULT Deregist_ActiveInteractive(class CMapElement_Interactable* pInteractive); @@ -79,6 +82,7 @@ DECLARE_SINGLETON(CInfoInstance) class CMonsterInfo* m_pMonsterInfo = { nullptr }; class CMapInfo* m_pMapInfo = { nullptr }; class CSkill_Data* m_pSkillInfo = { nullptr }; + class CQuest_Data* m_pQuestInfo= { nullptr }; class CInteractiveInfo* m_pInteractiveInfo = { nullptr }; class CDamage_Font* m_pDamage_Font = { nullptr }; _uint m_eInput = ENUM_CLASS(KEYINPUT::END); diff --git a/Jusin154_Team3D/Client/Public/Quest_Canvas.h b/Jusin154_Team3D/Client/Public/Quest_Canvas.h index 27219b629..83004c68d 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Canvas.h +++ b/Jusin154_Team3D/Client/Public/Quest_Canvas.h @@ -34,10 +34,20 @@ class CQuest_Canvas final : public CCanvasObject public: void Clear_Penel(); + void Update_Panel(_int Index); private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CGameObject* m_pQuest_Panel = { nullptr }; + CGameObject* m_pInProgress_Panel = { nullptr }; + CGameObject* m_pCompleted_Panel = { nullptr }; + CGameObject* m_pQuest_Status_Panel = { nullptr }; + + _bool m_bClick[3] = { false }; + _int m_iIndex{}; public: static CQuest_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/Quest_Data.h b/Jusin154_Team3D/Client/Public/Quest_Data.h new file mode 100644 index 000000000..a4bc2cb7c --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Quest_Data.h @@ -0,0 +1,49 @@ +#pragma once + +#include "Client_Define.h" +#include "Base.h" + +NS_BEGIN(Engine) +class CGameInstance; +class CUIObject; +NS_END + +NS_BEGIN(Client) + +class CQuest_Data final : public CBase +{ +private: + CQuest_Data(); + ~CQuest_Data() = default; + +public: + virtual void Update(_float fTimeDelta); + +public: + HRESULT Load_QuestInfo(const _char* pFilePath); + QUESTINFO Get_Quest(_int QuestID); + _int Get_Count(); + //const SPELLINFO& Get_Info(_uint SpellID) const; + +private: + CInfoInstance* m_pInfoInstance = { nullptr }; + + QUESTINFO QuestInfo = {}; + OBJECTIVEINFO ObjectiveInfo = {}; + REWARDSINFO RewardsInfo = {}; + + vector QuestInfos; + + _int m_iQuest_Count{}; + + _bool m_bClear[1] = { false }; + +private: + HRESULT Initialize(ID3D11Device* pDevice, ID3D11DeviceContext* pContex); + +public: + static CQuest_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual void Free() override; +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h b/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h index 5d0c69f98..fd9143ab1 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h +++ b/Jusin154_Team3D/Client/Public/Quest_Entry_Line.h @@ -31,12 +31,16 @@ class CQuest_Entry_Line final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + void Set_Hover(_int Index); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; _int m_iColor = { false }; + _int m_iQuest_Index{}; public: static CQuest_Entry_Line* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/Quest_Info.h b/Jusin154_Team3D/Client/Public/Quest_Info.h index 8005488a3..33f64e160 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Info.h +++ b/Jusin154_Team3D/Client/Public/Quest_Info.h @@ -31,8 +31,8 @@ class CQuest_Info final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; -private: - void Hover(); +public: + void Set_Hover(_int Index); private: CTexture* m_pDiffuse_TextureCom = { nullptr }; @@ -45,6 +45,7 @@ class CQuest_Info final : public CElementObject _float m_fOriginPerviewSize{}; _float m_fPreviewOffSet{}; _float4 m_vHeaderBack{}; + _int m_iQuest_Index{}; _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 f771a3365..924b7f72b 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Info_Header.h +++ b/Jusin154_Team3D/Client/Public/Quest_Info_Header.h @@ -31,12 +31,16 @@ class CQuest_Info_Header final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + void Set_Hover(_int Index); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; _int m_iColor = true; + _int m_iQuest_Index{}; public: static CQuest_Info_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Client/Public/Quest_Info_Line.h b/Jusin154_Team3D/Client/Public/Quest_Info_Line.h index 890450f7f..a08b0d8db 100644 --- a/Jusin154_Team3D/Client/Public/Quest_Info_Line.h +++ b/Jusin154_Team3D/Client/Public/Quest_Info_Line.h @@ -31,12 +31,17 @@ class CQuest_Info_Line final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + void Set_Hover(_int Index); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; _int m_iColor = { false }; + _int m_iQuest_Index{}; + 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_List.h b/Jusin154_Team3D/Client/Public/Quest_List.h index e94f41b64..a2c8264a0 100644 --- a/Jusin154_Team3D/Client/Public/Quest_List.h +++ b/Jusin154_Team3D/Client/Public/Quest_List.h @@ -31,12 +31,23 @@ class CQuest_List final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +private: + void Hover(); + +public: + void Set_Name(_wstring Name, _int ID); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CInfoInstance* m_pInfoInstance = { nullptr }; _int m_iColor = { false }; + _wstring m_pFontSize; + _wstring m_pQuest_Name; + _int m_pQuest_ID{}; + public: static CQuest_List* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Client/Public/Quest_Status.h b/Jusin154_Team3D/Client/Public/Quest_Status.h new file mode 100644 index 000000000..8b695e022 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Quest_Status.h @@ -0,0 +1,64 @@ +#pragma once + +#include "Client_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CQuest_Status final : public CElementObject +{ +private: + CQuest_Status(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CQuest_Status(const CQuest_Status& rhs); + virtual ~CQuest_Status() = 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 Compute_UI(_int Index); + void Set_Status(_int Index, _float m_PosY, _wstring Text); + + void Set_Click(_bool bClick); + +private: + void Hover(); + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _wstring m_pName; + _int m_iIndex{}; + _float4 m_vUV{}; + _float4 m_vImageposi{}; + _bool m_bClick = { false }; +public: + static CQuest_Status* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Quest_Status_Panel.h b/Jusin154_Team3D/Client/Public/Quest_Status_Panel.h new file mode 100644 index 000000000..aae0f7b37 --- /dev/null +++ b/Jusin154_Team3D/Client/Public/Quest_Status_Panel.h @@ -0,0 +1,57 @@ +#pragma once + +#include "Client_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CTexture; +class CShader; +class CVIBuffer_Rect; +NS_END + +NS_BEGIN(Client) + +class CQuest_Status_Panel final : public CPanelObject +{ +private: + CQuest_Status_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CQuest_Status_Panel(const CQuest_Status_Panel& rhs); + virtual ~CQuest_Status_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: + void Set_Status(); + void Slot_Hover(_int Index); + +private: + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CGameObject* m_pQuest_Status1 = { nullptr }; + CGameObject* m_pQuest_Status2 = { nullptr }; + CGameObject* m_pQuest_Status3 = { nullptr }; + + _bool m_bClick[3] = { false }; + +public: + static CQuest_Status_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; + virtual void Free() override; +#ifdef _DEBUG + void Describe_Entity() override; +#endif // _DEBUG +}; + +NS_END diff --git a/Jusin154_Team3D/Client/Public/Spell_Panel.h b/Jusin154_Team3D/Client/Public/Spell_Panel.h index f4769dd97..70cf2c0a6 100644 --- a/Jusin154_Team3D/Client/Public/Spell_Panel.h +++ b/Jusin154_Team3D/Client/Public/Spell_Panel.h @@ -60,7 +60,6 @@ class CSpell_Panel final : public CPanelObject CGameObject* m_pSpell_Preview = { nullptr }; CGameObject* m_pSpell_Vidio_Border = { nullptr }; CGameObject* m_pCurrent_Slot_Number = { nullptr }; - CGameObject* m_pSpell_Data= { nullptr }; CGameObject* m_pSpell_Header = { nullptr }; CGameObject* m_pSpell_Header_Line = { nullptr }; CGameObject* m_pSpell_Anim = { nullptr }; diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size22.spritefont b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size22.spritefont new file mode 100644 index 000000000..5e7e4d8c2 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size22.spritefont differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size23.spritefont b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size23.spritefont new file mode 100644 index 000000000..dbb89b584 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Fonts/Font_size23.spritefont differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl index d0309f2b0..53caeee60 100644 --- a/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl +++ b/Jusin154_Team3D/Editor/Bin/Resources/ShaderFiles/Shader_UIEditor.hlsl @@ -63,6 +63,7 @@ Texture2D g_DiffuseTexture; Texture2D g_MaskingTexture; int g_iHover; +int g_iClick; int g_iColor; int g_iStep1 = 0; @@ -1621,6 +1622,128 @@ PS_OUT PS_Quest_Info(PS_IN In) return Out; } +PS_OUT PS_Quest_Status(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); + + if (g_iClick == 0) + { + if (g_iHover == 0) + { + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + tex1.rgb *= float3(60.f, 80.f, 150.f) / 255.f; + Color = tex1; + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy); + float2 safeUV = saturate(atlasUV); + float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV); + Color = lerp(Color, tex2, tex2.a); + } + } + else + { + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + Color = tex1; + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy); + float2 safeUV = saturate(atlasUV); + float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV); + Color = lerp(Color, tex2, tex2.a); + } + } + } + else + { + float4 tex1 = g_Texture.Sample(DefaultSampler, In.vTexcoord); + Color = tex1; + float2 Imagetexpos1 = g_fImageSipos1.xy / g_fCurrent_Size; + float2 Imagetexsize1 = g_fImageSipos1.zw / g_fCurrent_Size; + float2 Imagelocal1 = (In.vTexcoord - Imagetexpos1) / Imagetexsize1; + bool inside1 = all(Imagelocal1 >= 0.0f && Imagelocal1 <= 1.0f); + if (inside1) + { + float2 atlasUV = g_fImageUV.xy + Imagelocal1 * (g_fImageUV.zw - g_fImageUV.xy); + float2 safeUV = saturate(atlasUV); + float4 tex2 = g_Texture1.Sample(DefaultSampler, safeUV); + Color = lerp(Color, tex2, tex2.a); + } + float mask = g_Texture2.Sample(DefaultSampler, In.vTexcoord).r; + float3 glowColor = float3(1.0f, 1.0f, 1.0f); + Color.rgb += glowColor * mask * 0.5f; + Color.rgb *= float3(140.f, 140.f, 20.f) / 255.f; + } + + + + Color.a *= Alpha; + Out.vColor = Color; + return Out; +} + +PS_OUT PS_Broomstick(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); + + float2 center = float2(0.5f, 0.5f); + float2 uv = In.vTexcoord - center; + uv *= sqrt(2.0f); + float2 Rotation = In.vTexcoord; + Rotation.x = uv.x * cos(g_fAngle) - uv.y * sin(g_fAngle); + Rotation.y = uv.x * sin(g_fAngle) + uv.y * cos(g_fAngle); + Rotation += center; + + float2 startUV = g_fImageUV.xy; + float2 endUV = g_fImageUV.zw; + + float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV); + + float4 tex1 = g_Texture.Sample(ClampSampler, Rotation); + float4 tex2 = g_Texture1.Sample(ClampSampler, atlasUV); + tex1.rgb *= 0.4f; + color = tex1; + tex2.rgb *= 0.3f; + + color = lerp(color, tex2, tex2.a); + + + float2 texpos1 = g_fItemPosition1 / g_fCurrent_Size; + float2 texsize1 = g_fItemImageSizes1 / g_fCurrent_Size; + float2 texlocal1 = (In.vTexcoord - texpos1) / texsize1; + bool inside = all(texlocal1 >= 0.0f && texlocal1 <= 1.0f); + if(inside) + { + float4 tex3 = g_Texture2.Sample(ClampSampler, texlocal1); + color = lerp(color, tex3, tex3.a); + + float CoolTime = 0.f + g_fDeltaV; + float CoolTime2 = 0.f + g_fDeltaV + 0.1f; + atlasUV = startUV + texlocal1 * (endUV - startUV); + + float4 tex4 = g_Texture3.Sample(DefaultSampler, atlasUV); + } + + color.a *= Alpha; + + Out.vColor = color; + return Out; +} + struct VS_IN3D { float3 vPosition : POSITION; @@ -2104,6 +2227,26 @@ technique11 PosTexTechnique11 PixelShader = compile ps_5_0 PS_Quest_Info(); } + pass Quest_Status + { + 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_Quest_Status(); + } + + pass Broomstick + { + 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_Broomstick(); + } + pass Enemy_Detection { SetRasterizerState(RS_Nocull); diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/GadgetWheel/UI_T_Broom9.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/GadgetWheel/UI_T_Broom9.png new file mode 100644 index 000000000..3176f5556 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/GadgetWheel/UI_T_Broom9.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Quest/Buttom_Slot.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Quest/Buttom_Slot.png new file mode 100644 index 000000000..ecdc98e6d Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Quest/Buttom_Slot.png differ diff --git a/Jusin154_Team3D/Editor/Bin/Resources/Textures/Quest/UI_T_SpellMiniGame_ButtonRing.png b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Quest/UI_T_SpellMiniGame_ButtonRing.png new file mode 100644 index 000000000..4009d6850 Binary files /dev/null and b/Jusin154_Team3D/Editor/Bin/Resources/Textures/Quest/UI_T_SpellMiniGame_ButtonRing.png differ diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj b/Jusin154_Team3D/Editor/Default/Editor.vcxproj index f326b81f9..84ab80e44 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj @@ -177,11 +177,13 @@ call Update_Shaders.bat + + @@ -196,6 +198,8 @@ call Update_Shaders.bat + + @@ -395,11 +399,13 @@ call Update_Shaders.bat + + @@ -414,6 +420,8 @@ call Update_Shaders.bat + + diff --git a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters index 601c61307..21f06e4fa 100644 --- a/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters +++ b/Jusin154_Team3D/Editor/Default/Editor.vcxproj.filters @@ -610,6 +610,18 @@ {2347d77a-ac72-4b3e-bf5f-434ca410e544} + + {a0cb1a30-7aab-4722-a0c3-fb75cc8986a7} + + + {c6fd65c0-d447-49b7-88f8-a7b12c21e6a2} + + + {300bca91-ce47-43bb-8848-c1632a714bf3} + + + {18181fd1-eb00-4d29-a2aa-071428fe4ba6} + @@ -1218,6 +1230,18 @@ 50.UI\Quest_Canvas\Quest_Panel\Quest_Entry_Line + + 50.UI\Quest_Canvas\Quest_Status_Panel + + + 50.UI\Quest_Canvas\Completed_Panel + + + 50.UI\Quest_Canvas\InProgress_Panel + + + 50.UI\Quest_Canvas\Quest_Status_Panel\Quest_Status + @@ -1828,6 +1852,18 @@ 50.UI\Quest_Canvas\Quest_Panel\Quest_Entry_Line + + 50.UI\Quest_Canvas\Quest_Status_Panel + + + 50.UI\Quest_Canvas\Completed_Panel + + + 50.UI\Quest_Canvas\InProgress_Panel + + + 50.UI\Quest_Canvas\Quest_Status_Panel\Quest_Status + diff --git a/Jusin154_Team3D/Editor/Private/Action_Panel.cpp b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp index fe7fb515e..851499d17 100644 --- a/Jusin154_Team3D/Editor/Private/Action_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Action_Panel.cpp @@ -31,7 +31,7 @@ HRESULT CAction_Panel::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 1150.f; - Desc.fY = 850.f; + Desc.fY = -850.f; Desc.fSizeX = 1650.f; Desc.fSizeY = 450.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) }; @@ -145,7 +145,7 @@ void CAction_Panel::Magic_Meter_UV() for (_uint i = 0; i < 5; ++i) { m_vMagic_MeterUV[i].x = 570.f - (55.f * i); - m_vMagic_MeterUV[i].y = 145.f; + m_vMagic_MeterUV[i].y = -145.f; } } diff --git a/Jusin154_Team3D/Editor/Private/Boss_HpBer.cpp b/Jusin154_Team3D/Editor/Private/Boss_HpBer.cpp index bb3bfa63e..ba04f546a 100644 --- a/Jusin154_Team3D/Editor/Private/Boss_HpBer.cpp +++ b/Jusin154_Team3D/Editor/Private/Boss_HpBer.cpp @@ -22,7 +22,7 @@ HRESULT CBoss_HpBar::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 0.f; - Desc.fY = 40.f; + Desc.fY = -40.f; Desc.fSizeX = 218.f; Desc.fSizeY = 82.f; diff --git a/Jusin154_Team3D/Editor/Private/Completed_Panel.cpp b/Jusin154_Team3D/Editor/Private/Completed_Panel.cpp new file mode 100644 index 000000000..415817f61 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Completed_Panel.cpp @@ -0,0 +1,200 @@ +#include "pch.h" +#include "Completed_Panel.h" +#include "GameInstance.h" + +CCompleted_Panel::CCompleted_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CCompleted_Panel::CCompleted_Panel(const CCompleted_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CCompleted_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CCompleted_Panel::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 1575.f; + 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.04f; + Visible(false); + ElementAllVisible(true); + return S_OK; +} + +void CCompleted_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CCompleted_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + __super::Update(fTimeDelta); +} + +void CCompleted_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 CCompleted_Panel::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CCompleted_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CCompleted_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_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 CCompleted_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_UI_T_ActionItemGoldleaf_4K"), 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; +} + +HRESULT CCompleted_Panel::Ready_Element(void* pArg) +{ + return S_OK; +} + +CCompleted_Panel* CCompleted_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CCompleted_Panel* pInstance = new CCompleted_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CCompleted_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CCompleted_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CCompleted_Panel* pInstance = new CCompleted_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CCompleted_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CCompleted_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CCompleted_Panel::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Enemy_Detection.cpp b/Jusin154_Team3D/Editor/Private/Enemy_Detection.cpp index 3d4cd7419..b1044f86c 100644 --- a/Jusin154_Team3D/Editor/Private/Enemy_Detection.cpp +++ b/Jusin154_Team3D/Editor/Private/Enemy_Detection.cpp @@ -22,7 +22,7 @@ HRESULT CEnemy_Detection::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 0.f; - Desc.fY = 500.f; + Desc.fY = -500.f; Desc.fSizeX = 150.f; Desc.fSizeY = 150.f; diff --git a/Jusin154_Team3D/Editor/Private/Enemy_HpBar.cpp b/Jusin154_Team3D/Editor/Private/Enemy_HpBar.cpp index 92c48c8aa..3ca5850ca 100644 --- a/Jusin154_Team3D/Editor/Private/Enemy_HpBar.cpp +++ b/Jusin154_Team3D/Editor/Private/Enemy_HpBar.cpp @@ -22,7 +22,7 @@ HRESULT CEnemy_HpBar::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 0.f; - Desc.fY = 40.f; + Desc.fY = -40.f; Desc.fSizeX = 128.f; Desc.fSizeY = 20.f; diff --git a/Jusin154_Team3D/Editor/Private/Enemy_Info.cpp b/Jusin154_Team3D/Editor/Private/Enemy_Info.cpp index e1401c843..56662ff0c 100644 --- a/Jusin154_Team3D/Editor/Private/Enemy_Info.cpp +++ b/Jusin154_Team3D/Editor/Private/Enemy_Info.cpp @@ -22,7 +22,7 @@ HRESULT CEnemy_Info::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = -180.f; - Desc.fY = 40.f; + Desc.fY = -40.f; Desc.fSizeX = 50.f; Desc.fSizeY = 50.f; diff --git a/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp b/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp index dbb499243..e7227ff38 100644 --- a/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Enemy_Panel.cpp @@ -26,7 +26,7 @@ HRESULT CEnemy_Panel::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 960.f; - Desc.fY = 50.f; + Desc.fY = -50.f; Desc.fSizeX = 960.f; Desc.fSizeY = 150.f; diff --git a/Jusin154_Team3D/Editor/Private/HpBarBG.cpp b/Jusin154_Team3D/Editor/Private/HpBarBG.cpp index 8af4488ab..edca13d57 100644 --- a/Jusin154_Team3D/Editor/Private/HpBarBG.cpp +++ b/Jusin154_Team3D/Editor/Private/HpBarBG.cpp @@ -22,7 +22,7 @@ HRESULT CHpBarBG::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 600.f; - Desc.fY = 180.f; + Desc.fY = -180.f; Desc.fSizeX = 144.f; Desc.fSizeY = 50.f; diff --git a/Jusin154_Team3D/Editor/Private/InProgress_Panel.cpp b/Jusin154_Team3D/Editor/Private/InProgress_Panel.cpp new file mode 100644 index 000000000..bdaf86615 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/InProgress_Panel.cpp @@ -0,0 +1,199 @@ +#include "pch.h" +#include "InProgress_Panel.h" +#include "GameInstance.h" + +CInProgress_Panel::CInProgress_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CInProgress_Panel::CInProgress_Panel(const CInProgress_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CInProgress_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CInProgress_Panel::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 1575.f; + 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.04f; + Visible(false); + ElementAllVisible(true); + return S_OK; +} + +void CInProgress_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CInProgress_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + + __super::Update(fTimeDelta); +} + +void CInProgress_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 CInProgress_Panel::Render() +{ + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + + return S_OK; +} + +_vector CInProgress_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CInProgress_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_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 CInProgress_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_UI_T_ActionItemGoldleaf_4K"), 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; +} + +HRESULT CInProgress_Panel::Ready_Element(void* pArg) +{ + return S_OK; +} + +CInProgress_Panel* CInProgress_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CInProgress_Panel* pInstance = new CInProgress_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CInProgress_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CInProgress_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CInProgress_Panel* pInstance = new CInProgress_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CInProgress_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CInProgress_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CInProgress_Panel::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Loader.cpp b/Jusin154_Team3D/Editor/Private/Loader.cpp index 8c11cb160..75e162fc2 100644 --- a/Jusin154_Team3D/Editor/Private/Loader.cpp +++ b/Jusin154_Team3D/Editor/Private/Loader.cpp @@ -111,6 +111,12 @@ #include "Quest_Info_Line.h" #include "Quest_Entry_Line.h" +#include "Quest_Status_Panel.h" +#include "Quest_Status.h" + +#include "Completed_Panel.h" +#include "InProgress_Panel.h" + #include "IMGUIUI.h" #pragma endregion @@ -627,208 +633,208 @@ HRESULT CLoader::Loading_For_UI() return E_FAIL; } - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Altering_Spell"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Altering_Spell"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Altering_Spell\\Altering_Spell%d.png"), 349)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Alohomora"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Alohomora"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Alohomora\\Alohomora%d.png"), 394)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Ancient_Magic"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Ancient_Magic"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic\\Ancient_Magic%d.png"), 152)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Ancient_Magic_Throw"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Ancient_Magic_Throw"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Ancient_Magic_Throw\\Ancient_Magic_Throw%d.png"), 89)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Arresto_Momentum"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Arresto_Momentum"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Arresto_Momentum\\Arresto_Momentum%d.png"), 120)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Avada_Kedavra"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Avada_Kedavra"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Avada_Kedavra\\Avada_Kedavra%d.png"), 208)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Basic_Cast"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Basic_Cast"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Basic_Cast\\Basic_Cast%d.png"), 308)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Beast_Feed"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Beast_Feed"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Feed\\Beast_Feed%d.png"), 378)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Beast_Petting_Brush"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Beast_Petting_Brush"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Beast_Petting_Brush\\Beast_Petting_Brush%d.png"), 327)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Bombarda"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Bombarda"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Bombarda\\Bombarda%d.png"), 262)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Confringo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Confringo"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Confringo\\Confringo%d.png"), 157)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Conjuring_Spell"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Conjuring_Spell"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Conjuring_Spell\\Conjuring_Spell%d.png"), 115)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Descendo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Descendo"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Descendo\\Descendo%d.png"), 155)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Depulso"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Depulso"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Depulso\\Depulso%d.png"), 152)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Diffindo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Diffindo"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Diffindo\\Diffindo%d.png"), 150)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Disillusionment"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Disillusionment"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Disillusionment\\Disillusionment%d.png"), 260)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Evanesco"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Evanesco"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Evanesco\\Evanesco%d.png"), 136)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Expelliarmus"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Expelliarmus"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Expelliarmus\\Expelliarmus%d.png"), 146)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Flipendo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Flipendo"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Flipendo\\Flipendo%d.png"), 188)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Glacius"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Glacius"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Glacius\\Glacius%d.png"), 156)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Imperio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Imperio"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Imperio\\Imperio%d.png"), 462)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Incendio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Incendio"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Incendio\\Incendio%d.png"), 213)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Levioso"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Levioso"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Levioso\\Levioso%d.png"), 180)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Lumos"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Lumos"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Lumos\\Lumos%d.png"), 365)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Nab_Sack"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Nab_Sack"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Nab_Sack\\Nab_Sack%d.png"), 235)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Petrificus_Totalus"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Petrificus_Totalus"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Petrificus_Totalus\\Petrificus_Totalus%d.png"), 275)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Protego"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Protego"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Protego\\Protego%d.png"), 285)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Reparo"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Reparo"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Reparo\\Reparo%d.png"), 385)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Revelio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Revelio"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Revelio\\Revelio%d.png"), 227)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Stupefy"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Stupefy"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Stupefy\\Stupefy%d.png"), 222)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Transformation"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Transformation"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Transformation\\Transformation%d.png"), 146)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Wingardium_Leviosa"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) - { - return E_FAIL; - } - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Wingardium_Leviosa"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Wingardium_Leviosa"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) + //{ + // return E_FAIL; + //} + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Wingardium_Leviosa"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Wingardium_Leviosa\\Wingardium_Leviosa%d.png"), 273)))) + //{ + // return E_FAIL; + //} - if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Crucio"), - CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) - { - return E_FAIL; - } + //if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), TEXT("Crucio"), + // CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("C:\\MeshTable\\SpellAnim\\Crucio\\Crucio%d.png"), 216)))) + //{ + // return E_FAIL; + //} m_strMessage = TEXT("Model Loading.."); @@ -1174,6 +1180,25 @@ HRESULT CLoader::Loading_For_UI() return E_FAIL; } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Status_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CQuest_Status::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CCompleted_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CInProgress_Panel::Create(m_pDevice, m_pContext)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_Prototype(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext)))) { return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/LoadingWidget_Flame.cpp b/Jusin154_Team3D/Editor/Private/LoadingWidget_Flame.cpp index 7ad4d88cd..9bf275f82 100644 --- a/Jusin154_Team3D/Editor/Private/LoadingWidget_Flame.cpp +++ b/Jusin154_Team3D/Editor/Private/LoadingWidget_Flame.cpp @@ -22,7 +22,7 @@ HRESULT CLoadingWidget_Flame::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = -237.f; - Desc.fY = 90.f; + Desc.fY = -90.f; Desc.fSizeX = 100.f; Desc.fSizeY = 100.f; diff --git a/Jusin154_Team3D/Editor/Private/Loading_Panel.cpp b/Jusin154_Team3D/Editor/Private/Loading_Panel.cpp index 6ef81645e..650497bd4 100644 --- a/Jusin154_Team3D/Editor/Private/Loading_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Loading_Panel.cpp @@ -24,7 +24,7 @@ HRESULT CLoading_Panel::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 1200.f; - Desc.fY = 900.f; + Desc.fY = -900.f; Desc.fSizeX = 1515.f; Desc.fSizeY = 300.f; diff --git a/Jusin154_Team3D/Editor/Private/Logo_Glow.cpp b/Jusin154_Team3D/Editor/Private/Logo_Glow.cpp index 7a4a748ea..6d159f3d0 100644 --- a/Jusin154_Team3D/Editor/Private/Logo_Glow.cpp +++ b/Jusin154_Team3D/Editor/Private/Logo_Glow.cpp @@ -22,7 +22,7 @@ HRESULT CLogo_Glow::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 470.f; - Desc.fY = 385.f; + Desc.fY = -385.f; Desc.fSizeX = 256.f; Desc.fSizeY = 128.f; diff --git a/Jusin154_Team3D/Editor/Private/Logo_Text.cpp b/Jusin154_Team3D/Editor/Private/Logo_Text.cpp index 55260087a..546d3d65c 100644 --- a/Jusin154_Team3D/Editor/Private/Logo_Text.cpp +++ b/Jusin154_Team3D/Editor/Private/Logo_Text.cpp @@ -22,7 +22,7 @@ HRESULT CLogo_Text::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 960.f; - Desc.fY = 480.f; + Desc.fY = -480.f; Desc.fSizeX = 1536.f; Desc.fSizeY = 768.f; diff --git a/Jusin154_Team3D/Editor/Private/Magic_Icon.cpp b/Jusin154_Team3D/Editor/Private/Magic_Icon.cpp index 379c8fe4f..04d5c91ec 100644 --- a/Jusin154_Team3D/Editor/Private/Magic_Icon.cpp +++ b/Jusin154_Team3D/Editor/Private/Magic_Icon.cpp @@ -22,7 +22,7 @@ HRESULT CMagic_Icon::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 630.f; - Desc.fY = 125.f; + Desc.fY = -125.f; Desc.fSizeX = 65.f; Desc.fSizeY = 65.f; diff --git a/Jusin154_Team3D/Editor/Private/Magic_Item.cpp b/Jusin154_Team3D/Editor/Private/Magic_Item.cpp index 56307c4b4..91c3b012a 100644 --- a/Jusin154_Team3D/Editor/Private/Magic_Item.cpp +++ b/Jusin154_Team3D/Editor/Private/Magic_Item.cpp @@ -22,7 +22,7 @@ HRESULT CMagic_Item::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = -800.f; - Desc.fY = 70.f; + Desc.fY = -70.f; Desc.fSizeX = 100.f; Desc.fSizeY = 100.f; @@ -42,27 +42,22 @@ HRESULT CMagic_Item::Initialize(void* pArg) m_fAngle = XMConvertToRadians(-135.f); m_fAlphaTime = 1.f; m_fSortZ = 0.2f; - m_fCoolTime = 5.f; - m_vUVScale.y = 1.f; - m_iArratCount = 2; - Compute_UV(0); + Compute_UV(1); Compute_Image(); m_fFontX = 1171.f; m_fFontY = 870.f; - m_iPotionIndex = 0; - m_iPerPotionIndex = -1; return S_OK; } void CMagic_Item::Compute_UV(_uint iItemID) { - _float2 fImage_Size = { 1024.f, 512.f }; + _float2 fImage_Size = { 320.f, 384.f}; - _uint iCountX = 4; - _uint iCountY = 2; + _uint iCountX = 5; + _uint iCountY = 6; - _float iImageX = 256.f; - _float iImageY = 256.f; + _float iImageX = 64.f; + _float iImageY = 64.f; _uint iframeX = iItemID % iCountX; _uint iframeY = iItemID / iCountX; @@ -83,8 +78,6 @@ void CMagic_Item::Compute_Image() { m_vImagePos1 = _float2(72.f, 0.f); m_vImageSize1 = _float2(30.f, 30.f); - m_vImagePos2 = _float2(65.f, 65.f); - m_vImageSize2 = _float2(30.f, 30.f); } void CMagic_Item::Priority_Update(_float fTimeDelta) @@ -141,13 +134,6 @@ void CMagic_Item::Update(_float fTimeDelta) m_vUVScale.y += fTimeDelta * (1.f / m_fCoolTime); } - if (m_iPerPotionIndex != m_iPotionIndex) - { - m_strPotion = to_wstring(m_iPotionIndex); - m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("UI_size15"), m_strPotion.c_str()) - 13.f) * 0.5f; - m_iPerPotionIndex = m_iPotionIndex; - } - m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } @@ -171,7 +157,7 @@ HRESULT CMagic_Item::Render() { return E_FAIL; } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::MAGIC_ITEM)))) + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::BROOMSTICK)))) { return E_FAIL; } @@ -184,9 +170,6 @@ HRESULT CMagic_Item::Render() return E_FAIL; } - - m_pGameInstance->Render_Text(TEXT("UI_size15"), m_strPotion.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet((208.f / 255.f) * m_fAlpha, (177.f / 255.f) * m_fAlpha, (52.f / 255.f)* m_fAlpha, m_fAlpha)); - return S_OK; } @@ -225,18 +208,6 @@ HRESULT CMagic_Item::Bind_ShaderResources() { return E_FAIL; } - if (FAILED(m_pDiffuse_TextureCom4->Bind_ShaderResource(m_pShaderCom, "g_Texture4", 0))) - { - return E_FAIL; - } - if (FAILED(m_pDiffuse_TextureCom5->Bind_ShaderResource(m_pShaderCom, "g_Texture5", 0))) - { - return E_FAIL; - } - if (FAILED(m_pDiffuse_TextureCom6->Bind_ShaderResource(m_pShaderCom, "g_MaskingTexture", 0))) - { - return E_FAIL; - } if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float)))) { return E_FAIL; @@ -265,22 +236,6 @@ HRESULT CMagic_Item::Bind_ShaderResources() { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fCoolTime", &m_fCoolTime, sizeof(_float)))) - { - return E_FAIL; - } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fDeltaV", &m_vUVScale.y, sizeof(_float)))) - { - return E_FAIL; - } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4)))) - { - return E_FAIL; - } - if (FAILED(m_pShaderCom->Bind_RawValue("g_iArrayCount", &m_iArratCount, sizeof(_uint)))) - { - return E_FAIL; - } if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemPosition1", &m_vImagePos1, sizeof(_float2)))) { return E_FAIL; @@ -289,14 +244,6 @@ HRESULT CMagic_Item::Bind_ShaderResources() { return E_FAIL; } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemPosition2", &m_vImagePos2, sizeof(_float2)))) - { - return E_FAIL; - } - if (FAILED(m_pShaderCom->Bind_RawValue("g_fItemImageSizes2", &m_vImageSize2, sizeof(_float2)))) - { - return E_FAIL; - } if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) { return E_FAIL; @@ -314,27 +261,15 @@ HRESULT CMagic_Item::Ready_Components(void* pArg) { return E_FAIL; } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_spellmeter_Generic"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) { return E_FAIL; } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_ActionItemGoldleaf_4K"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_Broom9"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) { return E_FAIL; } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Item"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr))) - { - return E_FAIL; - } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Keyboard_Tab"), reinterpret_cast(&m_pDiffuse_TextureCom4), nullptr))) - { - return E_FAIL; - } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_AmountFrame"), reinterpret_cast(&m_pDiffuse_TextureCom5), nullptr))) - { - return E_FAIL; - } - if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_tillingSmokes"), reinterpret_cast(&m_pDiffuse_TextureCom6), nullptr))) + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Keyboard"), reinterpret_cast(&m_pDiffuse_TextureCom3), nullptr))) { return E_FAIL; } @@ -380,9 +315,6 @@ void CMagic_Item::Free() SAFE_RELEASE(m_pDiffuse_TextureCom1); SAFE_RELEASE(m_pDiffuse_TextureCom2); SAFE_RELEASE(m_pDiffuse_TextureCom3); - SAFE_RELEASE(m_pDiffuse_TextureCom4); - SAFE_RELEASE(m_pDiffuse_TextureCom5); - SAFE_RELEASE(m_pDiffuse_TextureCom6); SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } diff --git a/Jusin154_Team3D/Editor/Private/Magic_Meter.cpp b/Jusin154_Team3D/Editor/Private/Magic_Meter.cpp index e3d6a650d..1cf27ad2c 100644 --- a/Jusin154_Team3D/Editor/Private/Magic_Meter.cpp +++ b/Jusin154_Team3D/Editor/Private/Magic_Meter.cpp @@ -23,7 +23,7 @@ HRESULT CMagic_Meter::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 190.f; - Desc.fY = 145.f; + Desc.fY = -145.f; Desc.fSizeX = 70.f; Desc.fSizeY = 20.f; diff --git a/Jusin154_Team3D/Editor/Private/MainApp.cpp b/Jusin154_Team3D/Editor/Private/MainApp.cpp index 89d201689..081ce28c2 100644 --- a/Jusin154_Team3D/Editor/Private/MainApp.cpp +++ b/Jusin154_Team3D/Editor/Private/MainApp.cpp @@ -98,6 +98,12 @@ HRESULT CMainApp::Ready_Default_Setting() if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size21"), TEXT("../Bin/Resources/Fonts/Font_size21.spritefont")))) return E_FAIL; + if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size22"), TEXT("../Bin/Resources/Fonts/Font_size22.spritefont")))) + return E_FAIL; + + if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size23"), TEXT("../Bin/Resources/Fonts/Font_size23.spritefont")))) + return E_FAIL; + if (FAILED(m_pGameInstance->Add_Font(TEXT("Font_size30"), TEXT("../Bin/Resources/Fonts/Font_size30.spritefont")))) return E_FAIL; diff --git a/Jusin154_Team3D/Editor/Private/MiniMap_Panel.cpp b/Jusin154_Team3D/Editor/Private/MiniMap_Panel.cpp index ccde5e3ca..b19c232eb 100644 --- a/Jusin154_Team3D/Editor/Private/MiniMap_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/MiniMap_Panel.cpp @@ -24,7 +24,7 @@ HRESULT CMiniMap_Panel::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 170.f; - Desc.fY = 920.f; + Desc.fY = -920.f; Desc.fSizeX = 280.f; Desc.fSizeY = 280.f; diff --git a/Jusin154_Team3D/Editor/Private/MissionBanner_Border.cpp b/Jusin154_Team3D/Editor/Private/MissionBanner_Border.cpp index 1d67b69e9..25d5eca44 100644 --- a/Jusin154_Team3D/Editor/Private/MissionBanner_Border.cpp +++ b/Jusin154_Team3D/Editor/Private/MissionBanner_Border.cpp @@ -24,7 +24,7 @@ HRESULT CMissionBanner_Border::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = -207.f; - Desc.fY = 115.f; + Desc.fY = -115.f; Desc.fSizeX = 256.f; Desc.fSizeY = 128.f; diff --git a/Jusin154_Team3D/Editor/Private/MissionBanner_Key.cpp b/Jusin154_Team3D/Editor/Private/MissionBanner_Key.cpp index ee826e330..d8a239f68 100644 --- a/Jusin154_Team3D/Editor/Private/MissionBanner_Key.cpp +++ b/Jusin154_Team3D/Editor/Private/MissionBanner_Key.cpp @@ -22,7 +22,7 @@ HRESULT CMissionBanner_Key::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = -255.f; - Desc.fY = 160.f; + Desc.fY = -160.f; Desc.fSizeX = 160.f; Desc.fSizeY = 80.f; diff --git a/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp b/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp index 485107494..4c8f7af6e 100644 --- a/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp +++ b/Jusin154_Team3D/Editor/Private/Mission_Icon.cpp @@ -22,7 +22,7 @@ HRESULT CMission_Icon::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = -70.f; - Desc.fY = -20.f; + Desc.fY = 20.f; Desc.fSizeX = 60.f; Desc.fSizeY = 60.f; diff --git a/Jusin154_Team3D/Editor/Private/Mission_Panel.cpp b/Jusin154_Team3D/Editor/Private/Mission_Panel.cpp index ec6e7a058..39ef94065 100644 --- a/Jusin154_Team3D/Editor/Private/Mission_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Mission_Panel.cpp @@ -24,7 +24,7 @@ HRESULT CMission_Panel::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 380.f; - Desc.fY = 580.f; + Desc.fY = -580.f; Desc.fSizeX = 750.f; Desc.fSizeY = 410.f; diff --git a/Jusin154_Team3D/Editor/Private/NoMountIcon.cpp b/Jusin154_Team3D/Editor/Private/NoMountIcon.cpp index 82d7eab8a..da2b72ea8 100644 --- a/Jusin154_Team3D/Editor/Private/NoMountIcon.cpp +++ b/Jusin154_Team3D/Editor/Private/NoMountIcon.cpp @@ -22,7 +22,7 @@ HRESULT CNoMountIcon::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 120.f; - Desc.fY = -90; + Desc.fY = 90; Desc.fSizeX = 65.f; Desc.fSizeY = 65.f; diff --git a/Jusin154_Team3D/Editor/Private/Potion.cpp b/Jusin154_Team3D/Editor/Private/Potion.cpp index dc8502e44..b573fd073 100644 --- a/Jusin154_Team3D/Editor/Private/Potion.cpp +++ b/Jusin154_Team3D/Editor/Private/Potion.cpp @@ -22,7 +22,7 @@ HRESULT CPotion::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 700.f; - Desc.fY = 150.f; + Desc.fY = -150.f; Desc.fSizeX = 80.f; Desc.fSizeY = 80.f; diff --git a/Jusin154_Team3D/Editor/Private/Quest_Border.cpp b/Jusin154_Team3D/Editor/Private/Quest_Border.cpp index 2e803da8f..c2c2cfd8b 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_Border.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_Border.cpp @@ -1,6 +1,7 @@ #include "pch.h" #include "Quest_Border.h" #include "GameInstance.h" +#include "Quest_Data.h" CQuest_Border::CQuest_Border(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CElementObject(pDevice, pContext) @@ -21,8 +22,8 @@ HRESULT CQuest_Border::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = -485.f; - Desc.fY = -150.f; + Desc.fX = -475.f; + Desc.fY = 150.f; Desc.fSizeX = 192.f; Desc.fSizeY = 192.f; @@ -41,14 +42,22 @@ HRESULT CQuest_Border::Initialize(void* pArg) m_fAlphaTime = 5.f; m_vNine_Slice = _float4(48.f, 148.f, 48.f, 148.f); m_fSortZ = 0.02f; - m_fFontX = 740.f; - m_fFontY = 500.f; + m_fFontX = -31.5f; + m_fFontY = -50.f; SizeUpX(500.f); SizeUpY(500.f); Visible(true); + static_cast(m_pOwner)->Add_Function(TEXT("QUEST_DATA"), [this](void* p) {this->Set_Quest_Data(reinterpret_cast(p)); }); return S_OK; } +void CQuest_Border::Set_Quest_Data(CQuest_Data* Data) +{ + m_pQuest_Data = Data; + + m_iCount = m_pQuest_Data->Get_Count(); +} + void CQuest_Border::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) @@ -124,7 +133,14 @@ HRESULT CQuest_Border::Render() return E_FAIL; } - //m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, (m_fFontY + m_fY) - m_fPreviewOffSet * 0.5f), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + _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)); + + for (_int i = 0; i < m_iCount; ++i) + { + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pQuest_Data->Get_Quest(i).pQuestName.c_str(), _float2((-210 - m_fX), 100 + m_fY)); + + } return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Quest_Canvas.cpp b/Jusin154_Team3D/Editor/Private/Quest_Canvas.cpp index 2275e8a47..f9345a65d 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_Canvas.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_Canvas.cpp @@ -3,6 +3,10 @@ #include "Quest_Canvas.h" #include "GameInstance.h" #include "Quest_Panel.h" +#include "Quest_Status_Panel.h" +#include "Completed_Panel.h" +#include "InProgress_Panel.h" +#include "Quest_Data.h" CQuest_Canvas::CQuest_Canvas(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CCanvasObject(pDevice, pContext) @@ -23,10 +27,10 @@ HRESULT CQuest_Canvas::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = 0.f; - Desc.fY = 0.f; - Desc.fSizeX = 1920.f; - Desc.fSizeY = 1080.f; + Desc.fX = 960.f; + Desc.fY = 540.f; + Desc.fSizeX = g_iWinSizeX; + Desc.fSizeY = g_iWinSizeY; if (FAILED(__super::Initialize(&Desc))) { @@ -40,7 +44,14 @@ HRESULT CQuest_Canvas::Initialize(void* pArg) { return E_FAIL; } + m_fAlpha = 1.f; + m_fOwnerAlpha = 1.f; + m_fCanvasAlpha = 1.f; + m_fSortZ = 0.05f; Visible(false); + m_iIndex = -1; + Add_Function(TEXT("QuestPanelUpdate"), [this](void* p) {this->Update_Panel(*reinterpret_cast<_int*>(p)); }); + Function_Callback(TEXT("QUESTPANELDATA"), m_pQuest_Data); return S_OK; } @@ -57,12 +68,27 @@ void CQuest_Canvas::Update(_float fTimeDelta) void CQuest_Canvas::Late_Update(_float fTimeDelta) { if (m_bVisible) { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); } + __super::Late_Update(fTimeDelta); } HRESULT CQuest_Canvas::Render() { + if (FAILED(Bind_ShaderResources())) { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Bind_Resources())) { + return E_FAIL; + } + if (FAILED(m_pVIBufferCom->Render())) { + return E_FAIL; + } + return S_OK; } @@ -73,12 +99,54 @@ _vector CQuest_Canvas::Get_WorldPostion() HRESULT CQuest_Canvas::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_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 CQuest_Canvas::Ready_Components(void* pArg) { - if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) { + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Quest_Widget"), 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; } @@ -87,11 +155,35 @@ HRESULT CQuest_Canvas::Ready_Components(void* pArg) HRESULT CQuest_Canvas::Ready_Panel(void* pArg) { + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Data)))) + { + return E_FAIL; + } + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pQuest_Panel)))) { return E_FAIL; } Add_Panel(TEXT("Quest_Panel"), m_pQuest_Panel); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pCompleted_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("Completed_Panel"), m_pCompleted_Panel); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pInProgress_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("InProgress_Panel"), m_pInProgress_Panel); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast (&m_pQuest_Status_Panel)))) + { + return E_FAIL; + } + Add_Panel(TEXT("Quest_Status_Panel"), m_pQuest_Status_Panel); + return S_OK; } @@ -99,6 +191,33 @@ void CQuest_Canvas::Clear_Penel() { } +void CQuest_Canvas::Update_Panel(_int Index) +{ + if (m_iIndex == Index) + return; + + m_iIndex = Index; + for (_int i = 0; i < 3; ++i) + { + if (i == Index) + { + m_bClick[i] = true; + } + else + { + m_bClick[i] = false; + } + } + static_cast(m_pQuest_Panel)->Visible(m_bClick[0]); + static_cast(m_pCompleted_Panel)->Visible(m_bClick[1]); + static_cast(m_pInProgress_Panel)->Visible(m_bClick[2]); +} + +CQuest_Data* CQuest_Canvas::Get_Data() +{ + return static_cast(m_pQuest_Data); +} + CQuest_Canvas* CQuest_Canvas::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CQuest_Canvas* pInstance = new CQuest_Canvas(pDevice, pContext); @@ -129,6 +248,8 @@ void CQuest_Canvas::Free() { __super::Free(); + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } diff --git a/Jusin154_Team3D/Editor/Private/Quest_Data.cpp b/Jusin154_Team3D/Editor/Private/Quest_Data.cpp index ff7fc53e4..fb98fa97b 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_Data.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_Data.cpp @@ -43,8 +43,8 @@ HRESULT CQuest_Data::Initialize(void* pArg) pQuest->QueryIntAttribute("QuestID", &quest.iQuestID); pQuest->QueryIntAttribute("QuestType", &quest.iType); - quest.pQuestName = pQuest->Attribute("QuestName"); - quest.pQuestInfo = pQuest->Attribute("QuestInfo"); + quest.pQuestName = CMyTools::ToWstring(pQuest->Attribute("QuestName")); + quest.pQuestInfo = CMyTools::ToWstring(pQuest->Attribute("QuestInfo")); tinyxml2::XMLElement* pObjectives = pQuest->FirstChildElement("Objectives"); if (pObjectives) @@ -81,7 +81,7 @@ HRESULT CQuest_Data::Initialize(void* pArg) pReward = pReward->NextSiblingElement("Reward"); } } - + m_iQuest_Count++; QuestInfos.push_back(quest); pQuest = pQuest->NextSiblingElement("Quest"); @@ -112,6 +112,16 @@ _vector CQuest_Data::Get_WorldPostion() return _vector(); } +CQuest_Data::QUESTINFO CQuest_Data::Get_Quest(_int QuestID) +{ + return QuestInfos[QuestID]; +} + +_int CQuest_Data::Get_Count() +{ + return m_iQuest_Count; +} + HRESULT CQuest_Data::Bind_ShaderResources() { return S_OK; diff --git a/Jusin154_Team3D/Editor/Private/Quest_Entry_Line.cpp b/Jusin154_Team3D/Editor/Private/Quest_Entry_Line.cpp index 2122bd4a8..cbe5d0cd6 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_Entry_Line.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_Entry_Line.cpp @@ -22,7 +22,7 @@ HRESULT CQuest_Entry_Line::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 330.f; - Desc.fY = -230.f; + Desc.fY = 230.f; Desc.fSizeX = 256.f; Desc.fSizeY = 64.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) }; @@ -44,7 +44,8 @@ HRESULT CQuest_Entry_Line::Initialize(void* pArg) m_fFontY = 520.f; SizeUpX(800.f); SizeUpY(15.f); - Visible(true); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); + Visible(false); return S_OK; } @@ -121,7 +122,7 @@ HRESULT CQuest_Entry_Line::Render() } _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)); + 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; } @@ -207,6 +208,19 @@ HRESULT CQuest_Entry_Line::Ready_Components(void* pArg) return S_OK; } +void CQuest_Entry_Line::Set_Hover(_int Index) +{ + m_iQuest_Index = Index; + if (m_iQuest_Index == -1) + { + Visible(false); + } + else + { + Visible(true); + } +} + CQuest_Entry_Line* CQuest_Entry_Line::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CQuest_Entry_Line* pInstance = new CQuest_Entry_Line(pDevice, pContext); diff --git a/Jusin154_Team3D/Editor/Private/Quest_Header.cpp b/Jusin154_Team3D/Editor/Private/Quest_Header.cpp index 819ea129f..088a148d3 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_Header.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_Header.cpp @@ -21,8 +21,8 @@ HRESULT CQuest_Header::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = -485.f; - Desc.fY = -352.f; + Desc.fX = -475.f; + Desc.fY = 352.f; Desc.fSizeX = 128.f; Desc.fSizeY = 32.f; @@ -125,7 +125,7 @@ HRESULT CQuest_Header::Render() } _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)); + 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; } diff --git a/Jusin154_Team3D/Editor/Private/Quest_HeaderLine.cpp b/Jusin154_Team3D/Editor/Private/Quest_HeaderLine.cpp index a3abf2465..85dc3be3a 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_HeaderLine.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_HeaderLine.cpp @@ -21,8 +21,8 @@ HRESULT CQuest_HeaderLine::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = -485.f; - Desc.fY = -310.f; + Desc.fX = -475.f; + Desc.fY = 310.f; Desc.fSizeX = 480.f; Desc.fSizeY = 10.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) }; @@ -39,7 +39,7 @@ HRESULT CQuest_HeaderLine::Initialize(void* pArg) m_fTimeMult = 3.f; m_fAlpha = 1.f; m_fAlphaTime = 5.f; - Visible(true); + Visible(false); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Quest_Info.cpp b/Jusin154_Team3D/Editor/Private/Quest_Info.cpp index e3ca732f3..5bbe2a894 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_Info.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_Info.cpp @@ -22,7 +22,7 @@ HRESULT CQuest_Info::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 325.f; - Desc.fY = -250.f; + Desc.fY = 250.f; Desc.fSizeX = 128.f; Desc.fSizeY = 128.f; @@ -48,7 +48,8 @@ HRESULT CQuest_Info::Initialize(void* pArg) m_fFontX = 740.f; m_fFontY = 500.f; m_iPerQuestIndex = -1; - Visible(true); + Visible(false); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); return S_OK; } @@ -96,11 +97,6 @@ void CQuest_Info::Update(_float fTimeDelta) } } m_fTime += fTimeDelta * m_fTimeMult; - Hover(); - m_pRect.left = long(m_fX - m_vScale.x * 0.5f); - m_pRect.top = long(m_fY - m_vScale.y * 0.5f); - m_pRect.right = long(m_fX + m_vScale.x * 0.5f); - m_pRect.bottom = long(m_fY + m_vScale.y * 0.5f); __super::Update(fTimeDelta); } @@ -111,7 +107,7 @@ void CQuest_Info::Late_Update(_float fTimeDelta) return; } if (m_bVisible) { - m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); __super::Late_Update(fTimeDelta); } } @@ -217,22 +213,18 @@ HRESULT CQuest_Info::Ready_Components(void* pArg) return S_OK; } - -void CQuest_Info::Hover() + +void CQuest_Info::Set_Hover(_int Index) { - POINT ptMouse{}; - GetCursorPos(&ptMouse); - ScreenToClient(g_hWnd, &ptMouse); - _float2 fMouse; - fMouse.x = ptMouse.x - g_iWinSizeX * 0.5f; - fMouse.y = -(ptMouse.y - g_iWinSizeY * 0.5f); - - if (fMouse.x >= m_pRect.left && fMouse.x <= m_pRect.right && - fMouse.y >= m_pRect.top && fMouse.y <= m_pRect.bottom) + m_iQuest_Index = Index; + if (m_iQuest_Index == -1) { - _int a = 0; + Visible(false); + } + else + { + Visible(true); } - } CQuest_Info* CQuest_Info::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) diff --git a/Jusin154_Team3D/Editor/Private/Quest_Info_Header.cpp b/Jusin154_Team3D/Editor/Private/Quest_Info_Header.cpp index e50ed8802..f32ff64a3 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_Info_Header.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_Info_Header.cpp @@ -22,7 +22,7 @@ HRESULT CQuest_Info_Header::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 345.f; - Desc.fY = -350.f; + Desc.fY = 350.f; Desc.fSizeX = 128.f; Desc.fSizeY = 32.f; @@ -46,10 +46,24 @@ HRESULT CQuest_Info_Header::Initialize(void* pArg) m_iColor = 2; SizeUpX(1105.f); SizeUpY(60.f); - Visible(true); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); + Visible(false); return S_OK; } +void CQuest_Info_Header::Set_Hover(_int Index) +{ + m_iQuest_Index = Index; + if (m_iQuest_Index == -1) + { + Visible(false); + } + else + { + Visible(true); + } +} + void CQuest_Info_Header::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) @@ -106,7 +120,7 @@ void CQuest_Info_Header::Late_Update(_float fTimeDelta) return; } if (m_bVisible) { - m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); __super::Late_Update(fTimeDelta); } } @@ -127,7 +141,7 @@ HRESULT CQuest_Info_Header::Render() } _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)); + 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; } diff --git a/Jusin154_Team3D/Editor/Private/Quest_Info_Line.cpp b/Jusin154_Team3D/Editor/Private/Quest_Info_Line.cpp index 4cac3f91f..5d5073416 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_Info_Line.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_Info_Line.cpp @@ -22,7 +22,7 @@ HRESULT CQuest_Info_Line::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 323.f; - Desc.fY = -315.f; + Desc.fY = 315.f; Desc.fSizeX = 256.f; Desc.fSizeY = 64.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) }; @@ -42,7 +42,8 @@ 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); - Visible(true); + static_cast(m_pOwner)->Add_Function(TEXT("QuestListHover"), [this](void* p) {this->Set_Hover(*reinterpret_cast<_int*>(p)); }); + Visible(false); return S_OK; } @@ -98,7 +99,7 @@ void CQuest_Info_Line::Late_Update(_float fTimeDelta) return; } if (m_bVisible) { - m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); __super::Late_Update(fTimeDelta); } } @@ -201,6 +202,19 @@ HRESULT CQuest_Info_Line::Ready_Components(void* pArg) return S_OK; } +void CQuest_Info_Line::Set_Hover(_int Index) +{ + m_iQuest_Index = Index; + if (m_iQuest_Index == -1) + { + Visible(false); + } + else + { + Visible(true); + } +} + CQuest_Info_Line* CQuest_Info_Line::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CQuest_Info_Line* pInstance = new CQuest_Info_Line(pDevice, pContext); diff --git a/Jusin154_Team3D/Editor/Private/Quest_List.cpp b/Jusin154_Team3D/Editor/Private/Quest_List.cpp index 789247975..dcffa1d0b 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_List.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_List.cpp @@ -21,8 +21,8 @@ HRESULT CQuest_List::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = -485.f; - Desc.fY = 150.f; + Desc.fX = -475.f; + Desc.fY = -150.f; Desc.fSizeX = 256.f; Desc.fSizeY = 64.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) }; @@ -40,6 +40,8 @@ HRESULT CQuest_List::Initialize(void* pArg) m_fAlpha = 1.f; m_fAlphaTime = 5.f; m_vNine_Slice = _float4(70.f, 186.f, 0.f, 64.f); + m_fFontX = 770.f; + m_fFontY = 520.f; SizeUpX(495.f); SizeUpY(80.f); Visible(true); @@ -87,6 +89,28 @@ void CQuest_List::Update(_float fTimeDelta) } } + Hover(); + if (m_bHover == true) + { + m_fSizeX = 505.f; + m_fSizeY = 90.f; + m_fFontX = 765.f; + m_fFontY = 520.f; + m_pFontSize = TEXT("Font_size21"); + m_pQuest_ID = 0; + static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_pQuest_ID); + } + else + { + m_fSizeX = 495.f; + m_fSizeY = 80.f; + m_fFontX = 770.f; + m_fFontY = 520.f; + m_pFontSize = TEXT("Font_size20"); + m_pQuest_ID = -1; + static_cast(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_pQuest_ID); + } + m_fTime += fTimeDelta * m_fTimeMult; __super::Update(fTimeDelta); } @@ -118,6 +142,8 @@ HRESULT CQuest_List::Render() return E_FAIL; } + m_pGameInstance->Render_Text(m_pFontSize, m_pQuest_Name.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY)); + return S_OK; } @@ -201,6 +227,34 @@ HRESULT CQuest_List::Ready_Components(void* pArg) return S_OK; } +void CQuest_List::Hover() +{ + POINT ptMouse{}; + GetCursorPos(&ptMouse); + ScreenToClient(g_hWnd, &ptMouse); + _float2 fMouse{}; + fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f); + fMouse.y = -(ptMouse.y - (g_iWinSizeY * 0.5f)); + POINT pt{}; + pt.x = _long(fMouse.x); + pt.y = _long(fMouse.y); + + if (PtInRect(&m_pRect, pt)) + { + m_bHover = true; + } + else + { + m_bHover = false; + } +} + +void CQuest_List::Set_Name(_wstring Name, _int ID) +{ + m_pQuest_Name = Name; + m_pQuest_ID = ID; +} + CQuest_List* CQuest_List::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) { CQuest_List* pInstance = new CQuest_List(pDevice, pContext); diff --git a/Jusin154_Team3D/Editor/Private/Quest_Panel.cpp b/Jusin154_Team3D/Editor/Private/Quest_Panel.cpp index afeebf301..49175ab4a 100644 --- a/Jusin154_Team3D/Editor/Private/Quest_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Quest_Panel.cpp @@ -9,6 +9,7 @@ #include "Quest_Info_Header.h" #include "Quest_Info_Line.h" #include "Quest_Entry_Line.h" +#include "Quest_Data.h" CQuest_Panel::CQuest_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) :CPanelObject(pDevice, pContext) @@ -29,9 +30,9 @@ HRESULT CQuest_Panel::Initialize(void* pArg) { CUIObject::UIOBJECT_DESC Desc{}; - Desc.fX = 960.f; - Desc.fY = 540.f; - Desc.fSizeX = g_iWinSizeX; + Desc.fX = 0.f; + Desc.fY = 0.f; + Desc.fSizeX = 1575.f; Desc.fSizeY = g_iWinSizeY; if (FAILED(__super::Initialize(&Desc))) @@ -47,14 +48,27 @@ HRESULT CQuest_Panel::Initialize(void* pArg) return E_FAIL; } m_fCanvasAlpha = 1.f; - m_fSortZ = 0.05f; + m_fSortZ = 0.04f; m_iSpellType = -1; m_fDelayTime = 1.f; Visible(true); ElementAllVisible(true); + static_cast(m_pOwner)->Add_Function(TEXT("QUESTPANELDATA"), [this](void* p) {this->Set_Quest_Data(reinterpret_cast(p)); }); return S_OK; } +void CQuest_Panel::Set_Quest_Count(_int Index) +{ + m_iQuest_Count = Index; +} + +void CQuest_Panel::Set_Quest_Data(CQuest_Data* Data) +{ + m_pQuest_Date = Data; + Function_Callback(TEXT("QUEST_DATA"), m_pQuest_Date); + static_cast(m_pQuest_List)->Set_Name(static_cast(m_pQuest_Date)->Get_Quest(0).pQuestName, 0); +} + void CQuest_Panel::Priority_Update(_float fTimeDelta) { if (!__super::Chack_Visible()) @@ -88,19 +102,6 @@ void CQuest_Panel::Late_Update(_float fTimeDelta) HRESULT CQuest_Panel::Render() { - if (FAILED(Bind_ShaderResources())) { - return E_FAIL; - } - if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) { - return E_FAIL; - } - if (FAILED(m_pVIBufferCom->Bind_Resources())) { - return E_FAIL; - } - if (FAILED(m_pVIBufferCom->Render())) { - return E_FAIL; - } - return S_OK; } @@ -111,56 +112,11 @@ _vector CQuest_Panel::Get_WorldPostion() HRESULT CQuest_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_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 CQuest_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_Quest_Widget"), 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; } @@ -247,8 +203,6 @@ void CQuest_Panel::Free() { __super::Free(); - SAFE_RELEASE(m_pDiffuse_TextureCom); - SAFE_RELEASE(m_pShaderCom); SAFE_RELEASE(m_pVIBufferCom); } diff --git a/Jusin154_Team3D/Editor/Private/Quest_Status.cpp b/Jusin154_Team3D/Editor/Private/Quest_Status.cpp new file mode 100644 index 000000000..b53d8ac09 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Quest_Status.cpp @@ -0,0 +1,364 @@ +#include "pch.h" +#include "Quest_Status.h" +#include "GameInstance.h" + +CQuest_Status::CQuest_Status(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CElementObject(pDevice, pContext) +{ +} + +CQuest_Status::CQuest_Status(const CQuest_Status& rhs) + :CElementObject(rhs) +{ +} + +HRESULT CQuest_Status::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CQuest_Status::Initialize(void* pArg) +{ + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = 0.f; + Desc.fY = 180.f; + Desc.fSizeX = 128.f; + Desc.fSizeY = 128.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_fAlpha = 1.f; + m_fTimeMult = 3.f; + m_fAlphaTime = 1.f; + Compute_UI(0); + m_vImageposi = _float4{ 32.f, 32.f, 64.f, 64.f }; + m_fFontX = 80.f; + m_fFontY = 480.f; + Visible(true); + return S_OK; +} + +void CQuest_Status::Priority_Update(_float fTimeDelta) +{ + + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CQuest_Status::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; + + if (m_fAlpha <= 0.f) + { + m_bFadeOut = false; + m_fAlpha = 0.f; + } + } + Hover(); + if (m_bHover == true) + { + if (m_pGameInstance->Mouse_Down(DIM_LBUTTON)) + { + m_bClick = true; + static_cast(m_pOwner)->Function_Callback(TEXT("Click"), &m_iIndex); + } + } + + if (m_bClick == true) + { + m_fSizeX = 148.f; + m_fSizeY = 148.f; + m_vImageposi = _float4{ 42.f, 42.f, 64.f, 64.f }; + } + else + { + m_fSizeX = m_fOrigin_Size.x; + m_fSizeY = m_fOrigin_Size.y; + m_vImageposi = _float4{ 32.f, 32.f, 64.f, 64.f }; + m_bClick = false; + } + m_fTime += fTimeDelta * m_fTimeMult; + __super::Update(fTimeDelta); +} + +void CQuest_Status::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) + { + m_pGameInstance->Add_RenderGroup(RENDER::UI, this); + } + __super::Late_Update(fTimeDelta); +} + +HRESULT CQuest_Status::Render() +{ + if (FAILED(Bind_ShaderResources())) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::QUEST_STATUS)))) + { + 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"), m_pName.c_str()) - 30) * 0.5f; + m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pName.c_str(), _float2((m_fFontX - m_fX) - OffSet, m_fFontY - m_fY)); + + return S_OK; +} + +_vector CQuest_Status::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CQuest_Status::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_pDiffuse_TextureCom2->Bind_ShaderResource(m_pShaderCom, "g_Texture2", 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; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageSipos1", &m_vImageposi, sizeof(_float4)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_fCurrent_Size", &m_vScale, sizeof(_float2)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iHover", &m_bHover, sizeof(_bool)))) + { + return E_FAIL; + } + if (FAILED(m_pShaderCom->Bind_RawValue("g_iClick", &m_bClick, sizeof(_bool)))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CQuest_Status::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_Buttom_Slot"), reinterpret_cast(&m_pDiffuse_TextureCom), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Quest_Atlas"), reinterpret_cast(&m_pDiffuse_TextureCom1), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_SpellMiniGame_ButtonRing"), reinterpret_cast(&m_pDiffuse_TextureCom2), nullptr))) + { + return E_FAIL; + } + if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIEDITOR, (CComponent**)&m_pShaderCom, nullptr))) + { + return E_FAIL; + } + + return S_OK; +} + +void CQuest_Status::Compute_UI(_int Index) +{ + _float2 fImage_Size = { 192.f, 64.f }; + + _uint iCountX = 3; + _uint iCountY = 1; + + _float iImageX = 64.f; + _float iImageY = 64.f; + + _uint iframeX = Index % iCountX; + _uint iframeY = Index / iCountX; + + _float2 UVStart; + UVStart.x = iframeX * iImageX / fImage_Size.x; + UVStart.y = iframeY * iImageY / fImage_Size.y; + + _float2 UVEnd; + UVEnd.x = UVStart.x + (iImageX / fImage_Size.x); + UVEnd.y = UVStart.y + (iImageY / fImage_Size.y); + + _float4 UV = _float4{ UVStart.x, UVStart.y, UVEnd.x, UVEnd.y }; + m_vUV = UV; +} + +void CQuest_Status::Set_Status(_int Index, _float m_fPosY, _wstring Name) +{ + m_iIndex = Index; + Compute_UI(Index); + MoveY(m_fPosY); + m_pName = Name; +} + +void CQuest_Status::Set_Click(_bool bClick) +{ + m_bClick = bClick; +} + +void CQuest_Status::Hover() +{ + POINT ptMouse{}; + GetCursorPos(&ptMouse); + ScreenToClient(g_hWnd, &ptMouse); + + // 2. UI 중심 기준으로 변환 (현재 구조 유지) + _float2 fMouse; + fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f); + fMouse.y = -ptMouse.y + (g_iWinSizeY * 0.5f); + + // 3. 이미지 중심 좌표 + _float2 center; + center.x = m_fX + m_pOwner->Get_WorldPostion().m128_f32[0]; + center.y = m_fY + m_pOwner->Get_WorldPostion().m128_f32[1]; + + // 4. 반지름 계산 (원형이면 가로 기준) + float radius = m_fSizeX * 0.4f; + + // 5. 거리 제곱 계산 + float dx = fMouse.x - center.x; + float dy = fMouse.y - center.y; + float distSq = dx * dx + dy * dy; + + // 6. 원 안 체크 + if (distSq <= radius * radius) + { + m_bHover = true; + } + else + { + m_bHover = false; + } +} + +CQuest_Status* CQuest_Status::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CQuest_Status* pInstance = new CQuest_Status(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CQuest_Status"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CQuest_Status::Clone(void* pArg, CGameObject* pOwner) +{ + CQuest_Status* pInstance = new CQuest_Status(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CQuest_Status"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CQuest_Status::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pDiffuse_TextureCom); + SAFE_RELEASE(m_pDiffuse_TextureCom1); + SAFE_RELEASE(m_pDiffuse_TextureCom2); + SAFE_RELEASE(m_pShaderCom); + SAFE_RELEASE(m_pVIBufferCom); +} + +void CQuest_Status::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Quest_Status_Panel.cpp b/Jusin154_Team3D/Editor/Private/Quest_Status_Panel.cpp new file mode 100644 index 000000000..66d10aad6 --- /dev/null +++ b/Jusin154_Team3D/Editor/Private/Quest_Status_Panel.cpp @@ -0,0 +1,195 @@ +#include "pch.h" +#include "Quest_Status_Panel.h" +#include "GameInstance.h" +#include "Quest_Status.h" + +CQuest_Status_Panel::CQuest_Status_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) + :CPanelObject(pDevice, pContext) +{ +} + +CQuest_Status_Panel::CQuest_Status_Panel(const CQuest_Status_Panel& rhs) + :CPanelObject(rhs) +{ +} + +HRESULT CQuest_Status_Panel::Initialize_Prototype() +{ + return S_OK; +} + +HRESULT CQuest_Status_Panel::Initialize(void* pArg) +{ + + CUIObject::UIOBJECT_DESC Desc{}; + + Desc.fX = -860.f; + Desc.fY = 120.f; + Desc.fSizeX = 175.f; + Desc.fSizeY = 680.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; + } + if (FAILED(Ready_Element(pArg))) + { + return E_FAIL; + } + + m_fCanvasAlpha = 1.f; + m_fSortZ = 0.04f; + Visible(true); + Set_Status(); + Add_Function(TEXT("Click"), [this](void* p) {this->Slot_Hover(*reinterpret_cast<_int*>(p)); }); + return S_OK; +} + +void CQuest_Status_Panel::Set_Status() +{ + static_cast(m_pQuest_Status1)->Set_Status(0, 180.f, TEXT("전 체")); + static_cast(m_pQuest_Status2)->Set_Status(1, 0.f, TEXT("진행중")); + static_cast(m_pQuest_Status3)->Set_Status(2, -180.f, TEXT("완 료")); + static_cast(m_pQuest_Status1)->Set_Click(true); + m_bClick[0] = true; + m_bClick[1] = false; + m_bClick[2] = false; +} + +void CQuest_Status_Panel::Slot_Hover(_int Index) +{ + for (_int i = 0; i < 3; ++i) + { + if (i == Index) + { + m_bClick[i] = true; + } + else + { + m_bClick[i] = false; + } + } + static_cast(m_pQuest_Status1)->Set_Click(m_bClick[0]); + static_cast(m_pQuest_Status2)->Set_Click(m_bClick[1]); + static_cast(m_pQuest_Status3)->Set_Click(m_bClick[2]); + static_cast(m_pOwner)->Function_Callback(TEXT("QuestPanelUpdate"), &Index); +} + +void CQuest_Status_Panel::Priority_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Priority_Update(fTimeDelta); +} + +void CQuest_Status_Panel::Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + __super::Update(fTimeDelta); +} + +void CQuest_Status_Panel::Late_Update(_float fTimeDelta) +{ + if (!__super::Chack_Visible()) + { + return; + } + if (m_bVisible) { + __super::Late_Update(fTimeDelta); + } +} + +HRESULT CQuest_Status_Panel::Render() +{ + return S_OK; +} + +_vector CQuest_Status_Panel::Get_WorldPostion() +{ + return m_pTransformCom->Get_State(STATE::POSITION); +} + +HRESULT CQuest_Status_Panel::Bind_ShaderResources() +{ + return S_OK; +} + +HRESULT CQuest_Status_Panel::Ready_Components(void* pArg) +{ + if (FAILED(Add_Component(g_iStaticLevel, &m_pVIBufferCom))) + { + return E_FAIL; + } + + return S_OK; +} + +HRESULT CQuest_Status_Panel::Ready_Element(void* pArg) +{ + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status1)))) + { + return E_FAIL; + } + Add_Element(TEXT("Quest_Status1"), m_pQuest_Status1); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status2)))) + { + return E_FAIL; + } + Add_Element(TEXT("Quest_Status2"), m_pQuest_Status2); + + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast(&m_pQuest_Status3)))) + { + return E_FAIL; + } + Add_Element(TEXT("Quest_Status3"), m_pQuest_Status3); + + return S_OK; +} + +CQuest_Status_Panel* CQuest_Status_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext) +{ + CQuest_Status_Panel* pInstance = new CQuest_Status_Panel(pDevice, pContext); + + if (FAILED(pInstance->Initialize_Prototype())) + { + MSG_BOX("Failed to Created : CQuest_Status_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +CGameObject* CQuest_Status_Panel::Clone(void* pArg, CGameObject* pOwner) +{ + CQuest_Status_Panel* pInstance = new CQuest_Status_Panel(*this); + pInstance->m_pOwner = pOwner; + if (FAILED(pInstance->Initialize(pArg))) + { + MSG_BOX("Failed to Cloned : CQuest_Status_Panel"); + SAFE_RELEASE(pInstance); + } + + return pInstance; +} + +void CQuest_Status_Panel::Free() +{ + __super::Free(); + + SAFE_RELEASE(m_pVIBufferCom); +} + +void CQuest_Status_Panel::Describe_Entity() +{ +} diff --git a/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp b/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp index 2fbcf87d7..47aa6c556 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Anim.cpp @@ -22,7 +22,7 @@ HRESULT CSpell_Anim::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 590.f; - Desc.fY = -100.f; + Desc.fY = 100.f; Desc.fSizeX = 470.f; Desc.fSizeY = 250.f; @@ -106,7 +106,7 @@ void CSpell_Anim::Update(_float fTimeDelta) if (m_iPerSpell != -1) { - m_fY = m_fOrigin_Position.y + static_cast(m_pOwner)->Get_Info(m_iPerSpell).fVidio; + m_fY = m_fOrigin_Position.y - static_cast(m_pOwner)->Get_Info(m_iPerSpell).fVidio; } __super::Update(fTimeDelta); diff --git a/Jusin154_Team3D/Editor/Private/Spell_Drag.cpp b/Jusin154_Team3D/Editor/Private/Spell_Drag.cpp index 5884d5967..af87322a9 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Drag.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Drag.cpp @@ -109,7 +109,7 @@ void CSpell_Drag::Update(_float fTimeDelta) ScreenToClient(g_hWnd, &m_pPt); _float2 fMouse{}; fMouse.x = m_pPt.x - (g_iWinSizeX * 0.5f); - fMouse.y = m_pPt.y - (g_iWinSizeY * 0.5f); + fMouse.y = -m_pPt.y + (g_iWinSizeY * 0.5f); m_vStart_MousePos = XMVectorSet(fMouse.x, fMouse.y, 0.f, 1.f); m_bFalse = false; @@ -124,7 +124,7 @@ void CSpell_Drag::Update(_float fTimeDelta) ScreenToClient(g_hWnd, &pt); float moveX = pt.x - (g_iWinSizeX * 0.5f); - float moveY = pt.y - (g_iWinSizeY * 0.5f); + float moveY = -pt.y + (g_iWinSizeY * 0.5f); m_vMove_MousePos = XMVectorSet(moveX, moveY, 0.f, 1.f); @@ -348,7 +348,7 @@ _float2 CSpell_Drag::Get_MousePos() ScreenToClient(g_hWnd, &m_pPt); _float2 fMouse{}; fMouse.x = m_pPt.x - (g_iWinSizeX * 0.5f); - fMouse.y = m_pPt.y - (g_iWinSizeY * 0.5f); + fMouse.y = -m_pPt.y + (g_iWinSizeY * 0.5f); m_vMove_MousePos = XMVectorSet(fMouse.x, fMouse.y, 0.f, 1.f); return fMouse; diff --git a/Jusin154_Team3D/Editor/Private/Spell_Header.cpp b/Jusin154_Team3D/Editor/Private/Spell_Header.cpp index 793d83cf4..1e1560ae8 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Header.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Header.cpp @@ -22,7 +22,7 @@ HRESULT CSpell_Header::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 600.f; - Desc.fY = -385.f; + Desc.fY = 385.f; Desc.fSizeX = 512.f; Desc.fSizeY = 80.f; @@ -139,8 +139,8 @@ HRESULT CSpell_Header::Render() m_fFontOffSet = (m_pGameInstance->FontSizeX(TEXT("Font_size20"), m_pSpell_Name.c_str()) - 53.f) * 0.5f; - m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY + m_fY), XMVectorSet((215.f / 255.f) * m_fAlpha, (185.f / 255.f) * m_fAlpha, (95.f / 255.f) * m_fAlpha, m_fAlpha)); - m_pGameInstance->Render_Text(TEXT("Font_size13"), m_fSpell_Type.c_str(), _float2(m_fType.x + m_fX, m_fType.y + 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_pSpell_Name.c_str(), _float2((m_fFontX + m_fX) - m_fFontOffSet, m_fFontY - m_fY), XMVectorSet((215.f / 255.f) * m_fAlpha, (185.f / 255.f) * m_fAlpha, (95.f / 255.f) * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("Font_size13"), m_fSpell_Type.c_str(), _float2(m_fType.x + m_fX, m_fType.y - m_fY), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp b/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp index a9e1fa2a9..59b22b1d5 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Header_Line.cpp @@ -22,7 +22,7 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 600.f; - Desc.fY = -340.f; + Desc.fY = 340.f; Desc.fSizeX = 487.f; Desc.fSizeY = 18.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) }; diff --git a/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp b/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp index 06ed9660b..9c8a6fc15 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Overlay.cpp @@ -22,7 +22,7 @@ HRESULT CSpell_Overlay::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 380.f; - Desc.fY = 30.f; + Desc.fY = -30.f; Desc.fSizeX = 105.f; Desc.fSizeY = 105.f; diff --git a/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp b/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp index 5565bd390..f6e0125b5 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Panel.cpp @@ -38,7 +38,7 @@ HRESULT CSpell_Panel::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 960.f; - Desc.fY = 540.f; + Desc.fY = -540.f; Desc.fSizeX = g_iWinSizeX; Desc.fSizeY = g_iWinSizeY; diff --git a/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp b/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp index c7c7fa9fb..e0ea92b1c 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Preview.cpp @@ -23,7 +23,7 @@ HRESULT CSpell_Preview::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 400.f; - Desc.fY = -365.f; + Desc.fY = 500.f; Desc.fSizeX = 128.f; Desc.fSizeY = 128.f; @@ -44,7 +44,7 @@ HRESULT CSpell_Preview::Initialize(void* pArg) m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f); m_fTopY = m_fY - m_vScale.y * 0.5f; m_fPreviewOffSet = 0.f; - m_fOriginPerviewSize = 280.f; + m_fOriginPerviewSize = 280; SizeUpX(512.f); SizeUpY(m_fOriginPerviewSize); m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL); @@ -141,7 +141,7 @@ HRESULT CSpell_Preview::Render() return E_FAIL; } - m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, (m_fFontY + m_fY) - m_fPreviewOffSet * 0.5f), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); + m_pGameInstance->Render_Text(TEXT("Font_size14"), m_pSpell_Info.c_str(), _float2(m_fFontX + m_fX, (m_fFontY - m_fY) - m_fPreviewOffSet * 0.5f), XMVectorSet(1.f * m_fAlpha, 1.f * m_fAlpha, 1.f * m_fAlpha, m_fAlpha)); return S_OK; } @@ -162,7 +162,7 @@ void CSpell_Preview::SizeUpY(_float fSizeY) { _float prevY = m_fY; m_fSizeY = fSizeY; - m_fY = m_fTopY + fSizeY * 0.5f; + m_fY = m_fTopY - fSizeY * 0.5f; _float deltaY = m_fY - prevY; } diff --git a/Jusin154_Team3D/Editor/Private/Spell_UI.cpp b/Jusin154_Team3D/Editor/Private/Spell_UI.cpp index 7990e029e..94829216a 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_UI.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_UI.cpp @@ -22,7 +22,7 @@ HRESULT CSpell_UI::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 650.f; - Desc.fY = -60.f; + Desc.fY = 60.f; Desc.fSizeX = 180.f; Desc.fSizeY = 50.f; diff --git a/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp b/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp index 770ba74f8..9b09d5028 100644 --- a/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp +++ b/Jusin154_Team3D/Editor/Private/Spell_Vidio_Border.cpp @@ -1,4 +1,5 @@ -#include "pch.h" + +#include "pch.h" #include "Spell_Vidio_Border.h" #include "GameInstance.h" @@ -22,7 +23,7 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg) CUIObject::UIOBJECT_DESC Desc{}; Desc.fX = 590.f; - Desc.fY = -100.f; + Desc.fY = 100.f; Desc.fSizeX = 520.f; Desc.fSizeY = 275.f; @@ -99,7 +100,7 @@ void CSpell_Vidio_Border::Update(_float fTimeDelta) if (m_iSpellType != -1) { - m_fY = m_fOrigin_Position.y + static_cast(m_pOwner)->Get_Info(m_iSpellType).fVidio; + m_fY = m_fOrigin_Position.y - static_cast(m_pOwner)->Get_Info(m_iSpellType).fVidio; } __super::Update(fTimeDelta); diff --git a/Jusin154_Team3D/Editor/Private/UI_Manager.cpp b/Jusin154_Team3D/Editor/Private/UI_Manager.cpp index 4e94201a2..7d42624bf 100644 --- a/Jusin154_Team3D/Editor/Private/UI_Manager.cpp +++ b/Jusin154_Team3D/Editor/Private/UI_Manager.cpp @@ -170,10 +170,10 @@ HRESULT CUI_Manager::Ready_Components(void* pArg) } //Add_Canvas(TEXT("Mouse_Cursor"), m_pMouse_Cursor); - //if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCamera_LockOn)))) { - // return E_FAIL; - //} - ////Add_Canvas(TEXT("Camera_LockOn"), m_pCamera_LockOn); + if (FAILED(m_pGameInstance->Add_GameObject_ToLayer(g_iStaticLevel, g_iStaticLevel, LAYER_UI, nullptr, this, reinterpret_cast(&m_pCamera_LockOn)))) { + return E_FAIL; + } + //Add_Canvas(TEXT("Camera_LockOn"), m_pCamera_LockOn); return S_OK; } diff --git a/Jusin154_Team3D/Editor/Public/Completed_Panel.h b/Jusin154_Team3D/Editor/Public/Completed_Panel.h new file mode 100644 index 000000000..2a12d6e8b --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Completed_Panel.h @@ -0,0 +1,45 @@ +#pragma once + +#include "Editor_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CCompleted_Panel final : public CPanelObject +{ +private: + CCompleted_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CCompleted_Panel(const CCompleted_Panel& rhs); + virtual ~CCompleted_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 }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CCompleted_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/Editor_Define.h b/Jusin154_Team3D/Editor/Public/Editor_Define.h index 8bd7fdf2e..50e1bf378 100644 --- a/Jusin154_Team3D/Editor/Public/Editor_Define.h +++ b/Jusin154_Team3D/Editor/Public/Editor_Define.h @@ -33,7 +33,7 @@ namespace Editor ROTATION, SLOT, TYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV, 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, + ENEMY_HPBAR, BOSS_HPBAR, QUEST_BORDER, QUEST_INFO, QUEST_STATUS, BROOMSTICK, ENEMY_DETECTION, 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 ,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,END }; diff --git a/Jusin154_Team3D/Editor/Public/InProgress_Panel.h b/Jusin154_Team3D/Editor/Public/InProgress_Panel.h new file mode 100644 index 000000000..4f33d5bb4 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/InProgress_Panel.h @@ -0,0 +1,45 @@ +#pragma once + +#include "Editor_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Engine) +class CGameObject; +NS_END + +NS_BEGIN(Editor) + +class CInProgress_Panel final : public CPanelObject +{ +private: + CInProgress_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CInProgress_Panel(const CInProgress_Panel& rhs); + virtual ~CInProgress_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 }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + +public: + static CInProgress_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/Magic_Item.h b/Jusin154_Team3D/Editor/Public/Magic_Item.h index c29e3ffde..ebf7422c7 100644 --- a/Jusin154_Team3D/Editor/Public/Magic_Item.h +++ b/Jusin154_Team3D/Editor/Public/Magic_Item.h @@ -34,9 +34,6 @@ class CMagic_Item final : public CElementObject CTexture* m_pDiffuse_TextureCom1 = { nullptr }; CTexture* m_pDiffuse_TextureCom2 = { nullptr }; CTexture* m_pDiffuse_TextureCom3 = { nullptr }; - CTexture* m_pDiffuse_TextureCom4 = { nullptr }; - CTexture* m_pDiffuse_TextureCom5 = { nullptr }; - CTexture* m_pDiffuse_TextureCom6 = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; @@ -44,12 +41,7 @@ class CMagic_Item final : public CElementObject _uint m_iArratCount{}; _float2 m_vImageSize1 = {}; _float2 m_vImagePos1 = {}; - _float2 m_vImageSize2 = {}; - _float2 m_vImagePos2 = {}; - _int m_iPotionIndex{}; - _int m_iPerPotionIndex{}; - _wstring m_strPotion; public: static CMagic_Item* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Quest_Border.h b/Jusin154_Team3D/Editor/Public/Quest_Border.h index 116ccb3cd..27539843f 100644 --- a/Jusin154_Team3D/Editor/Public/Quest_Border.h +++ b/Jusin154_Team3D/Editor/Public/Quest_Border.h @@ -25,13 +25,18 @@ class CQuest_Border final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + void Set_Quest_Data(class CQuest_Data* Data); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; - _int m_iColor = { false }; + class CQuest_Data* m_pQuest_Data = { nullptr }; + _int m_iColor = { false }; + _int m_iCount = { false }; public: static CQuest_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/Quest_Canvas.h b/Jusin154_Team3D/Editor/Public/Quest_Canvas.h index 7c7cdad96..55794cafb 100644 --- a/Jusin154_Team3D/Editor/Public/Quest_Canvas.h +++ b/Jusin154_Team3D/Editor/Public/Quest_Canvas.h @@ -32,10 +32,23 @@ class CQuest_Canvas final : public CCanvasObject public: void Clear_Penel(); + void Update_Panel(_int Index); + + class CQuest_Data* Get_Data(); private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + CGameObject* m_pQuest_Panel = { nullptr }; + CGameObject* m_pInProgress_Panel = { nullptr }; + CGameObject* m_pCompleted_Panel = { nullptr }; + CGameObject* m_pQuest_Status_Panel = { nullptr }; + CGameObject* m_pQuest_Data = { nullptr }; + + _bool m_bClick[3] = { false }; + _int m_iIndex{}; public: static CQuest_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Quest_Data.h b/Jusin154_Team3D/Editor/Public/Quest_Data.h index 9c5187f3c..1ebd5b944 100644 --- a/Jusin154_Team3D/Editor/Public/Quest_Data.h +++ b/Jusin154_Team3D/Editor/Public/Quest_Data.h @@ -27,8 +27,8 @@ class CQuest_Data final : public CGameObject { _int iQuestID{}; _int iType{}; - _string pQuestName; - _string pQuestInfo; + _wstring pQuestName; + _wstring pQuestInfo; vector ObjectiveInfo; vector RewardsInfo; }QUESTINFO; @@ -44,6 +44,9 @@ class CQuest_Data final : public CGameObject virtual HRESULT Render() override; virtual _vector Get_WorldPostion() override; +public: + QUESTINFO Get_Quest(_int QuestID); + _int Get_Count(); private: virtual HRESULT Bind_ShaderResources() override; virtual HRESULT Ready_Components(void* pArg) override; @@ -52,7 +55,7 @@ class CQuest_Data final : public CGameObject public: //const SPELLINFO& Get_Info(_uint SpellID) const; - + private: CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; @@ -62,6 +65,8 @@ class CQuest_Data final : public CGameObject vector QuestInfos; + _int m_iQuest_Count{}; + _bool m_bClear[1] = { false }; public: static CQuest_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); diff --git a/Jusin154_Team3D/Editor/Public/Quest_Entry_Line.h b/Jusin154_Team3D/Editor/Public/Quest_Entry_Line.h index 0fe2fd216..1e4903ff1 100644 --- a/Jusin154_Team3D/Editor/Public/Quest_Entry_Line.h +++ b/Jusin154_Team3D/Editor/Public/Quest_Entry_Line.h @@ -25,12 +25,16 @@ class CQuest_Entry_Line final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + void Set_Hover(_int Index); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; _int m_iColor = { false }; + _int m_iQuest_Index{}; public: static CQuest_Entry_Line* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Quest_HeaderLine.h b/Jusin154_Team3D/Editor/Public/Quest_HeaderLine.h index 7adf793fc..efc8eaa92 100644 --- a/Jusin154_Team3D/Editor/Public/Quest_HeaderLine.h +++ b/Jusin154_Team3D/Editor/Public/Quest_HeaderLine.h @@ -30,6 +30,7 @@ class CQuest_HeaderLine final : public CElementObject CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + _int m_iQuest_Index{}; public: static CQuest_HeaderLine* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Quest_Info.h b/Jusin154_Team3D/Editor/Public/Quest_Info.h index 685cffe23..87e7daa7e 100644 --- a/Jusin154_Team3D/Editor/Public/Quest_Info.h +++ b/Jusin154_Team3D/Editor/Public/Quest_Info.h @@ -25,8 +25,8 @@ class CQuest_Info final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; -private: - void Hover(); +public: + void Set_Hover(_int Index); private: CTexture* m_pDiffuse_TextureCom = { nullptr }; @@ -39,6 +39,7 @@ class CQuest_Info final : public CElementObject _float m_fOriginPerviewSize{}; _float m_fPreviewOffSet{}; _float4 m_vHeaderBack{}; + _int m_iQuest_Index{}; _int m_iPerQuestIndex{}; public: diff --git a/Jusin154_Team3D/Editor/Public/Quest_Info_Header.h b/Jusin154_Team3D/Editor/Public/Quest_Info_Header.h index 128abf1c0..74e323665 100644 --- a/Jusin154_Team3D/Editor/Public/Quest_Info_Header.h +++ b/Jusin154_Team3D/Editor/Public/Quest_Info_Header.h @@ -25,13 +25,16 @@ class CQuest_Info_Header final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + void Set_Hover(_int Index); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; _int m_iColor = true; - + _int m_iQuest_Index{}; public: static CQuest_Info_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Quest_Info_Line.h b/Jusin154_Team3D/Editor/Public/Quest_Info_Line.h index a108174bf..e1e40736d 100644 --- a/Jusin154_Team3D/Editor/Public/Quest_Info_Line.h +++ b/Jusin154_Team3D/Editor/Public/Quest_Info_Line.h @@ -25,12 +25,17 @@ class CQuest_Info_Line final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + void Set_Hover(_int Index); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; _int m_iColor = { false }; + _int m_iQuest_Index{}; + public: static CQuest_Info_Line* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Quest_List.h b/Jusin154_Team3D/Editor/Public/Quest_List.h index a9738fa7c..1a738110a 100644 --- a/Jusin154_Team3D/Editor/Public/Quest_List.h +++ b/Jusin154_Team3D/Editor/Public/Quest_List.h @@ -25,12 +25,23 @@ class CQuest_List final : public CElementObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +private: + void Hover(); + +public: + void Set_Name(_wstring Name, _int ID); + private: CTexture* m_pDiffuse_TextureCom = { nullptr }; CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; _int m_iColor = { false }; + + _wstring m_pFontSize; + _wstring m_pQuest_Name; + _int m_pQuest_ID{}; + public: static CQuest_List* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Quest_Panel.h b/Jusin154_Team3D/Editor/Public/Quest_Panel.h index fe79f07dc..a741edfdc 100644 --- a/Jusin154_Team3D/Editor/Public/Quest_Panel.h +++ b/Jusin154_Team3D/Editor/Public/Quest_Panel.h @@ -31,11 +31,15 @@ class CQuest_Panel final : public CPanelObject virtual HRESULT Initialize_Prototype() override; virtual HRESULT Initialize(void* pArg) override; +public: + void Set_Quest_Count(_int Index); + void Set_Quest_Data(class CQuest_Data* Data); + private: - CTexture* m_pDiffuse_TextureCom = { nullptr }; - CShader* m_pShaderCom = { nullptr }; CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + class CQuest_Data* m_pQuest_Date = { nullptr }; + CGameObject* m_pQuest_Border = { nullptr }; CGameObject* m_pQuest_Header = { nullptr }; CGameObject* m_pQuest_HeaderLine = { nullptr }; @@ -45,6 +49,8 @@ class CQuest_Panel final : public CPanelObject CGameObject* m_pQuest_Info_Line = { nullptr }; CGameObject* m_pQuest_Entry_Line = { nullptr }; + _int m_iQuest_Count{}; + public: static CQuest_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override; diff --git a/Jusin154_Team3D/Editor/Public/Quest_Status.h b/Jusin154_Team3D/Editor/Public/Quest_Status.h new file mode 100644 index 000000000..b67a76c29 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Quest_Status.h @@ -0,0 +1,56 @@ +#pragma once + +#include "Editor_Define.h" +#include "ElementObject.h" + +NS_BEGIN(Editor) + +class CQuest_Status final : public CElementObject +{ +private: + CQuest_Status(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CQuest_Status(const CQuest_Status& rhs); + virtual ~CQuest_Status() = 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 Compute_UI(_int Index); + void Set_Status(_int Index, _float m_PosY, _wstring Name); + + void Set_Click(_bool bClick); + +private: + void Hover(); + +private: + CTexture* m_pDiffuse_TextureCom = { nullptr }; + CTexture* m_pDiffuse_TextureCom1 = { nullptr }; + CTexture* m_pDiffuse_TextureCom2 = { nullptr }; + CShader* m_pShaderCom = { nullptr }; + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + _wstring m_pName; + _int m_iIndex{}; + _float4 m_vUV{}; + _float4 m_vImageposi{}; + _bool m_bClick = { false }; +public: + static CQuest_Status* 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/Quest_Status_Panel.h b/Jusin154_Team3D/Editor/Public/Quest_Status_Panel.h new file mode 100644 index 000000000..811480c34 --- /dev/null +++ b/Jusin154_Team3D/Editor/Public/Quest_Status_Panel.h @@ -0,0 +1,49 @@ +#pragma once + +#include "Editor_Define.h" +#include "PanelObject.h" + +NS_BEGIN(Editor) + +class CQuest_Status_Panel final : public CPanelObject +{ +private: + CQuest_Status_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext); + CQuest_Status_Panel(const CQuest_Status_Panel& rhs); + virtual ~CQuest_Status_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: + void Set_Status(); + void Slot_Hover(_int Index); + +private: + CVIBuffer_Rect* m_pVIBufferCom = { nullptr }; + + CGameObject* m_pQuest_Status1 = { nullptr }; + CGameObject* m_pQuest_Status2 = { nullptr }; + CGameObject* m_pQuest_Status3 = { nullptr }; + + _bool m_bClick[3] = { false }; + +public: + static CQuest_Status_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/Engine/Private/CanvasObject.cpp b/Jusin154_Team3D/Engine/Private/CanvasObject.cpp index c1ceaa795..83167d6ee 100644 --- a/Jusin154_Team3D/Engine/Private/CanvasObject.cpp +++ b/Jusin154_Team3D/Engine/Private/CanvasObject.cpp @@ -111,6 +111,20 @@ const vector CCanvasObject::Panel_Name() return m_PanelNames; } +void CCanvasObject::Add_Function(wstring Name, function Evnet) +{ + m_PaneltFunction_map.emplace(Name, Evnet); +} + +void CCanvasObject::Function_Callback(wstring Name, void* pArg) +{ + auto range = m_PaneltFunction_map.equal_range(Name); + for (auto it = range.first; it != range.second; ++it) + { + it->second(pArg); + } +} + void CCanvasObject::Add_Panel(wstring Name, CGameObject* pPanel) { if (pPanel == nullptr) diff --git a/Jusin154_Team3D/Engine/Private/ElementObject.cpp b/Jusin154_Team3D/Engine/Private/ElementObject.cpp index bab8ba454..ae0cb26f6 100644 --- a/Jusin154_Team3D/Engine/Private/ElementObject.cpp +++ b/Jusin154_Team3D/Engine/Private/ElementObject.cpp @@ -39,9 +39,17 @@ void CElementObject::Update(_float fTimeDelta) m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet( m_fX + m_pOwner->Get_WorldPostion().m128_f32[0], - -m_fY + m_pOwner->Get_WorldPostion().m128_f32[1], + m_fY + m_pOwner->Get_WorldPostion().m128_f32[1], m_fSortZ, 1.f)); + m_pRect = + { + long((m_fX + m_pOwner->Get_WorldPostion().m128_f32[0]) - m_fSizeX * 0.5f), + long((m_fY + m_pOwner->Get_WorldPostion().m128_f32[1]) - m_fSizeY * 0.5f), + long((m_fX + m_pOwner->Get_WorldPostion().m128_f32[0]) + m_fSizeX * 0.5f), + long((m_fY + m_pOwner->Get_WorldPostion().m128_f32[1]) + m_fSizeY * 0.5f) + }; + m_fCurrent_Position = XMVectorSet(m_fX, m_fY, 0.f, 1.f); m_vLerp_Position = XMVectorSet(m_fLerpX, m_fLerpY, 0.f, 1.f); } diff --git a/Jusin154_Team3D/Engine/Private/PanelObject.cpp b/Jusin154_Team3D/Engine/Private/PanelObject.cpp index d41593c87..ea19fd18c 100644 --- a/Jusin154_Team3D/Engine/Private/PanelObject.cpp +++ b/Jusin154_Team3D/Engine/Private/PanelObject.cpp @@ -44,7 +44,7 @@ void CPanelObject::Update(_float fTimeDelta) m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet( m_fX + m_pOwner->Get_WorldPostion().m128_f32[0], - -m_fY + m_pOwner->Get_WorldPostion().m128_f32[1], + m_fY + m_pOwner->Get_WorldPostion().m128_f32[1], m_fSortZ, 1.f)); m_fCurrent_Position = XMVectorSet(m_fX, m_fY, 0.f, 1.f); diff --git a/Jusin154_Team3D/Engine/Public/CanvasObject.h b/Jusin154_Team3D/Engine/Public/CanvasObject.h index b36e37cf5..6af3b2651 100644 --- a/Jusin154_Team3D/Engine/Public/CanvasObject.h +++ b/Jusin154_Team3D/Engine/Public/CanvasObject.h @@ -29,7 +29,8 @@ class ENGINE_DLL CCanvasObject abstract : public CUIObject virtual class CGameObject* Get_Panel(const wstring& Name); virtual _int Panels_Count(); virtual const vector Panel_Name(); - + virtual void Add_Function(wstring Name, function Evnet); + virtual void Function_Callback(wstring Name, void* pArg = nullptr); protected: virtual void Add_Panel(wstring Name, class CGameObject* pPanel); @@ -39,6 +40,9 @@ class ENGINE_DLL CCanvasObject abstract : public CUIObject map m_Panels_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서 _int m_iPanel_Count{}; // 전체 패널의 갯수 + multimap> m_PaneltFunction_map; + + private: virtual class CGameObject* Find_Panel(const wstring& Name); @@ -46,4 +50,4 @@ class ENGINE_DLL CCanvasObject abstract : public CUIObject virtual void Free() override; }; -NS_END \ No newline at end of file +NS_END