[Add] 영상 마우스 올린거로 바뀌게 애매함
This commit is contained in:
@@ -21,7 +21,9 @@ namespace Client
|
||||
_uint iSpell_ID{};
|
||||
_wstring pSpell_Name;
|
||||
_uint iSpell_Type{};
|
||||
_uint iSpell_CoolTime{};
|
||||
_uint iSkill_Type{};
|
||||
_float fSpell_CoolTime{};
|
||||
_float fDuration{};
|
||||
_uint iAnimNum{};
|
||||
_wstring pSpellInfo;
|
||||
_bool bSpell_Lock = false;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<SpellInfo>
|
||||
<Spell Spell_ID="0" Spell_Name="아레스토 모멘텀" Image_Name="Arresto_Momentum" Spell_Type="0" Skill_Type="0" Spell_Cooltime="15" Duration="15" AnimNum="120" SpellInfo="적과 대상의 속도를 모두 늦춰, 다음 행동을 생각할 시간을 벌 수 있습니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="1" Spell_Name="글래시우스" Image_Name="Glacius" Spell_Type="0" Skill_Type="1" Spell_Cooltime="10" Duration="10" AnimNum="156" SpellInfo="적을 얼려서 후속 공격 시 대미지를 증가시킵니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="2" Spell_Name="레비오소" Image_Name="Levioso" Spell_Type="0" Skill_Type="2" Spell_Cooltime="8" Duration="8" AnimNum="180" SpellInfo="물건과 적을 공중에 띄웁니다. 퍼즐을 풀거나 적을 놀라게 할 때 유용합니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="3" Spell_Name="변신" Image_Name="Transformation" Spell_Type="0" Skill_Type="3" Spell_Cooltime="20" Duration="15" AnimNum="146" SpellInfo="물건과 적의 형태를 바꿉니다. 퍼즐을 풀 때도 사용할 수 있고 무해한 장식품에도 사용할 수 있습니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="4" Spell_Name="아씨오" Image_Name="Accio" Spell_Type="1" Skill_Type="4" Spell_Cooltime="8" Duration="0" AnimNum="151" SpellInfo="다양한 물체나 적을 근처로 당기는 소환 마법입니다 특정 무거운 마법 물체를 가까이 당기려면 지속적인 노력이 더 요구되기도 합니다. 일단 물체를 소환하면 버튼을 입력하지 않고도 자동으로 윙가디움 레비오사가 시전되어 계속 공중에 띄울 수 있습니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="5" Spell_Name="디펄소" Image_Name="Depulso" Spell_Type="1" Skill_Type="5" Spell_Cooltime="10" Duration="0" AnimNum="152" SpellInfo="여러 가지 물건과 적을 상당히 강력한 힘으로 밀어냅니다. 적에게 직접 대미지를 주지는 않지만, 적과 물체를 서로 부딪치게 해서 큰 대미지를 줄 수 있습니다. 또한 물건을 밀거나 회전시켜서 다양한 목적을 달성할 때 유리합니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="6" Spell_Name="디센도" Image_Name="Descendo" Spell_Type="1" Skill_Type="6" Spell_Cooltime="10" Duration="0" AnimNum="155" SpellInfo="직접 대미지를 주지는 않지만 , 물건과 적을 바닥에 세게 떨어뜨리면 매우 겅력한 대미지를 줄 수 있습니다. 공중에 뜬 적을 떨어뜨리면 훨씬 더 강력한 대미지를 줍니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="7" Spell_Name="플리펜도" Image_Name="Flipendo" Spell_Type="1" Skill_Type="7" Spell_Cooltime="5" Duration="0" AnimNum="188" SpellInfo="물건과 적을 들어올려 거꾸로 뒤집을 수 있습니다. 쿨다운 시간이 짧아서, 공중 콤보를 시작하거나 계속 이어 나갈 때 유용한 주문입니다. 물건을 즉시 뒤집어서 퍼즐을 풀거나 특정한 적의 약점을 이용할 때도 유용합니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="8" Spell_Name="콘프링고" Image_Name="Confringo" Spell_Type="2" Skill_Type="8" Spell_Cooltime="10" Duration="0" AnimNum="157" SpellInfo="장거리 볼트로 적중 시 대미지를 줍니다. 불 기반 공격을 받는 적은 몇 초 동안 계속 대미지를 입습니다. 그리고 대미지를 입는 동안 적과 충돌하면 화염이 폭발합니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="9" Spell_Name="디핀도" Image_Name="Diffindo" Spell_Type="2" Skill_Type="9" Spell_Cooltime="15" Duration="0" AnimNum="150" SpellInfo="멀리 떨어진 물건과 적을 베어 강력한 대미지를 줍니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="10" Spell_Name="엑스펠리아르무스" Image_Name="Expelliarmus" Spell_Type="2" Skill_Type="10" Spell_Cooltime="10" Duration="0" AnimNum="146" SpellInfo="지팡이와 무기를 휘두르는 적을 무장해제시킵니다. 그리고 모든 적에게 대미지를 입힙니다. 무기가 없는 적에게도 대미지를 줄 수 있습니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="11" Spell_Name="봄바르다" Image_Name="Bombarda" Spell_Type="2" Skill_Type="11" Spell_Cooltime="15" Duration="0" AnimNum="262" SpellInfo="적중 시 큰 대미지를 주며, 동시에 폭발하여 대형 장애물을 부수고 주변 적에 대미지르 줍니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="12" Spell_Name="인센디오" Image_Name="Incendio" Spell_Type="2" Skill_Type="12" Spell_Cooltime="8" Duration="0" AnimNum="213" SpellInfo="단거리 공격으로 목표물과 거리가 가까울 때만 사용할 수 있습니다. 이 주문을 외우면 대상은 매우 강력한 대미지를 입고, 특정 물체에 사용하면 불을 붙일 수 있습니다. 불을 이용한 공격으로 공격을 받은 적은 몇 초 동안 계속 대미지를 받습니다. 그리고 대미지를 입는 공안 적과 충돌하면 화염이 폭발합니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="13" Spell_Name="투영" Image_Name="Disillusionment" Spell_Type="3" Skill_Type="13" Spell_Cooltime="0.5" Duration="0" AnimNum="260" SpellInfo="주변 환경에 녹아들어 남들이 알봐보기 어렵게 만듭니다. 적들에게 들키지 않고 몰래 접근해, 페트리피쿠스 토탈루스를 시전하려고 할 때 아주 유용합니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="14" Spell_Name="루모스" Image_Name="Lumos" Spell_Type="3" Skill_Type="14" Spell_Cooltime="0.5" Duration="0" AnimNum="365" SpellInfo="어두운 곳을 환하게 밝히거나, 퍼즐에서 추가 조명이 필요할 때 사용합니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="15" Spell_Name="레파로" Image_Name="Reparo" Spell_Type="3" Skill_Type="15" Spell_Cooltime="0.5" Duration="0" AnimNum="385" SpellInfo="손상된 특정 물체를 이전 상태로 신속하게 되돌릴 수 있습니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="16" Spell_Name="윙가디움 레비오사" Image_Name="Wingardium_Leviosa" Spell_Type="3" Skill_Type="16" Spell_Cooltime="0.5" Duration="5" AnimNum="273" SpellInfo="이동 가능한 물체를 공중에 띄워 움직입니다. 움직임으로 물체의 위치를 조절하고, F V Q E로 물체의 거리를 조절하거나 회전시킬 수 있습니다. 윙가디움 레비오사는 아씨오로 소환된 물체에 자동으로 시전됩니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="17" Spell_Name="구현 마법" Image_Name="Conjuring_Spell" Spell_Type="4" Skill_Type="17" Spell_Cooltime="0" Duration="0" AnimNum="115" SpellInfo="필요의 방에서 시전하면 물체를 나타나게 할 수 있습니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="18" Spell_Name="개조 마법" Image_Name="Altering_Spell" Spell_Type="4" Skill_Type="18" Spell_Cooltime="0" Duration="0" AnimNum="349" SpellInfo="필요의 방에서 시전하면 물체의 물리적 형태와 특성을 바꿉니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="19" Spell_Name="에바네스코" Image_Name="Evanesco" Spell_Type="4" Skill_Type="19" Spell_Cooltime="0" Duration="0" AnimNum="136" SpellInfo="필요한 방에서 시전하면 물체를 사라지게 하고 월장석이 반환됩니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="20" Spell_Name="아바다 케다브라" Image_Name="Avada_Kedavra" Spell_Type="5" Skill_Type="20" Spell_Cooltime="90" Duration="0" AnimNum="208" SpellInfo="적을 즉시 처치합니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="21" Spell_Name="크루시오" Image_Name="Crucio" Spell_Type="5" Skill_Type="21" Spell_Cooltime="20" Duration="20" AnimNum="216" SpellInfo="시간이 소요되는 대미지를 주기에 대부분의 적이 고통에 몸서리칩니다. 또한 저주를 받은 적은 추가 대미지를 받습니다.." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="22" Spell_Name="임페리오" Image_Name="Imperio" Spell_Type="5" Skill_Type="22" Spell_Cooltime="30" Duration="20" AnimNum="462" SpellInfo="일시적으로 적을 동료처럼 변화시켜 싸우게 합니다. 주문이 걸리 ㄴ동안 동료로 바뀐 적은 다른 적들의 공격을 받았을 때 방어력이 높아지며 당신에게 충성합니다. 한편 적을 저주하면 그 적은 추가로 대미지를 받습니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="23" Spell_Name="마법 동물 쓰담기용 빗" Image_Name="Beast_Petting_Brush" Spell_Type="3" Skill_Type="23" Spell_Cooltime="0" Duration="0" AnimNum="327" SpellInfo="적마법 동물들을 빗질할 때 쓰는 빗입니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="24" Spell_Name="마법 동물 먹이" Image_Name="Beast_Feed" Spell_Type="3" Skill_Type="24" Spell_Cooltime="0" Duration="0" AnimNum="378" SpellInfo="마법 동물에게 줄 수 있는 먹이입니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="25" Spell_Name="포획 자루" Image_Name="Nab_Sack" Spell_Type="3" Skill_Type="25" Spell_Cooltime="0" Duration="0" AnimNum="235" SpellInfo="마법 동물을 구출하거나 잡을 수 있는 마법 자루입니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="26" Spell_Name="기본 주문" Image_Name="Basic_cast" Spell_Type="6" Skill_Type="26" Spell_Cooltime="0" Duration="0" AnimNum="308" SpellInfo="적과 사물에게 가벼운 대미지를 줍니다. 시전하려면 을 탭하세요." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="27" Spell_Name="레벨리오" Image_Name="Revelio" Spell_Type="6" Skill_Type="27" Spell_Cooltime="0" Duration="0" AnimNum="227" SpellInfo="숨겨진 물건, 퍼즐 아이템, 전리품, 적 등을 모두 포함해 유용하거나 상호작용할 수 있는 다양한 대상을 강조 표시합니다. 로 시전합니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="28" Spell_Name="프로테고" Image_Name="Protego" Spell_Type="6" Skill_Type="28" Spell_Cooltime="0" Duration="0" AnimNum="285" SpellInfo="주문, 무기 등 여러 가지 공격으로부터 보호합니다. 공격이 닿기 직전까지 기다렸다가 로 시전하면 프로테고를 완벽하게 시전할 수 있습니다. 근접 공격자에게는 대미지를 주고, 공격을 반사시켜 적의 방어력을 부술 수도 있습니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="29" Spell_Name="스투페파이" Image_Name="Stupefy" Spell_Type="6" Skill_Type="29" Spell_Cooltime="0" Duration="0" AnimNum="222" SpellInfo="적을 기절시키고 다음 주문을 걸기 쉬운 상태로 만듭니다. 큰 대미지는 아니지만 기절한 적을 추가 대미지를 받고, 이는 금속 숫자로 표시됩니다. 또한 방어벽 마법도 부술 수 있습니다.(난이도 '어려움' 제외) 다가오는 공격에 프로테고로 성공적인 공격을 방어할 , 을 계속 길게 눌러 원하는 적에게 스투페파이 카운터 공격을 사용하세요" Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="30" Spell_Name="고대 마법 던지기" Image_Name="Ancient_Magic_Throw" Spell_Type="6" Skill_Type="30" Spell_Cooltime="0" Duration="0" AnimNum="89" SpellInfo="목표하는 적에게 주변에 있는 물체를 소환하여 던집니다. 적의 방어벽 마법을 무너뜨리는 데 특히 유용합니다. 물체 위에 표시가 떳을 때 로 시전할 수 있습니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="31" Spell_Name="고대 마법" Image_Name="Ancient_magic" Spell_Type="6" Skill_Type="31" Spell_Cooltime="0" Duration="0" AnimNum="152" SpellInfo="고대 마법 MP가 한 부분이라도 가득 차 있으면, 엄청난 대미지를 주고 방어벽 마버을 부수는 강력한 고대 마법을 시전할 수 있게 됩니다. 적의 머리 위에 표시가 나타나면 로 시전하세요" Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="32" Spell_Name="알로호모라" Image_Name="Alohomora" Spell_Type="6" Skill_Type="32" Spell_Cooltime="0" Duration="0" AnimNum="394" SpellInfo="마법 세계 전역에 잠겨 있는 다양한 방이나 장소를 열 수 있지만 제대로 시전하기 위해선 마법 실력이 바탕이 되어야 합니다, 자물쇠 근처에서 로 시전할 수 있습니다." Spell_Lock="0" Equip_Spell="0"/>
|
||||
<Spell Spell_ID="33" Spell_Name="페트리피쿠스 토탈루스" Image_Name="Petrificus_Totalus" Spell_Type="6" Skill_Type="33" Spell_Cooltime="0" Duration="0" AnimNum="275" SpellInfo="대부분의 적을 쓰러뜨릴 만큼 강력한 주문이지만 더 위험한 적들은 약간의 대미지를 입힐 뿐, 빠르게 그 영향에서 벗어날 수 있습니다. 이 주문을들키지 않게 적에게 몰래 접근한 후 를 누르면 시전됩니다.." Spell_Lock="0" Equip_Spell="0"/>
|
||||
</SpellInfo>
|
||||
@@ -43,7 +43,7 @@ VS_OUT VS_MAIN(VS_IN In)
|
||||
|
||||
matrix matVP = mul(g_ViewMatrix, g_ProjMatrix);
|
||||
float3 vLocalPos = In.vPosition;
|
||||
if (In.bHover != 0)
|
||||
if (In.bHover == 1)
|
||||
vLocalPos.xy *= In.vSize * 1.1f;
|
||||
else
|
||||
vLocalPos.xy *= In.vSize;
|
||||
@@ -274,7 +274,7 @@ PS_OUT PS_Spell_Effect(PS_IN In)
|
||||
//float angle = -g_fTime;
|
||||
//float s = sin(angle);
|
||||
//float c = cos(angle);
|
||||
//float2 rotUV = float2(
|
||||
//float2 maskUV = float2(
|
||||
//uv.x * c - uv.y * s,
|
||||
//uv.x * s + uv.y * c
|
||||
//) + center;
|
||||
|
||||
@@ -166,6 +166,7 @@
|
||||
<ClInclude Include="..\Public\Action_Panel.h" />
|
||||
<ClInclude Include="..\public\AlphaMap.h" />
|
||||
<ClInclude Include="..\Public\Body.h" />
|
||||
<ClInclude Include="..\public\Current_Slot_Number.h" />
|
||||
<ClInclude Include="..\public\Current_Spell_Slot.h" />
|
||||
<ClInclude Include="..\Public\Decendo.h" />
|
||||
<ClInclude Include="..\Public\Broom.h" />
|
||||
@@ -260,6 +261,7 @@
|
||||
<ClInclude Include="..\public\Spell_Anim.h" />
|
||||
<ClInclude Include="..\public\Spell_Canvas.h" />
|
||||
<ClInclude Include="..\public\Spell_Data.h" />
|
||||
<ClInclude Include="..\public\Spell_Drag.h" />
|
||||
<ClInclude Include="..\public\Spell_Header.h" />
|
||||
<ClInclude Include="..\public\Spell_Header_Line.h" />
|
||||
<ClInclude Include="..\public\Spell_Hover.h" />
|
||||
@@ -322,6 +324,7 @@
|
||||
<ClCompile Include="..\Private\Action_Panel.cpp" />
|
||||
<ClCompile Include="..\private\AlphaMap.cpp" />
|
||||
<ClCompile Include="..\Private\Body.cpp" />
|
||||
<ClCompile Include="..\private\Current_Slot_Number.cpp" />
|
||||
<ClCompile Include="..\private\Current_Spell_Slot.cpp" />
|
||||
<ClCompile Include="..\Private\Decendo.cpp" />
|
||||
<ClCompile Include="..\Private\Broom.cpp" />
|
||||
@@ -418,6 +421,7 @@
|
||||
<ClCompile Include="..\private\Spell_Anim.cpp" />
|
||||
<ClCompile Include="..\private\Spell_Canvas.cpp" />
|
||||
<ClCompile Include="..\private\Spell_Data.cpp" />
|
||||
<ClCompile Include="..\private\Spell_Drag.cpp" />
|
||||
<ClCompile Include="..\Private\Spell_Header.cpp" />
|
||||
<ClCompile Include="..\private\Spell_Header_Line.cpp" />
|
||||
<ClCompile Include="..\private\Spell_Hover.cpp" />
|
||||
|
||||
@@ -436,12 +436,18 @@
|
||||
<Filter Include="02.GameObjects\Env\03.MapElement\Light">
|
||||
<UniqueIdentifier>{99652c97-4011-4d1f-84fb-7e6aa9f6ec1a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\Spell_Canvas\Spell_Panel\Spell_Anim">
|
||||
<UniqueIdentifier>{4aa98871-8d80-4757-b616-e96f4e840857}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\Spell_Data">
|
||||
<UniqueIdentifier>{3949bd3b-1686-43e3-822c-d3eabe41653e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\Spell_Canvas\Spell_Panel\Current_Slot_Number">
|
||||
<UniqueIdentifier>{2f8a3c68-c3d3-43cc-9649-16e0cfd168fa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\Spell_Canvas\Spell_Panel\Spell_Drag">
|
||||
<UniqueIdentifier>{dcc220a9-4649-4f95-9205-9eee9af128ec}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="50.UI\Spell_Canvas\Spell_Panel\Spell_Anim">
|
||||
<UniqueIdentifier>{4aa98871-8d80-4757-b616-e96f4e840857}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Editor.h">
|
||||
@@ -864,6 +870,12 @@
|
||||
<ClInclude Include="..\public\Spell_Data.h">
|
||||
<Filter>50.UI\Spell_Data</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Current_Slot_Number.h">
|
||||
<Filter>50.UI\Spell_Canvas\Spell_Panel\Current_Slot_Number</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\public\Spell_Drag.h">
|
||||
<Filter>50.UI\Spell_Canvas\Spell_Panel\Spell_Drag</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="Editor.ico">
|
||||
@@ -1285,6 +1297,12 @@
|
||||
<ClCompile Include="..\private\Spell_Data.cpp">
|
||||
<Filter>50.UI\Spell_Data</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Current_Slot_Number.cpp">
|
||||
<Filter>50.UI\Spell_Canvas\Spell_Panel\Current_Slot_Number</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\private\Spell_Drag.cpp">
|
||||
<Filter>50.UI\Spell_Canvas\Spell_Panel\Spell_Drag</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="Editor.rc">
|
||||
|
||||
@@ -0,0 +1,278 @@
|
||||
#include "pch.h"
|
||||
#include "Current_Slot_Number.h"
|
||||
#include "GameInstance.h"
|
||||
|
||||
CCurrent_Slot_Number::CCurrent_Slot_Number(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
{
|
||||
}
|
||||
|
||||
CCurrent_Slot_Number::CCurrent_Slot_Number(const CCurrent_Slot_Number& rhs)
|
||||
:CElementObject(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Slot_Number::Initialize_Prototype()
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Slot_Number::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 35.f;
|
||||
Desc.fSizeY = 35.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;
|
||||
m_fOffSetX = 105.f;
|
||||
m_fOffSetY = 101.f;
|
||||
m_iCols = 4;
|
||||
UV();
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-805.f, 380.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_pVIBufferCom->Set_ImageUV(pUVDesc);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::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;
|
||||
}
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible)
|
||||
{
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Slot_Number::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 CCurrent_Slot_Number::Get_WorldPostion()
|
||||
{
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::SizeUpX(_float fSizeX)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_pVIBufferCom->Set_SizeX(m_fSizeX);
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::SizeUpY(_float fSizeY)
|
||||
{
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_SizeY(m_fSizeY);
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
{
|
||||
m_fSizeX = fSizeX;
|
||||
m_fSizeY = fSizeY;
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
HRESULT CCurrent_Slot_Number::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 CCurrent_Slot_Number::Ready_Components(void* pArg)
|
||||
{
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Prototype_Component_VIBuffer_Slot_Number_UI_Instance"), (CComponent**)&m_pVIBufferCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Atlas_Number"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, FX_UIINSTANCE, (CComponent**)&m_pShaderCom, nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::UV()
|
||||
{
|
||||
pUVDesc[0].fUV = Meter_Index(1);
|
||||
pUVDesc[1].fUV = Meter_Index(2);
|
||||
pUVDesc[2].fUV = Meter_Index(3);
|
||||
pUVDesc[3].fUV = Meter_Index(4);
|
||||
}
|
||||
|
||||
_float4 CCurrent_Slot_Number::Meter_Index(_uint Number)
|
||||
{
|
||||
m_fIamge_Size = { 320.f, 128.f };
|
||||
|
||||
_uint iXCount = 5;
|
||||
_uint iYCount = 2;
|
||||
|
||||
_float frameWidth = 64.f;
|
||||
_float frameHeight = 64.f;
|
||||
|
||||
_uint frameX = Number % iXCount;
|
||||
_uint frameY = Number / iXCount;
|
||||
|
||||
_float4 UV;
|
||||
UV.x = frameX * frameWidth / m_fIamge_Size.x;
|
||||
UV.y = frameY * frameHeight / m_fIamge_Size.y;
|
||||
UV.z = UV.x + (frameWidth / m_fIamge_Size.x);
|
||||
UV.w = UV.y + (frameHeight / m_fIamge_Size.y);
|
||||
|
||||
return UV;
|
||||
}
|
||||
|
||||
CCurrent_Slot_Number* CCurrent_Slot_Number::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CCurrent_Slot_Number* pInstance = new CCurrent_Slot_Number(pDevice, pContext);
|
||||
|
||||
if (FAILED(pInstance->Initialize_Prototype()))
|
||||
{
|
||||
MSG_BOX("Failed to Created : CCurrent_Slot_Number");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
CGameObject* CCurrent_Slot_Number::Clone(void* pArg, CGameObject* pOwner)
|
||||
{
|
||||
CCurrent_Slot_Number* pInstance = new CCurrent_Slot_Number(*this);
|
||||
pInstance->m_pOwner = pOwner;
|
||||
if (FAILED(pInstance->Initialize(pArg)))
|
||||
{
|
||||
MSG_BOX("Failed to Cloned : CSlot_Number");
|
||||
SAFE_RELEASE(pInstance);
|
||||
}
|
||||
|
||||
return pInstance;
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
void CCurrent_Slot_Number::Describe_Entity()
|
||||
{
|
||||
}
|
||||
@@ -46,6 +46,8 @@ HRESULT CEessential_Spell_Slot::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-731.f, -300.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_fDelayTime = 0.5f;
|
||||
m_iPerSpell_Slot = -1;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -89,7 +91,7 @@ void CEessential_Spell_Slot::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
Hover();
|
||||
Hover(fTimeDelta);
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
@@ -154,7 +156,7 @@ void CEessential_Spell_Slot::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
void CEessential_Spell_Slot::Hover()
|
||||
void CEessential_Spell_Slot::Hover(_float fTimeDelta)
|
||||
{
|
||||
POINT ptMouse{};
|
||||
GetCursorPos(&ptMouse);
|
||||
@@ -167,25 +169,23 @@ void CEessential_Spell_Slot::Hover()
|
||||
fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0];
|
||||
fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1];
|
||||
|
||||
m_bPrevHover = m_bHover;
|
||||
m_bHover = (m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse));
|
||||
if (m_iSpellType != -1)
|
||||
|
||||
m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse);
|
||||
CUIObject::HOVER_INFO Info;
|
||||
Info.iSlotID = 1;
|
||||
if (m_iSpellType == -1)
|
||||
{
|
||||
m_bHover = true;
|
||||
if (m_bHover == true && m_bPrevHover == false)
|
||||
{
|
||||
m_iSpellType += ENUM_CLASS(SKILL_TYPE::JAP);
|
||||
static_cast<CUIObject*>(m_pOwner)->Set_SkillType(m_iSpellType);
|
||||
}
|
||||
Info.iHover_Index = -1;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Hover"), &Info);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
m_bHover = false;
|
||||
if (m_bHover == false && m_bPrevHover == true)
|
||||
{
|
||||
static_cast<CUIObject*>(m_pOwner)->Set_SkillType(m_iSpellType);
|
||||
}
|
||||
}
|
||||
Info.iHover_Index = m_iSpellType + ENUM_CLASS(SKILL_TYPE::JAP);
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Hover"), &Info);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "pch.h"
|
||||
#include "pch.h"
|
||||
#include "Level_UI.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Level_Loading.h"
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "IMGUIUI.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "Mouse_Cursor.h"
|
||||
#include "Spell_Data.h"
|
||||
|
||||
CLevel_UI::CLevel_UI(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, LEVEL eLevelID)
|
||||
: CLevel{ pDevice, pContext, ENUM_CLASS(eLevelID) }
|
||||
@@ -33,7 +34,7 @@ void CLevel_UI::Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CLevel_UI::Render()
|
||||
{
|
||||
SetWindowText(g_hWnd, TEXT("UI레벨입니다."));
|
||||
SetWindowText(g_hWnd, TEXT("UI레벨입니다."));
|
||||
GUI::ShowDemoWindow();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
#pragma region UI
|
||||
|
||||
#include "Spell_Data.h"
|
||||
|
||||
#include "GamePlay_Canvas.h"
|
||||
|
||||
#include "Mission_Panel.h"
|
||||
@@ -78,6 +80,7 @@
|
||||
#include "Spell_Header_Line.h"
|
||||
#include "Spell_Vidio_Border.h"
|
||||
#include "Spell_Anim.h"
|
||||
#include "Current_Slot_Number.h"
|
||||
|
||||
#include "IMGUIUI.h"
|
||||
|
||||
@@ -813,6 +816,11 @@ HRESULT CLoader::Loading_For_UI()
|
||||
m_strMessage = TEXT("Prototype Loading..");
|
||||
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CSpell_Data>(g_iStaticLevel, CSpell_Data::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CGamePlay_Canvas>(g_iStaticLevel, CGamePlay_Canvas::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
@@ -968,6 +976,10 @@ HRESULT CLoader::Loading_For_UI()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CCurrent_Slot_Number>(g_iStaticLevel, CCurrent_Slot_Number::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Prototype<CIMGUIUI>(g_iStaticLevel, CIMGUIUI::Create(m_pDevice, m_pContext))))
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@ HRESULT CSpell_Anim::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fX = 590.f;
|
||||
Desc.fY = -100.f;
|
||||
Desc.fSizeX = 470.f;
|
||||
Desc.fSizeY = 250.f;
|
||||
|
||||
@@ -38,23 +38,34 @@ HRESULT CSpell_Anim::Initialize(void* pArg)
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 3.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 9.f;
|
||||
m_fSortZ = 0.01f;
|
||||
m_iTotalFrames = 216;
|
||||
m_iTotalFrames = 120;
|
||||
m_fFrameTime = 0.1f;
|
||||
m_iCurrentFrame = 0;
|
||||
m_bAnim_Start = false;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Anim::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Anim::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
@@ -69,26 +80,20 @@ void CSpell_Anim::Update(_float fTimeDelta)
|
||||
|
||||
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_bFadeOut = false;
|
||||
m_fAlpha = 0.f;
|
||||
m_bAnim_Start = false;
|
||||
}
|
||||
|
||||
if (m_pGameInstance->Key_Down(DIK_9))
|
||||
{
|
||||
m_bAnim_Start = !m_bAnim_Start;
|
||||
}
|
||||
if (m_bAnim_Start)
|
||||
|
||||
if (m_bAnim_Start == true)
|
||||
{
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_iCurrentFrame = 0;
|
||||
}
|
||||
|
||||
if (m_fTime >= m_fFrameTime)
|
||||
{
|
||||
@@ -104,14 +109,20 @@ void CSpell_Anim::Update(_float fTimeDelta)
|
||||
|
||||
void CSpell_Anim::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
if (m_pDiffuse_TextureCom != nullptr)
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Anim::Render()
|
||||
{
|
||||
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
{
|
||||
return E_FAIL;
|
||||
@@ -137,12 +148,37 @@ _vector CSpell_Anim::Get_WorldPostion()
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpell_Anim::Anim_Start(_uint iSpell_Id)
|
||||
void CSpell_Anim::Set_FadeIn()
|
||||
{
|
||||
if (!m_bFadeIn && m_fAlpha < 1.f)
|
||||
{
|
||||
m_bFadeIn = true;
|
||||
m_bFadeOut = false;
|
||||
}
|
||||
m_bAnim_Start = true;
|
||||
}
|
||||
|
||||
void CSpell_Anim::Anim_End()
|
||||
void CSpell_Anim::Change_Image(_int SpellID)
|
||||
{
|
||||
_wstring pImageName = static_cast<CUIObject*>(m_pOwner)->Get_Info(SpellID).pImage_Name;
|
||||
m_iTotalFrames = static_cast<CUIObject*>(m_pOwner)->Get_Info(SpellID).iAnimNum;
|
||||
if (m_pDiffuse_TextureCom)
|
||||
{
|
||||
Remove_Component<CTexture>();
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
}
|
||||
if (FAILED(__super::Add_Asset_Component(ENUM_CLASS(LEVEL::UI), pImageName, reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom))))
|
||||
return;
|
||||
}
|
||||
|
||||
void CSpell_Anim::Set_SkillType(_int eType)
|
||||
{
|
||||
if (eType != -1 && eType != m_iPerSpell)
|
||||
{
|
||||
m_iPerSpell = eType;
|
||||
m_iCurrentFrame = 0;
|
||||
Change_Image(eType);
|
||||
}
|
||||
}
|
||||
|
||||
HRESULT CSpell_Anim::Bind_ShaderResources()
|
||||
@@ -188,7 +224,7 @@ HRESULT CSpell_Anim::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Crucio"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Arresto_Momentum"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -196,7 +232,6 @@ HRESULT CSpell_Anim::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Data.h"
|
||||
#include "GameObject.h"
|
||||
#include "UIObject.h"
|
||||
#include "tinyxml2.h"
|
||||
|
||||
;
|
||||
|
||||
CSpell_Data::CSpell_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CGameObject(pDevice, pContext)
|
||||
@@ -14,14 +18,62 @@ CSpell_Data::CSpell_Data(const CSpell_Data& rhs)
|
||||
|
||||
HRESULT CSpell_Data::Initialize_Prototype()
|
||||
{
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Data::Initialize(void* pArg)
|
||||
{
|
||||
auto* pInfo = static_cast<CUIObject::SPELLINFO*>(pArg);
|
||||
|
||||
tinyxml2::XMLDocument doc;
|
||||
tinyxml2::XMLError Error = doc.LoadFile("../Bin/Resources/Data/UI/Spell/SpellInfo.xml");
|
||||
if (Error != tinyxml2::XML_SUCCESS)
|
||||
return E_FAIL;
|
||||
|
||||
tinyxml2::XMLElement* pSpellInfo = doc.FirstChildElement("SpellInfo");
|
||||
if (!pSpellInfo)
|
||||
return E_FAIL;
|
||||
|
||||
tinyxml2::XMLElement* pSpell = pSpellInfo->FirstChildElement("Spell");
|
||||
while (pSpell)
|
||||
{
|
||||
int id = 0;
|
||||
pSpell->QueryIntAttribute("Spell_ID", &id);
|
||||
|
||||
if (id < 0 || id > 34)
|
||||
{
|
||||
pSpell = pSpell->NextSiblingElement("Spell");
|
||||
continue;
|
||||
}
|
||||
|
||||
pInfo[id].iSpell_ID = id;
|
||||
pInfo[id].pSpell_Name = CMyTools::ToWstring(pSpell->Attribute("Spell_Name"));
|
||||
pInfo[id].pImage_Name = CMyTools::ToWstring(pSpell->Attribute("Image_Name"));
|
||||
pSpell->QueryIntAttribute("Spell_Type", &pInfo[id].iSpell_Type);
|
||||
pSpell->QueryIntAttribute("Skill_Type", &pInfo[id].iSkill_Type);
|
||||
pSpell->QueryFloatAttribute("Spell_Cooltime", &pInfo[id].fSpell_CoolTime);
|
||||
pSpell->QueryFloatAttribute("Duration", &pInfo[id].fDuration);
|
||||
pSpell->QueryIntAttribute("AnimNum", &pInfo[id].iAnimNum);
|
||||
pInfo[id].pSpellInfo = CMyTools::ToWstring(pSpell->Attribute("SpellInfo"));
|
||||
int lock = 0, equip = 0;
|
||||
pSpell->QueryIntAttribute("Spell_Lock", &lock);
|
||||
pSpell->QueryIntAttribute("Equip_Spell", &equip);
|
||||
pInfo[id].bSpell_Lock = lock != 0;
|
||||
pInfo[id].bEquip_Spell = equip != 0;
|
||||
|
||||
pSpell = pSpell->NextSiblingElement("Spell");
|
||||
}
|
||||
|
||||
//pInfo = SpellInfo;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
//const CUIObject::SPELLINFO& CSpell_Data::Get_Info(_uint SpellID) const
|
||||
//{
|
||||
// return SpellInfo[SpellID];
|
||||
//}
|
||||
|
||||
void CSpell_Data::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
#include "pch.h"
|
||||
@@ -21,8 +21,8 @@ HRESULT CSpell_Header::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = -20.f;
|
||||
Desc.fX = 600.f;
|
||||
Desc.fY = -385.f;
|
||||
Desc.fSizeX = 512.f;
|
||||
Desc.fSizeY = 64.f;
|
||||
|
||||
@@ -38,21 +38,32 @@ HRESULT CSpell_Header::Initialize(void* pArg)
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 3.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_fMoveSpeed = 5.f;
|
||||
m_fLerpX = m_fX;
|
||||
m_fLerpY = 45;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Header::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Header::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
@@ -70,7 +81,7 @@ void CSpell_Header::Update(_float fTimeDelta)
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
@@ -79,13 +90,23 @@ void CSpell_Header::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_iSpellType != -1)
|
||||
{
|
||||
m_iSkillType = static_cast<CUIObject*>(m_pOwner)->Get_Info(m_iSpellType).iSpell_Type;
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Header::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
@@ -113,11 +134,6 @@ _vector CSpell_Header::Get_WorldPostion()
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpell_Header::MoveY(_float fY)
|
||||
{
|
||||
m_fY += fY;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
@@ -156,7 +172,7 @@ HRESULT CSpell_Header::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSpellType, sizeof(_int))))
|
||||
if (FAILED(m_pShaderCom->Bind_RawValue("g_iSpellType", &m_iSkillType, sizeof(_int))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 20.f;
|
||||
Desc.fX = 600.f;
|
||||
Desc.fY = -345.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) };
|
||||
@@ -37,19 +37,28 @@ HRESULT CSpell_Header_Line::Initialize(void* pArg)
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 3.f;
|
||||
m_fMoveSpeed = 5.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CSpell_Header_Line::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Header_Line::Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bFadeIn == true)
|
||||
{
|
||||
if (m_fAlpha <= 1.f)
|
||||
@@ -67,7 +76,7 @@ void CSpell_Header_Line::Update(_float fTimeDelta)
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
@@ -75,14 +84,19 @@ void CSpell_Header_Line::Update(_float fTimeDelta)
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CSpell_Header_Line::Late_Update(_float fTimeDelta)
|
||||
{
|
||||
if (!__super::Chack_Visible())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (m_bVisible) {
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this);
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
}
|
||||
@@ -110,11 +124,6 @@ _vector CSpell_Header_Line::Get_WorldPostion()
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
void CSpell_Header_Line::MoveY(_float fY)
|
||||
{
|
||||
m_fY += fY;
|
||||
}
|
||||
|
||||
HRESULT CSpell_Header_Line::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
|
||||
@@ -46,6 +46,7 @@ HRESULT CSpell_Hover::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -88,7 +89,9 @@ void CSpell_Hover::Update(_float fTimeDelta)
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
Hover();
|
||||
|
||||
m_pVIBufferCom->Set_Hover_Index(m_iSpellType);
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
@@ -152,22 +155,6 @@ void CSpell_Hover::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
void CSpell_Hover::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));
|
||||
|
||||
fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0];
|
||||
fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1];
|
||||
|
||||
m_pVIBufferCom->Set_Mouse_Hover(fMouse);
|
||||
|
||||
}
|
||||
|
||||
HRESULT CSpell_Hover::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
|
||||
@@ -23,8 +23,8 @@ HRESULT CSpell_Hover_Effect::Initialize(void* pArg)
|
||||
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 105.f;
|
||||
Desc.fSizeY = 105.f;
|
||||
Desc.fSizeX = 115.f;
|
||||
Desc.fSizeY = 115.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) };
|
||||
|
||||
@@ -47,6 +47,7 @@ HRESULT CSpell_Hover_Effect::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -89,7 +90,7 @@ void CSpell_Hover_Effect::Update(_float fTimeDelta)
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
Hover();
|
||||
m_pVIBufferCom->Set_Hover_Index(m_iSpellType);
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
@@ -153,22 +154,6 @@ void CSpell_Hover_Effect::SizeUpdate(_float fSizeX, _float fSizeY)
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
}
|
||||
|
||||
void CSpell_Hover_Effect::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));
|
||||
|
||||
fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0];
|
||||
fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1];
|
||||
|
||||
m_pVIBufferCom->Set_Mouse_Hover(fMouse);
|
||||
|
||||
}
|
||||
|
||||
HRESULT CSpell_Hover_Effect::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
|
||||
@@ -46,6 +46,8 @@ HRESULT CSpell_List::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Cloned(true);
|
||||
m_pVIBufferCom->Set_Pos(-185.f, 375.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_fDelayTime = 0.5f;
|
||||
m_iPerSpell_Slot = -1;
|
||||
Color();
|
||||
return S_OK;
|
||||
}
|
||||
@@ -90,7 +92,7 @@ void CSpell_List::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
Hover();
|
||||
Hover(fTimeDelta);
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -165,7 +167,7 @@ void CSpell_List::Color()
|
||||
m_pVIBufferCom->Set_Index_Renge_Color(23, 25, _float4(24.f / 255.f, 190.f / 255.f, 255.f / 255.f, 1.f));
|
||||
}
|
||||
|
||||
void CSpell_List::Hover()
|
||||
void CSpell_List::Hover(_float fTimeDelta)
|
||||
{
|
||||
POINT ptMouse{};
|
||||
GetCursorPos(&ptMouse);
|
||||
@@ -178,23 +180,20 @@ void CSpell_List::Hover()
|
||||
fMouse.x -= m_pOwner->Get_WorldPostion().m128_f32[0];
|
||||
fMouse.y -= m_pOwner->Get_WorldPostion().m128_f32[1];
|
||||
|
||||
m_bPrevHover = m_bHover;
|
||||
m_bHover = (m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse));
|
||||
if (m_iSpellType != -1)
|
||||
m_iSpellType = m_pVIBufferCom->Set_Mouse_Hover(fMouse);
|
||||
|
||||
CUIObject::HOVER_INFO Info;
|
||||
Info.iSlotID = 0;
|
||||
if (m_iSpellType == -1)
|
||||
{
|
||||
m_bHover = true;
|
||||
if (m_bHover == true && m_bPrevHover == false)
|
||||
{
|
||||
static_cast<CUIObject*>(m_pOwner)->Set_SkillType(m_iSpellType);
|
||||
}
|
||||
Info.iHover_Index = -1;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Hover"), &Info);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
m_bHover = false;
|
||||
if (m_bHover == false && m_bPrevHover == true)
|
||||
{
|
||||
static_cast<CUIObject*>(m_pOwner)->Set_SkillType(m_iSpellType);
|
||||
}
|
||||
Info.iHover_Index = m_iSpellType;
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("Hover"), &Info);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
#include "Spell_Hover_Effect.h"
|
||||
#include "Spell_Preview.h"
|
||||
#include "Spell_Vidio_Border.h"
|
||||
#include "Current_Slot_Number.h"
|
||||
#include "Spell_Header.h"
|
||||
#include "Spell_Header_Line.h"
|
||||
#include "Spell_Data.h"
|
||||
#include "Spell_Anim.h"
|
||||
|
||||
CSpell_Panel::CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CPanelObject(pDevice, pContext)
|
||||
@@ -50,7 +55,10 @@ HRESULT CSpell_Panel::Initialize(void* pArg)
|
||||
}
|
||||
m_fCanvasAlpha = 1.f;
|
||||
m_fSortZ = 0.04f;
|
||||
|
||||
m_iSpellType = -1;
|
||||
m_iPendingSpell = -1;
|
||||
m_fDelayTime = 1.f;
|
||||
Add_Function(TEXT("Hover"), [this](void* p) {this->Slot_Chack(p); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -70,6 +78,22 @@ void CSpell_Panel::Update(_float fTimeDelta)
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_iSpellType != -1)
|
||||
{
|
||||
m_fHoverTimer += fTimeDelta;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_fHoverTimer = 0.f;
|
||||
Function_Callback(TEXT("FadeOut"));
|
||||
}
|
||||
|
||||
if (m_fHoverTimer >= m_fDelayTime && m_iPendingSpell != m_iSpellType)
|
||||
{
|
||||
m_iPendingSpell = m_iSpellType;
|
||||
Function_Callback(TEXT("FadeIn"));
|
||||
}
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
@@ -108,6 +132,32 @@ _vector CSpell_Panel::Get_WorldPostion()
|
||||
return m_pTransformCom->Get_State(STATE::POSITION);
|
||||
}
|
||||
|
||||
const CUIObject::SPELLINFO CSpell_Panel::Get_Info(_int Index)
|
||||
{
|
||||
return m_Info[Index];
|
||||
}
|
||||
|
||||
void CSpell_Panel::Slot_Chack(void* pArg)
|
||||
{
|
||||
CUIObject::HOVER_INFO* Info = static_cast<CUIObject::HOVER_INFO*>(pArg);
|
||||
|
||||
_int iSlot = Info->iSlotID;
|
||||
m_iHoverSlot[iSlot] = Info->iHover_Index;
|
||||
|
||||
int finalHover = -1;
|
||||
for (int i = 0; i < 2; ++i)
|
||||
{
|
||||
if (m_iHoverSlot[i] != -1)
|
||||
{
|
||||
finalHover = m_iHoverSlot[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_iSpellType = finalHover;
|
||||
Function_Callback(TEXT("Slot_Hover"), &m_iSpellType);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Panel::Bind_ShaderResources()
|
||||
{
|
||||
if (FAILED(m_pTransformCom->Bind_ShaderResource(m_pShaderCom, "g_WorldMatrix")))
|
||||
@@ -225,6 +275,34 @@ HRESULT CSpell_Panel::Ready_Element(void* pArg)
|
||||
}
|
||||
Add_Element(TEXT("Spell_Vidio_Border"), m_pSpell_Vidio_Border);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CCurrent_Slot_Number>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CCurrent_Slot_Number**>(&m_pCurrent_Slot_Number))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Current_Slot_Number"), m_pCurrent_Slot_Number);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Header>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Header**>(&m_pSpell_Header))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Header"), m_pSpell_Header);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Header_Line>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Header_Line**>(&m_pSpell_Header_Line))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Header_Line"), m_pSpell_Header_Line);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Anim>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Anim**>(&m_pSpell_Anim))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("Spell_Anim"), m_pSpell_Anim);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Data>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, m_Info, nullptr, reinterpret_cast<CSpell_Data**>(&m_pSpell_Data))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
#include "pch.h"
|
||||
#include "Spell_Preview.h"
|
||||
#include "GameInstance.h"
|
||||
#include "Spell_Header.h"
|
||||
#include "Spell_Header_Line.h"
|
||||
|
||||
|
||||
CSpell_Preview::CSpell_Preview(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
:CElementObject(pDevice, pContext)
|
||||
@@ -40,14 +39,16 @@ HRESULT CSpell_Preview::Initialize(void* pArg)
|
||||
}
|
||||
// y값 최소 270 최대 410
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 3.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 5.f;
|
||||
m_vNine_Slice = _float4(50.f, 75.f, 30.f, 96.f);
|
||||
m_fTopY = m_fY - m_vScale.y * 0.5f;
|
||||
SizeUpX(512.f);
|
||||
SizeUpY(270.f);
|
||||
m_iSpellType = ENUM_CLASS(SPELLTYPE::CONTROL);
|
||||
m_fSortZ = 0.02f;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -82,7 +83,7 @@ void CSpell_Preview::Update(_float fTimeDelta)
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
@@ -90,7 +91,6 @@ void CSpell_Preview::Update(_float fTimeDelta)
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
static_cast<CUIObject*>(m_pSpell_Header)->Set_SkillType(ENUM_CLASS(m_iSpellType));
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
@@ -121,8 +121,6 @@ HRESULT CSpell_Preview::Render()
|
||||
if (FAILED(m_pVIBufferCom->Render())) {
|
||||
return E_FAIL;
|
||||
}
|
||||
m_pSpell_Header->Render();
|
||||
m_pSpell_Header_Line->Render();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -148,8 +146,6 @@ void CSpell_Preview::SizeUpY(_float fSizeY)
|
||||
|
||||
_float deltaY = m_fY - prevY;
|
||||
|
||||
static_cast<CUIObject*>(m_pSpell_Header_Line)->MoveY(-deltaY);
|
||||
static_cast<CUIObject*>(m_pSpell_Header)->MoveY(-deltaY);
|
||||
}
|
||||
|
||||
HRESULT CSpell_Preview::Bind_ShaderResources()
|
||||
@@ -243,14 +239,7 @@ HRESULT CSpell_Preview::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Header>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Header**>(&m_pSpell_Header))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Header_Line>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Header_Line**>(&m_pSpell_Header_Line))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,11 +39,15 @@ HRESULT CSpell_Vidio_Border::Initialize(void* pArg)
|
||||
}
|
||||
|
||||
m_fTimeMult = 3.f;
|
||||
m_fAlpha = 1.f;
|
||||
m_fAlphaTime = 3.f;
|
||||
m_fAlpha = 0.f;
|
||||
m_fAlphaTime = 9.f;
|
||||
m_fMoveSpeed = 5.f;
|
||||
m_fLerpX = m_fX;
|
||||
m_fLerpY = 45;
|
||||
m_bStart = false;
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("Slot_Hover"), [this](void* p) {this->Set_SkillType(*reinterpret_cast<_int*>(p)); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeIn"), [this](void* p) {this->Set_FadeIn(); });
|
||||
static_cast<CUIObject*>(m_pOwner)->Add_Function(TEXT("FadeOut"), [this](void* p) {this->Set_FadeOut(); });
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -78,17 +82,21 @@ void CSpell_Vidio_Border::Update(_float fTimeDelta)
|
||||
if (m_bFadeOut == true)
|
||||
{
|
||||
if (m_fAlpha >= 0.f)
|
||||
m_fAlpha -= fTimeDelta;
|
||||
m_fAlpha -= fTimeDelta * m_fAlphaTime;
|
||||
|
||||
if (m_fAlpha <= 0.f)
|
||||
{
|
||||
m_bFadeOut = false;
|
||||
m_bStart = false;
|
||||
m_fAlpha = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fTime += fTimeDelta * m_fTimeMult;
|
||||
|
||||
if (m_fAlpha >= 0.3f)
|
||||
m_bStart = true;
|
||||
|
||||
__super::Update(fTimeDelta);
|
||||
|
||||
}
|
||||
@@ -107,21 +115,25 @@ void CSpell_Vidio_Border::Late_Update(_float fTimeDelta)
|
||||
|
||||
HRESULT CSpell_Vidio_Border::Render()
|
||||
{
|
||||
if (FAILED(Bind_ShaderResources()))
|
||||
if (m_bStart == true)
|
||||
{
|
||||
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;
|
||||
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;
|
||||
@@ -187,10 +199,6 @@ HRESULT CSpell_Vidio_Border::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CSpell_Anim>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, reinterpret_cast<CSpell_Anim**>(&m_pSpell_Anim))))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
#include "Editor_Define.h"
|
||||
#include "ElementObject.h"
|
||||
|
||||
NS_BEGIN(Editor)
|
||||
|
||||
class CCurrent_Slot_Number final : public CElementObject
|
||||
{
|
||||
private:
|
||||
CCurrent_Slot_Number(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CCurrent_Slot_Number(const CCurrent_Slot_Number& rhs);
|
||||
virtual ~CCurrent_Slot_Number() = 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;
|
||||
|
||||
virtual void SizeUpX(_float fSizeX) override;
|
||||
virtual void SizeUpY(_float fSizeY) override;
|
||||
virtual void SizeUpdate(_float fSizeX, _float fSizeY) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
void UV();
|
||||
_float4 Meter_Index(_uint Number);
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_UI_Instance* m_pVIBufferCom = { nullptr };
|
||||
CVIBuffer_UI_Instance::UI_ATLAS_DESC pUVDesc[4];
|
||||
|
||||
_float2 m_fIamge_Size{};
|
||||
_float m_fOffSetX{};
|
||||
_float m_fOffSetY{};
|
||||
_uint m_iCols{};
|
||||
|
||||
public:
|
||||
static CCurrent_Slot_Number* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
virtual void Free() override;
|
||||
void Describe_Entity() override;
|
||||
};
|
||||
|
||||
NS_END
|
||||
@@ -34,8 +34,8 @@ namespace Editor
|
||||
|
||||
|
||||
enum class EFFECT_TYPE { EFFECT, TRAIL, END };
|
||||
enum class SKILL_TYPE{ ARESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, // 노란색
|
||||
ASSIO, DEPULSO, DESCENDO, FLIPENDO, // 보라색
|
||||
enum class SKILL_TYPE{ ARRESTO_MOMENTUM, GLACIUS, LEVIOSO, TRANSFORM, // 노란색
|
||||
ACCIO, DEPULSO, DESCENDO, FLIPENDO, // 보라색
|
||||
CONFRINGO, DIFFINDO, EXPELLIARMUS, BOMBARDA, INCENDIO, // 빨간색
|
||||
DISILLUSIONMENT, LUMOS, REPARO, WINGARDIUM_LEVIOSA, // 하늘색
|
||||
CONJURING_SPELL, ALTERING_SPELL, EVANESCO, // 연녹색
|
||||
|
||||
@@ -25,7 +25,7 @@ class CEessential_Spell_Slot final : public CElementObject
|
||||
|
||||
|
||||
private:
|
||||
void Hover();
|
||||
void Hover(_float fTimeDelta);
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
@@ -43,8 +43,10 @@ class CEessential_Spell_Slot final : public CElementObject
|
||||
_float m_fOffSetY{};
|
||||
_uint m_iCols{};
|
||||
|
||||
_bool m_bHover = { false };
|
||||
_bool m_bPrevHover = { false };
|
||||
_float m_fHoverTime{};
|
||||
_int m_iPerSpell_Slot{};
|
||||
|
||||
|
||||
public:
|
||||
static CEessential_Spell_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -20,8 +20,11 @@ class CSpell_Anim final : public CElementObject
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
public:
|
||||
void Anim_Start(_uint iSpell_Id);
|
||||
void Anim_End();
|
||||
virtual void Set_FadeIn() override;
|
||||
|
||||
private:
|
||||
void Change_Image(_int SpellID);
|
||||
virtual void Set_SkillType(_int eType) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
@@ -39,7 +42,7 @@ class CSpell_Anim final : public CElementObject
|
||||
_float m_fFrameTime{}; // 한 프레임당 시간(초)
|
||||
_int m_iCurrentFrame{}; // 현재 보여줄 프레임
|
||||
|
||||
_uint m_iSpell_Index{};
|
||||
_int m_iPerSpell{};
|
||||
_bool m_bAnim_Start = { false };
|
||||
public:
|
||||
static CSpell_Anim* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -11,6 +11,22 @@ NS_BEGIN(Editor)
|
||||
|
||||
class CSpell_Data final : public CGameObject
|
||||
{
|
||||
public:
|
||||
typedef struct tagSpellInfo
|
||||
{
|
||||
_int iSpell_ID{};
|
||||
_string pSpell_Name;
|
||||
_string pImage_Name;
|
||||
_int iSpell_Type{};
|
||||
_int iSkill_Type{};
|
||||
_float fSpell_CoolTime{};
|
||||
_float fDuration{};
|
||||
_int iAnimNum{};
|
||||
_string pSpellInfo;
|
||||
_bool bSpell_Lock = false;
|
||||
_bool bEquip_Spell = false;
|
||||
}SPELLINFO;
|
||||
private:
|
||||
CSpell_Data(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpell_Data(const CSpell_Data& rhs);
|
||||
virtual ~CSpell_Data() = default;
|
||||
@@ -28,9 +44,14 @@ class CSpell_Data final : public CGameObject
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
public:
|
||||
//const SPELLINFO& Get_Info(_uint SpellID) const;
|
||||
|
||||
private:
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CGameObject* m_pSpell_Panel = { nullptr };
|
||||
|
||||
SPELLINFO SpellInfo = {};
|
||||
public:
|
||||
static CSpell_Data* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
class CSpell_Drag
|
||||
{
|
||||
};
|
||||
|
||||
@@ -19,9 +19,6 @@ class CSpell_Header final : public CElementObject
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual void MoveY(_float fY) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
@@ -33,6 +30,7 @@ class CSpell_Header final : public CElementObject
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
_int m_iSkillType{};
|
||||
public:
|
||||
static CSpell_Header* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -19,9 +19,6 @@ class CSpell_Header_Line final : public CElementObject
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
private:
|
||||
virtual void MoveY(_float fY) override;
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
|
||||
@@ -49,7 +49,6 @@ class CSpell_Hover final : public CElementObject
|
||||
_float m_fOffSetX{};
|
||||
_float m_fOffSetY{};
|
||||
_uint m_iCols{};
|
||||
|
||||
public:
|
||||
static CSpell_Hover* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -27,9 +27,6 @@ class CSpell_Hover_Effect final : public CElementObject
|
||||
virtual void SizeUpY(_float fSizeY) override;
|
||||
virtual void SizeUpdate(_float fSizeX, _float fSizeY) override;
|
||||
|
||||
private:
|
||||
void Hover();
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
|
||||
@@ -29,7 +29,7 @@ class CSpell_List final : public CElementObject
|
||||
|
||||
private:
|
||||
void Color();
|
||||
void Hover();
|
||||
void Hover(_float fTimeDelta);
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
@@ -47,9 +47,8 @@ class CSpell_List final : public CElementObject
|
||||
_float m_fOffSetY{};
|
||||
_uint m_iCols{};
|
||||
|
||||
_bool m_bHover = { false };
|
||||
_bool m_bPrevHover = { false };
|
||||
|
||||
_int m_iPerSpell_Slot{};
|
||||
_float m_fHoverTime{};
|
||||
public:
|
||||
static CSpell_List* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -11,6 +11,7 @@ NS_BEGIN(Editor)
|
||||
|
||||
class CSpell_Panel final : public CPanelObject
|
||||
{
|
||||
|
||||
private:
|
||||
CSpell_Panel(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CSpell_Panel(const CSpell_Panel& rhs);
|
||||
@@ -24,9 +25,11 @@ class CSpell_Panel final : public CPanelObject
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
public:
|
||||
void SlotHoverOn();
|
||||
void SlotHoverOff();
|
||||
void SlotHover();
|
||||
virtual const SPELLINFO Get_Info(_int Index) override;
|
||||
|
||||
private:
|
||||
void Slot_Chack(void* pArg);
|
||||
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
@@ -38,7 +41,7 @@ class CSpell_Panel final : public CPanelObject
|
||||
private:
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
CGameObject* m_pCurrent_Spell_Slot = { nullptr };
|
||||
CGameObject* m_pSpell_List = { nullptr };
|
||||
@@ -50,9 +53,19 @@ class CSpell_Panel final : public CPanelObject
|
||||
CGameObject* m_pSpell_Hover_Effect = { nullptr };
|
||||
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 };
|
||||
|
||||
_uint m_iSlotHover_Index{};
|
||||
_int m_iHoverSlot[2] = { -1,-1 };
|
||||
|
||||
SPELLINFO m_Info[34] = {};
|
||||
CUIObject::HOVER_INFO m_Hover;
|
||||
|
||||
_int m_iPendingSpell = -1;
|
||||
_float m_fHoverTimer = 0.f;
|
||||
public:
|
||||
static CSpell_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
@@ -36,8 +36,7 @@ class CSpell_Preview final : public CElementObject
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
CGameObject* m_pSpell_Header = { nullptr };
|
||||
CGameObject* m_pSpell_Header_Line = { nullptr };
|
||||
|
||||
|
||||
_float4 m_vHeaderBack{};
|
||||
|
||||
|
||||
@@ -19,6 +19,12 @@ class CSpell_Vidio_Border final : public CElementObject
|
||||
virtual HRESULT Render() override;
|
||||
virtual _vector Get_WorldPostion() override;
|
||||
|
||||
//public:
|
||||
// virtual const SPELLINFO Get_Info(_int Index) override;
|
||||
//
|
||||
//public:
|
||||
// virtual void Set_SkillType(_int eType);
|
||||
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
@@ -31,7 +37,9 @@ class CSpell_Vidio_Border final : public CElementObject
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
CGameObject* m_pSpell_Anim = { nullptr };
|
||||
_float m_fStertTimer{};
|
||||
_int m_iPerIndex{};
|
||||
_bool m_bStart = { false };
|
||||
|
||||
public:
|
||||
static CSpell_Vidio_Border* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -207,14 +207,20 @@ _bool CUIObject::Chack_Visible()
|
||||
|
||||
void CUIObject::Set_FadeIn()
|
||||
{
|
||||
m_bFadeIn = true;
|
||||
m_bFadeOut = false;
|
||||
if (!m_bFadeIn && m_fAlpha < 1.f)
|
||||
{
|
||||
m_bFadeIn = true;
|
||||
m_bFadeOut = false;
|
||||
}
|
||||
}
|
||||
|
||||
void CUIObject::Set_FadeOut()
|
||||
{
|
||||
m_bFadeIn = false;
|
||||
m_bFadeOut = true;
|
||||
if (!m_bFadeOut && m_fAlpha > 0.f)
|
||||
{
|
||||
m_bFadeOut = true;
|
||||
m_bFadeIn = false;
|
||||
}
|
||||
}
|
||||
|
||||
_bool CUIObject::Get_FadeIn()
|
||||
@@ -467,6 +473,16 @@ void CUIObject::Function_Callback(wstring Name, void* pArg)
|
||||
{
|
||||
}
|
||||
|
||||
_bool CUIObject::Get_Hover()
|
||||
{
|
||||
return m_bHover;
|
||||
}
|
||||
|
||||
const CUIObject::SPELLINFO CUIObject::Get_Info(_int Index)
|
||||
{
|
||||
return SPELLINFO();
|
||||
}
|
||||
|
||||
void CUIObject::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
@@ -274,6 +274,9 @@ _int CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos)
|
||||
VTX_INSTANCE_UI* pVertices = static_cast<VTX_INSTANCE_UI*>(SubResource.pData);
|
||||
|
||||
_int hoveredIndex = -1;
|
||||
for (_uint i = 0; i < m_iNumInstance; i++)
|
||||
pVertices[i].bHover = 0.f;
|
||||
|
||||
for (_uint i = 0; i < m_iNumInstance; i++)
|
||||
{
|
||||
_float2 pos = pVertices[i].fPos;
|
||||
@@ -289,21 +292,42 @@ _int CVIBuffer_UI_Instance::Set_Mouse_Hover(_float2 fMousePos)
|
||||
pt.x = LONG(fMousePos.x);
|
||||
pt.y = LONG(fMousePos.y);
|
||||
|
||||
if (PtInRect(&rcInstance, pt))
|
||||
{
|
||||
pVertices[i].bHover = 1.f;
|
||||
hoveredIndex = i;
|
||||
if (PtInRect(&rcInstance, pt))
|
||||
{
|
||||
pVertices[i].bHover = 1.f;
|
||||
hoveredIndex = i;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
pVertices[i].bHover = 0.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
pVertices[i].bHover = 0.f;
|
||||
hoveredIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_pContext->Unmap(m_pVBInstance, 0);
|
||||
return hoveredIndex;
|
||||
m_pContext->Unmap(m_pVBInstance, 0);
|
||||
return hoveredIndex;
|
||||
}
|
||||
|
||||
void CVIBuffer_UI_Instance::Set_Hover_Index(_uint iIndex)
|
||||
{
|
||||
D3D11_MAPPED_SUBRESOURCE SubResource{};
|
||||
|
||||
m_pContext->Map(m_pVBInstance, 0, D3D11_MAP_WRITE_NO_OVERWRITE, 0, &SubResource);
|
||||
|
||||
VTX_INSTANCE_UI* pVertices = static_cast<VTX_INSTANCE_UI*>(SubResource.pData);
|
||||
|
||||
for (_uint i = 0; i < m_iNumInstance; ++i)
|
||||
{
|
||||
if (i == iIndex)
|
||||
{
|
||||
pVertices[i].bHover = 1.f;
|
||||
}
|
||||
else
|
||||
pVertices[i].bHover = 0.f;
|
||||
}
|
||||
|
||||
m_pContext->Unmap(m_pVBInstance, 0);
|
||||
}
|
||||
|
||||
CVIBuffer_UI_Instance* CVIBuffer_UI_Instance::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext, const INSTANCE_DESC* pInstanceDesc)
|
||||
|
||||
@@ -17,6 +17,25 @@ typedef struct tagUIObjectDesc
|
||||
_float fSizeX, fSizeY = {};
|
||||
}UIOBJECT_DESC;
|
||||
|
||||
typedef struct tagSpellInfo
|
||||
{
|
||||
_int iSpell_ID{};
|
||||
_wstring pSpell_Name;
|
||||
_wstring pImage_Name;
|
||||
_int iSpell_Type{};
|
||||
_int iSkill_Type{};
|
||||
_float fSpell_CoolTime{};
|
||||
_float fDuration{};
|
||||
_int iAnimNum{};
|
||||
_wstring pSpellInfo;
|
||||
_bool bSpell_Lock = false;
|
||||
_bool bEquip_Spell = false;
|
||||
}SPELLINFO;
|
||||
typedef struct SlotHover
|
||||
{
|
||||
_int iSlotID{};
|
||||
_int iHover_Index{};
|
||||
}HOVER_INFO;
|
||||
protected:
|
||||
CUIObject(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CUIObject(const CUIObject& rhs);
|
||||
@@ -108,6 +127,10 @@ typedef struct tagUIObjectDesc
|
||||
|
||||
virtual void Add_Function(wstring Name, function<void(void*)> Evnet);
|
||||
virtual void Function_Callback(wstring Name, void* pArg = nullptr);
|
||||
|
||||
virtual _bool Get_Hover();
|
||||
|
||||
virtual const SPELLINFO Get_Info(_int Index);
|
||||
protected:
|
||||
_vector m_fOrigin_Position_vector{};
|
||||
_float2 m_fOrigin_Position{};
|
||||
|
||||
@@ -34,6 +34,7 @@ class ENGINE_DLL CVIBuffer_UI_Instance final : public CVIBuffer_Instance
|
||||
void Set_ImageUV(UI_ATLAS_DESC* AtlasUV);
|
||||
void Set_Index_Renge_Color(_uint StartIndex, _uint EndIndex, _float4 vColor);
|
||||
_int Set_Mouse_Hover(_float2 fMousePos);
|
||||
void Set_Hover_Index(_uint iIndex);
|
||||
|
||||
private:
|
||||
VTX_INSTANCE_UI* m_pInstanceVertices = { nullptr };
|
||||
|
||||
Reference in New Issue
Block a user