[Add] Revelio_SpellSelectionGridicon 추가
[Modify] 이미지 아틀라스로 합침
@@ -31,10 +31,16 @@ float2 g_fHpBG;
|
||||
|
||||
float4 g_fNine_Slice;
|
||||
float4 g_fImageUV;
|
||||
float4 g_fImageUV1;
|
||||
|
||||
float2 g_fPosition[4];
|
||||
float4 g_fImagesUV[4];
|
||||
|
||||
Texture2D g_Texture;
|
||||
Texture2D g_Texture1;
|
||||
Texture2D g_Texture2;
|
||||
Texture2D g_Texture3;
|
||||
Texture2D g_Texture4;
|
||||
Texture2D g_DiffuseTexture;
|
||||
Texture2D g_MaskingTexture;
|
||||
|
||||
@@ -608,6 +614,68 @@ PS_OUT PS_Magic_Icon(PS_IN In)
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_RemapUV(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 startUV = g_fImageUV.xy;
|
||||
float2 endUV = g_fImageUV.zw;
|
||||
|
||||
float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV);
|
||||
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, atlasUV);
|
||||
|
||||
Color = tex1;
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
PS_OUT PS_Revelio(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 UV = In.vTexcoord;
|
||||
|
||||
float2 Position[4];
|
||||
float2 startUV[4];
|
||||
float2 endUV[4];
|
||||
|
||||
float2 Atlases[4];
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
Position[i] = g_fPosition[i];
|
||||
startUV[i] = g_fImagesUV[i].xy;
|
||||
endUV[i] = g_fImagesUV[i].zw;
|
||||
|
||||
Atlases[i] = startUV[i] + UV * (endUV[i] - startUV[i]);
|
||||
}
|
||||
|
||||
float4 tex1 = g_Texture.Sample(DefaultSampler, UV);
|
||||
float4 tex2 = g_Texture1.Sample(DefaultSampler, Atlases[0]);
|
||||
float4 tex3 = g_Texture1.Sample(DefaultSampler, Atlases[1]);
|
||||
float4 tex4 = g_Texture2.Sample(DefaultSampler, Atlases[2]);
|
||||
float4 tex5 = g_Texture2.Sample(DefaultSampler, Atlases[3]);
|
||||
|
||||
|
||||
|
||||
//float2 atlasUV = startUV + In.vTexcoord * (endUV - startUV);
|
||||
|
||||
Color.a *= Alpha;
|
||||
Out.vColor = Color;
|
||||
|
||||
return Out;
|
||||
}
|
||||
|
||||
technique11 PosTexTechnique11
|
||||
{
|
||||
pass Default
|
||||
@@ -768,4 +836,24 @@ technique11 PosTexTechnique11
|
||||
PixelShader = compile ps_5_0 PS_Magic_Icon();
|
||||
}
|
||||
|
||||
pass RemapUV
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
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_RemapUV();
|
||||
}
|
||||
|
||||
pass Revelio
|
||||
{
|
||||
SetRasterizerState(RS_Default);
|
||||
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_Revelio();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 568 B |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
@@ -239,10 +239,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\NoMountIcon.h" />
|
||||
<ClInclude Include="..\Public\Player.h" />
|
||||
<ClInclude Include="..\public\Potion.h" />
|
||||
<ClInclude Include="..\public\Slot_Number.h" />
|
||||
<ClInclude Include="..\public\Spell_Slot_Preview.h" />
|
||||
<ClInclude Include="..\public\Spell_UI.h" />
|
||||
<ClInclude Include="..\Public\State_Combat.h" />
|
||||
<ClInclude Include="..\Public\State_Dodge.h" />
|
||||
<ClInclude Include="..\Public\State_Idle.h" />
|
||||
@@ -370,10 +372,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\NoMountIcon.cpp" />
|
||||
<ClCompile Include="..\Private\Player.cpp" />
|
||||
<ClCompile Include="..\private\Potion.cpp" />
|
||||
<ClCompile Include="..\private\Slot_Number.cpp" />
|
||||
<ClCompile Include="..\private\Spell_Slot_Preview.cpp" />
|
||||
<ClCompile Include="..\private\Spell_UI.cpp" />
|
||||
<ClCompile Include="..\Private\State_Combat.cpp" />
|
||||
<ClCompile Include="..\Private\State_Dodge.cpp" />
|
||||
<ClCompile Include="..\Private\State_Idle.cpp" />
|
||||
|
||||
@@ -361,6 +361,12 @@
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Action_Panel\Magic_Icon">
|
||||
<UniqueIdentifier>{4967d007-a0d8-4d57-b259-7bb47b5cf9ea}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\GamePlay_Canvas\Action_Panel\Spell_UI">
|
||||
<UniqueIdentifier>{d3738a31-9700-478a-9c93-3d35ae9012b5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\GamePlay_Canvas\MiniMap_Panel\NoMountIcon">
|
||||
<UniqueIdentifier>{93ae1d33-fb58-4793-9e7e-5b8d27e163d1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -708,6 +714,12 @@
|
||||
<ClInclude Include="..\public\Magic_Icon.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Magic_Icon</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\NoMountIcon.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\MiniMap_Panel\NoMountIcon</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Spell_UI.h">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Spell_UI</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -1048,6 +1060,12 @@
|
||||
<ClCompile Include="..\private\Magic_Icon.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Magic_Icon</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\NoMountIcon.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\MiniMap_Panel\NoMountIcon</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Spell_UI.cpp">
|
||||
<Filter>50.UI\GamePlay_Canvas\Action_Panel\Spell_UI</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "HpBarBG.h"
|
||||
#include "Magic_Meter.h"
|
||||
#include "Magic_Icon.h"
|
||||
#include "Spell_UI.h"
|
||||
|
||||
CAction_Panel::CAction_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
@@ -28,10 +29,11 @@ HRESULT CAction_Panel::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 1515.f;
|
||||
Desc.fX = 1150.f;
|
||||
Desc.fY = 850.f;
|
||||
Desc.fSizeX = 700.f;
|
||||
Desc.fSizeY = 400.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) };
|
||||
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
@@ -47,8 +49,11 @@ HRESULT CAction_Panel::Initialize(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_bVisible = true;
|
||||
m_bActive = true;
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 3.f;
|
||||
m_fOwnerAlpha = 1.f;
|
||||
m_fCanvasAlpha = 1.f;
|
||||
Magic_Meter_UV();
|
||||
Magic_Meter_Visible(1, true);
|
||||
Magic_Meter_Visible(5, true);
|
||||
@@ -70,7 +75,7 @@ void CAction_Panel::Update(_float fTimeDelta)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Matic_Meter_Move();
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
@@ -84,6 +89,7 @@ void CAction_Panel::Late_Update(_float fTimeDelta)
|
||||
}
|
||||
|
||||
if (m_bVisible) {
|
||||
//m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
@@ -95,7 +101,7 @@ HRESULT CAction_Panel::Render()
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::ALPHABLEND)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
@@ -152,7 +158,7 @@ void CAction_Panel::Magic_Meter_UV()
|
||||
|
||||
for (_uint i = 0; i < 5; ++i)
|
||||
{
|
||||
m_vMagic_MeterUV[i].x = 190.f - (55.f * i);
|
||||
m_vMagic_MeterUV[i].x = 570.f - (55.f * i);
|
||||
m_vMagic_MeterUV[i].y = 145.f;
|
||||
}
|
||||
}
|
||||
@@ -186,11 +192,56 @@ void CAction_Panel::Matic_Meter_Move()
|
||||
|
||||
HRESULT CAction_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 CAction_Panel::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(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<CComponent**>(&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;
|
||||
}
|
||||
|
||||
@@ -253,6 +304,11 @@ HRESULT CAction_Panel::Ready_Element(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Magic_Icon"), m_pMagic_Icon);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_UI>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_UI**>(&m_pSpell_UI))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_UI"), m_pSpell_UI);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ HRESULT CHpBarBG::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 220.f;
|
||||
Desc.fX = 600.f;
|
||||
Desc.fY = 180.f;
|
||||
Desc.fSizeX = 144.f;
|
||||
Desc.fSizeY = 24.f;
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include "Active_Icon.h"
|
||||
|
||||
#include "MiniMap_Panel.h"
|
||||
#include "NoMountIcon.h"
|
||||
|
||||
#include "Loading_Panel.h"
|
||||
#include "LoadingWidget.h"
|
||||
@@ -61,6 +62,7 @@
|
||||
#include "Potion.h"
|
||||
#include "Magic_Meter.h"
|
||||
#include "Magic_Icon.h"
|
||||
#include "Spell_UI.h"
|
||||
|
||||
#include "IMGUIUI.h"
|
||||
|
||||
@@ -357,6 +359,21 @@ HRESULT CLoader::Loading_For_UI()
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
Asset_FileLoad("../Bin/Resources/Textures/HUD", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(ENUM_CLASS(LEVEL::UI), wstrFileName,
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, wstrFilePath.c_str(), 0)))) {
|
||||
return E_FAIL;
|
||||
@@ -541,11 +558,14 @@ HRESULT CLoader::Loading_For_UI()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CMiniMap_TrimBorder>(g_iStaticLevel, CMiniMap_TrimBorder::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CNoMountIcon>(g_iStaticLevel, CNoMountIcon::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CAction_Panel>(g_iStaticLevel, CAction_Panel::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
@@ -584,6 +604,10 @@ HRESULT CLoader::Loading_For_UI()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpell_UI>(g_iStaticLevel, CSpell_UI::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CIMGUIUI>(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ HRESULT CMagic_Icon::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 250.f;
|
||||
Desc.fX = 630.f;
|
||||
Desc.fY = 125.f;
|
||||
Desc.fSizeX = 65.f;
|
||||
Desc.fSizeY = 65.f;
|
||||
@@ -84,16 +84,6 @@ void CMagic_Icon::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_bLerpOn == true)
|
||||
{
|
||||
Start_Lerp(fTimeDelta);
|
||||
}
|
||||
|
||||
if (m_bLerpOff == true)
|
||||
{
|
||||
Reset_Pos(fTimeDelta);
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "MiniMap_Panel.h"
|
||||
#include "GameInstance.h"
|
||||
#include "MiniMap_TrimBorder.h"
|
||||
#include "NoMountIcon.h"
|
||||
|
||||
CMiniMap_Panel::CMiniMap_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
@@ -100,6 +101,11 @@ HRESULT CMiniMap_Panel::Ready_Element(void* pArg)
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("MiniMap_TrimBorder"), m_pMiniMap_TrimBorder);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CNoMountIcon>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast <CNoMountIcon**>(&m_pNoMountIcon))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("NoMountIcon"), m_pNoMountIcon);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ HRESULT CMission_Key::Initialize(void* pArg)
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 3.f;
|
||||
AlphabetUV('V');
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -82,7 +83,6 @@ void CMission_Key::Update(_float fTimeDelta)
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
@@ -104,7 +104,7 @@ HRESULT CMission_Key::Render()
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::REMOVEUV)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
@@ -122,6 +122,32 @@ _vector CMission_Key::Get_WorldPostion()
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
_float4 CMission_Key::AlphabetUV(_tchar Alphabet)
|
||||
{
|
||||
_uint Number = CMyTools::AlphabetToInt(Alphabet);
|
||||
|
||||
_float2 fIamge_Size = { 320.f, 384.f };
|
||||
|
||||
_uint iXCount = 5;
|
||||
_uint iYCount = 6;
|
||||
|
||||
_float frameWidth = 64.f;
|
||||
_float frameHeight = 64.f;
|
||||
|
||||
_uint frameX = Number % iXCount;
|
||||
_uint frameY = Number / iXCount;
|
||||
|
||||
_float2 UVStart;
|
||||
UVStart.x = frameX * frameWidth / fIamge_Size.x;
|
||||
UVStart.y = frameY * frameHeight / fIamge_Size.y;
|
||||
|
||||
_float2 UVEnd;
|
||||
UVEnd.x = UVStart.x + (frameWidth / fIamge_Size.x);
|
||||
UVEnd.y = UVStart.y + (frameHeight / fIamge_Size.y);
|
||||
|
||||
return m_vUV = _float4(UVStart.x, UVStart.y, UVEnd.x, UVEnd.y);
|
||||
}
|
||||
|
||||
HRESULT CMission_Key::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
@@ -160,6 +186,10 @@ HRESULT CMission_Key::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fImageUV", &m_vUV, sizeof(_float4))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -169,7 +199,7 @@ HRESULT CMission_Key::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Keyboard_V"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Keyboard"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -97,27 +97,6 @@ HRESULT CMission_Panel::Bind_ShaderResources()
|
||||
|
||||
HRESULT CMission_Panel::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMission_KeyHold>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMission_KeyHold**>(&m_pMission_KeyHold))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMission_Key>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMission_Key**>(&m_pMission_Key))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CActive_Icon>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CActive_Icon**>(&m_pActive_Icon))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMissionBanner_Key>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CMissionBanner_Key**>(&m_pMissionBanner_Key))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
#include "pch.h"
|
||||
#include "NoMountIcon.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CNoMountIcon::CNoMountIcon(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CNoMountIcon::CNoMountIcon(const CNoMountIcon& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CNoMountIcon::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CNoMountIcon::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 100.f;
|
||||
Desc.fY = -55;
|
||||
Desc.fSizeX = 50.f;
|
||||
Desc.fSizeY = 50.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 0.7f;
|
||||
m_fAlphaTime = 3.f;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CNoMountIcon::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CNoMountIcon::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 7.f)
|
||||
m_fAlpha += fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha >= 7.f)
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_fAlpha = 7.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;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CNoMountIcon::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CNoMountIcon::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 CNoMountIcon::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
HRESULT CNoMountIcon::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ViewMatrix", &m_ViewMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_Matrix("g_ProjMatrix", &m_ProjMatrix)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fFar", m_pGameInstance->Get_CurrentCameraFar(), sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fTime", &m_fTime, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fAlpha", &m_fAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fOwnerAlpha", &m_fOwnerAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_fCanvasAlpha", &m_fCanvasAlpha, sizeof(_float))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CNoMountIcon::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_UI_T_NoMountIcon"), reinterpret_cast<CComponent**>(&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;
|
||||
}
|
||||
|
||||
CNoMountIcon* CNoMountIcon::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CNoMountIcon* pInstance = new CNoMountIcon(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CNoMountIcon");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CNoMountIcon::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CNoMountIcon* pInstance = new CNoMountIcon(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CNoMountIcon");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CNoMountIcon::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CNoMountIcon::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -44,7 +44,7 @@ HRESULT CSlot_Number::Initialize(void* pArg)
|
||||
m_iCols = 4;
|
||||
UV();
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-30.f, 30.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Pos(350.f, 30.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_pVIBufferCom->Set_ImageUV(pUVDesc);
|
||||
return S_OK;
|
||||
|
||||
@@ -21,7 +21,7 @@ HRESULT CSpell_Image::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = -1.f;
|
||||
Desc.fX = 380.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 100.f;
|
||||
Desc.fSizeY = 100.f;
|
||||
|
||||
@@ -21,7 +21,7 @@ HRESULT CSpell_Overlay::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = -1.f;
|
||||
Desc.fX = 380.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 100.f;
|
||||
Desc.fSizeY = 100.f;
|
||||
|
||||
@@ -45,7 +45,7 @@ HRESULT CSpell_Slot::Initialize(void* pArg)
|
||||
m_fOffSetY = 101.f;
|
||||
m_iCols = 4;
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(0.f, 0.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Pos(380.f, 0.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_pVIBufferCom->Set_ImageUV();
|
||||
return S_OK;
|
||||
|
||||
@@ -0,0 +1,307 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_UI.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CSpell_UI::CSpell_UI(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CSpell_UI::CSpell_UI(const CSpell_UI& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CSpell_UI::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_UI::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 650.f;
|
||||
Desc.fY = -90.f;
|
||||
Desc.fSizeX = 180.f;
|
||||
Desc.fSizeY = 50.f;
|
||||
|
||||
m_pRect = { long(Desc.fX - Desc.fSizeX * 0.5f), long(Desc.fY - Desc.fSizeY * 0.5f), long(Desc.fX + Desc.fSizeX * 0.5f), long(Desc.fY + Desc.fSizeY * 0.5f) };
|
||||
|
||||
if (FAILED(__super::Initialize(&Desc)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Components(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 3.f;
|
||||
//m_vImageUV[0] = Image_UV(0);
|
||||
//m_vImageUV[1] = Alphabet_UV('R');
|
||||
//m_vImageUV[2] = Image_UV(1);
|
||||
//m_vImageUV[3] = Alphabet_UV('T');
|
||||
Set_ImagePos();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_float4 CSpell_UI::Alphabet_UV(_tchar Alphabet)
|
||||
{
|
||||
_uint Number = CMyTools::AlphabetToInt(Alphabet);
|
||||
|
||||
_float2 fIamge_Size = { 320.f, 384.f };
|
||||
|
||||
_uint iXCount = 5;
|
||||
_uint iYCount = 6;
|
||||
|
||||
_float frameWidth = 64.f;
|
||||
_float frameHeight = 64.f;
|
||||
|
||||
_uint frameX = Number % iXCount;
|
||||
_uint frameY = Number / iXCount;
|
||||
|
||||
_float2 UVStart;
|
||||
UVStart.x = frameX * frameWidth / fIamge_Size.x;
|
||||
UVStart.y = frameY * frameHeight / fIamge_Size.y;
|
||||
|
||||
_float2 UVEnd;
|
||||
UVEnd.x = UVStart.x + (frameWidth / fIamge_Size.x);
|
||||
UVEnd.y = UVStart.y + (frameHeight / fIamge_Size.y);
|
||||
|
||||
_float4 UV{};
|
||||
|
||||
return UV = _float4(UVStart.x, UVStart.y, UVEnd.x, UVEnd.y);
|
||||
}
|
||||
|
||||
_float4 CSpell_UI::Image_UV(_uint Index)
|
||||
{
|
||||
_float2 fIamge_Size = { 256.f, 128.f };
|
||||
|
||||
_uint iXCount = 2;
|
||||
_uint iYCount = 1;
|
||||
|
||||
_float frameWidth = 128.f;
|
||||
_float frameHeight = 128.f;
|
||||
|
||||
_uint frameX = Index % iXCount;
|
||||
_uint frameY = Index / iXCount;
|
||||
|
||||
_float2 UVStart;
|
||||
UVStart.x = frameX * frameWidth / fIamge_Size.x;
|
||||
UVStart.y = frameY * frameHeight / fIamge_Size.y;
|
||||
|
||||
_float2 UVEnd;
|
||||
UVEnd.x = UVStart.x + (frameWidth / fIamge_Size.x);
|
||||
UVEnd.y = UVStart.y + (frameHeight / fIamge_Size.y);
|
||||
|
||||
_float4 UV{};
|
||||
|
||||
return UV = _float4(UVStart.x, UVStart.y, UVEnd.x, UVEnd.y);
|
||||
}
|
||||
|
||||
void CSpell_UI::Set_ImagePos()
|
||||
{
|
||||
m_vUV[0] = _float2(16,25);
|
||||
m_vUV[1] = _float2(42,25);
|
||||
m_vUV[2] = _float2(138,25);
|
||||
m_vUV[3] = _float2(164,25);
|
||||
}
|
||||
|
||||
void CSpell_UI::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_UI::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_UI::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (__super::Chack_Visible())
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpell_UI::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Begin(ENUM_CLASS(SHADER_PASS_UIEDITOR::DEFAULT)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Bind_Resources())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
_vector CSpell_UI::Get_WorldPostion()
|
||||
{
|
||||
return m_pOwner->Get_WorldPostion();
|
||||
}
|
||||
|
||||
HRESULT CSpell_UI::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_fPosition", m_vUV, sizeof(m_vUV))))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pShaderCom->Bind_RawValue("g_fImagesUV", m_vImageUV, sizeof(m_vImageUV))))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_UI::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Component<CVIBuffer_Rect>(g_iStaticLevel, &m_pVIBufferCom)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Revelio_SpellSelectionGridIcon"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Revelio_SpellSelectionGridIcon"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom1), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Keyboard"), reinterpret_cast<CComponent**>(&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;
|
||||
}
|
||||
|
||||
CSpell_UI* CSpell_UI::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CSpell_UI* pInstance = new CSpell_UI(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CSpell_UI");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CSpell_UI::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CSpell_UI* pInstance = new CSpell_UI(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSpell_UI");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CSpell_UI::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 CSpell_UI::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -49,6 +49,7 @@ class CAction_Panel final : public CPanelObject
|
||||
CGameObject* m_pMagic_Meter4 = { nullptr };
|
||||
CGameObject* m_pMagic_Meter5 = { nullptr };
|
||||
CGameObject* m_pMagic_Icon = { nullptr };
|
||||
CGameObject* m_pSpell_UI = { nullptr };
|
||||
public:
|
||||
static CAction_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Editor
|
||||
enum class SHADER_PASS_PARTICLE { EXPLOSION, END };
|
||||
enum class SHADER_PASS_POSTEX { DEFAULT, SCISSOR, UI, UVMOVE, TRAIL, END };
|
||||
enum class SHADER_PASS_INSTANCE_MODEL { DEFAULT, NON_NOMALMAP, BLUR, END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, SPELLTYPE, HPBAR, MAGIC_METER, MAGIC_ICON, END };
|
||||
enum class SHADER_PASS_UIEDITOR { DEFAULT, ALPHABLEND, CLAMP, CURSOR, LODING, HOLD_ROTATION, MISSION, QUESTYPE, UVMULT, NINECLICE, ROTATION, SLOT, SPELLTYPE, HPBAR, MAGIC_METER, MAGIC_ICON, REMOVEUV,END };
|
||||
enum class SHADER_PASS_UIINTANCE { DEFAULT, ALPHABLEND, MAGIC_METER, END };
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "PanelObject.h"
|
||||
@@ -35,6 +35,7 @@ class CMiniMap_Panel final : public CPanelObject
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CGameObject* m_pMiniMap_TrimBorder = { nullptr };
|
||||
CGameObject* m_pNoMountIcon = { nullptr };
|
||||
|
||||
|
||||
public:
|
||||
@@ -44,4 +45,4 @@ class CMiniMap_Panel final : public CPanelObject
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
@@ -20,6 +20,9 @@ class CMission_Key final : public CElementObject
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
|
||||
private:
|
||||
_float4 AlphabetUV(_tchar Alphabet);
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
@@ -31,7 +34,7 @@ class CMission_Key final : public CElementObject
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
|
||||
_float4 m_vUV{};
|
||||
public:
|
||||
static CMission_Key* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
@@ -39,4 +42,4 @@ class CMission_Key final : public CElementObject
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
NS_END
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CNoMountIcon final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CNoMountIcon(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CNoMountIcon(const CNoMountIcon& rhs);
|
||||
virtual ~CNoMountIcon() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
|
||||
public:
|
||||
static CNoMountIcon* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CSpell_UI final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CSpell_UI(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpell_UI(const CSpell_UI& rhs);
|
||||
virtual ~CSpell_UI() = default;
|
||||
|
||||
public:
|
||||
virtual void Priority_Update(_float fTimeDelta);
|
||||
virtual void Update(_float fTimeDelta);
|
||||
virtual void Late_Update(_float fTimeDelta);
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
_float4 Alphabet_UV(_tchar Alphabet);
|
||||
_float4 Image_UV(_uint Index);
|
||||
void Set_ImagePos();
|
||||
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 };
|
||||
|
||||
_float2 m_vUV[4];
|
||||
_float4 m_vImageUV[4];
|
||||
|
||||
public:
|
||||
static CSpell_UI* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -201,6 +201,16 @@ class CMyTools {
|
||||
|
||||
return fDiffAngle * (fCross < 0 ? -1.f : 1.f);
|
||||
}
|
||||
|
||||
inline static _uint AlphabetToInt(_tchar Alphabet)
|
||||
{
|
||||
Alphabet = towupper(Alphabet);
|
||||
|
||||
if (Alphabet < 'A' || Alphabet > 'Z')
|
||||
return 0;
|
||||
|
||||
return (Alphabet - 'A');
|
||||
}
|
||||
#pragma endregion
|
||||
#pragma region FileSystem
|
||||
//static void Folder_Func(/* 재귀적으로 탐색할지 */ _In_ _bool bRecursive,
|
||||
|
||||