Merge branch 'UI' into Develope
This commit is contained in:
@@ -142,7 +142,7 @@ PS_OUT PS_Sptire_Sheet(PS_IN In)
|
||||
|
||||
Color = Texture;
|
||||
|
||||
if (Color.r <= 0.f)
|
||||
if (Color.r <= 0.4f)
|
||||
discard;
|
||||
|
||||
Out.vColor = Color;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 228 KiB |
@@ -109,7 +109,7 @@ HRESULT CActive_Icon::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Keyboard"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_ActiveMission_Icon_0"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -83,23 +83,9 @@ HRESULT CGamePlay_Canvas::Bind_ShaderResources()
|
||||
|
||||
HRESULT CGamePlay_Canvas::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_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &Mission_Panel)))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMiniMap_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &Minimap_Panel)))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
|
||||
|
||||
CGameObject* asdf = this;
|
||||
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
@@ -108,10 +94,20 @@ HRESULT CGamePlay_Canvas::Ready_Panel(void* pArg)
|
||||
{
|
||||
CGameObject* asdf = this;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoading_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &Loading_Panel)))
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoading_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pLoading_Panel)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("LoadingPanel"), m_pLoading_Panel);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMiniMap_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pMinimap_Panel)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Panel(TEXT("Minimap"), m_pMinimap_Panel);
|
||||
//if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CMission_Panel>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &Mission_Panel)))
|
||||
//{
|
||||
// return E_FAIL;
|
||||
//}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#include "IMGUIUI.h"
|
||||
#include "UIObject.h"
|
||||
#include "GamePlay_Canvas.h"
|
||||
#include "PanelObject.h"
|
||||
#include "ElementObject.h"
|
||||
#include "Mouse_Cursor.h"
|
||||
|
||||
CIMGUIUI::CIMGUIUI(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
: CGameObject(pDevice, pContext)
|
||||
@@ -25,69 +28,206 @@ HRESULT CIMGUIUI::Initialize(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CIMGUIUI::PanelwstringTostring(vector<std::wstring>& panelNames)
|
||||
{
|
||||
m_iPanelNamestring.clear();
|
||||
m_iPanelName.clear();
|
||||
m_iPanelNamewstring.clear();
|
||||
|
||||
m_iPanelNamewstring = panelNames;
|
||||
|
||||
for (auto& wname : panelNames)
|
||||
{
|
||||
// wstring -> UTF-8 string 변환
|
||||
int size = WideCharToMultiByte(CP_UTF8, 0,
|
||||
wname.c_str(), (int)wname.size(),
|
||||
nullptr, 0, nullptr, nullptr);
|
||||
|
||||
std::string result(size, 0);
|
||||
|
||||
WideCharToMultiByte(CP_UTF8, 0,
|
||||
wname.c_str(), (int)wname.size(),
|
||||
&result[0], size, nullptr, nullptr);
|
||||
|
||||
// 변환된 string 저장
|
||||
m_iPanelNamestring.push_back(std::move(result));
|
||||
}
|
||||
|
||||
// vector<const char*> 업데이트
|
||||
for (auto& str : m_iPanelNamestring)
|
||||
m_iPanelName.push_back(str.c_str());
|
||||
}
|
||||
|
||||
void CIMGUIUI::ElementwstringTostring(vector<wstring>& panelNames)
|
||||
{
|
||||
m_pElementNamestring.clear();
|
||||
m_pElementName.clear();
|
||||
m_pElementNamewstring.clear();
|
||||
|
||||
m_pElementNamewstring = panelNames;
|
||||
|
||||
for (auto& wname : panelNames)
|
||||
{
|
||||
// wstring -> UTF-8 string 변환
|
||||
int size = WideCharToMultiByte(CP_UTF8, 0,
|
||||
wname.c_str(), (int)wname.size(),
|
||||
nullptr, 0, nullptr, nullptr);
|
||||
|
||||
std::string result(size, 0);
|
||||
|
||||
WideCharToMultiByte(CP_UTF8, 0,
|
||||
wname.c_str(), (int)wname.size(),
|
||||
&result[0], size, nullptr, nullptr);
|
||||
|
||||
// 변환된 string 저장
|
||||
m_pElementNamestring.push_back(std::move(result));
|
||||
}
|
||||
|
||||
// vector<const char*> 업데이트
|
||||
for (auto& str : m_pElementNamestring)
|
||||
m_pElementName.push_back(str.c_str());
|
||||
}
|
||||
|
||||
void CIMGUIUI::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
}
|
||||
|
||||
void CIMGUIUI::Update(_float fTimeDelta)
|
||||
{
|
||||
if (m_pElementObject != nullptr)
|
||||
if (m_pPanelObject != nullptr)
|
||||
{
|
||||
m_fPos.x = static_cast<CUIObject*>(m_pElementObject)->Get_Current_Position().m128_f32[0];
|
||||
m_fPos.y = static_cast<CUIObject*>(m_pElementObject)->Get_Current_Position().m128_f32[1];
|
||||
m_fPanelPos.x = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Position().m128_f32[0];
|
||||
m_fPanelPos.y = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Position().m128_f32[1];
|
||||
|
||||
m_fSize.x = static_cast<CUIObject*>(m_pElementObject)->Get_Current_Size().x;
|
||||
m_fSize.y = static_cast<CUIObject*>(m_pElementObject)->Get_Current_Size().y;
|
||||
m_fPanelSize.x = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Size().x;
|
||||
m_fPanelSize.y = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Size().y;
|
||||
|
||||
m_fSizeXY = static_cast<CUIObject*>(m_pElementObject)->Get_Current_Size();
|
||||
|
||||
m_fTimeMult = static_cast<CUIObject*>(m_pElementObject)->Get_TimeMult();
|
||||
m_fPanelSizeXY = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Size();
|
||||
|
||||
m_fPanelTimeMult = static_cast<CPanelObject*>(m_pPanelObject)->Get_TimeMult();
|
||||
}
|
||||
GUI::Begin("Current_UIObject_Info");
|
||||
|
||||
if (m_pElementObject != nullptr)
|
||||
{
|
||||
GUI::Text("Origin Position : %.1f, %.1f", static_cast<CUIObject*>(m_pElementObject)->Get_Origin_Position().x, static_cast<CUIObject*>(m_pElementObject)->Get_Origin_Position().y);
|
||||
GUI::Text("Current Position : %.1f, %.1f", static_cast<CUIObject*>(m_pElementObject)->Get_Current_Position().m128_f32[0], static_cast<CUIObject*>(m_pElementObject)->Get_Current_Position().m128_f32[1]);
|
||||
GUI::Text("Origin Size : %.1f, %.1f", static_cast<CUIObject*>(m_pElementObject)->Get_Origin_Size().x, static_cast<CUIObject*>(m_pElementObject)->Get_Origin_Size().y);
|
||||
GUI::Text("Current Size : %.1f, %.1f", static_cast<CUIObject*>(m_pElementObject)->Get_Current_Size().x, static_cast<CUIObject*>(m_pElementObject)->Get_Current_Size().y);
|
||||
m_fPos.x = static_cast<CElementObject*>(m_pElementObject)->Get_Current_Position().m128_f32[0];
|
||||
m_fPos.y = static_cast<CElementObject*>(m_pElementObject)->Get_Current_Position().m128_f32[1];
|
||||
|
||||
m_fSize.x = static_cast<CElementObject*>(m_pElementObject)->Get_Current_Size().x;
|
||||
m_fSize.y = static_cast<CElementObject*>(m_pElementObject)->Get_Current_Size().y;
|
||||
|
||||
m_fSizeXY = static_cast<CElementObject*>(m_pElementObject)->Get_Current_Size();
|
||||
|
||||
m_fTimeMult = static_cast<CElementObject*>(m_pElementObject)->Get_TimeMult();
|
||||
}
|
||||
GUI::Begin("Current_PanelObject_Info");
|
||||
if (m_pGamePlay_Canvas != nullptr)
|
||||
{
|
||||
if (m_pGamePlay_Canvas != nullptr)
|
||||
{
|
||||
auto panelNames = static_cast<CCanvasObject*>(m_pGamePlay_Canvas)->Panel_Name();
|
||||
PanelwstringTostring(panelNames);
|
||||
if (GUI::Combo("Panels", &m_iPanelCount, m_iPanelName.data(), static_cast<_int>(m_iPanelName.size())))
|
||||
{
|
||||
m_pPanelObject = static_cast<CCanvasObject*>(m_pGamePlay_Canvas)->Get_Panel(m_iPanelNamewstring[m_iPanelCount]);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pPanelObject != nullptr)
|
||||
{
|
||||
GUI::Text("Origin Position : %.1f, %.1f", static_cast<CPanelObject*>(m_pPanelObject)->Get_Origin_Position().x, static_cast<CUIObject*>(m_pPanelObject)->Get_Origin_Position().y);
|
||||
GUI::Text("Current Position : %.1f, %.1f", static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Position().m128_f32[0], static_cast<CUIObject*>(m_pPanelObject)->Get_Current_Position().m128_f32[1]);
|
||||
GUI::Text("Origin Size : %.1f, %.1f", static_cast<CPanelObject*>(m_pPanelObject)->Get_Origin_Size().x, static_cast<CUIObject*>(m_pPanelObject)->Get_Origin_Size().y);
|
||||
GUI::Text("Current Size : %.1f, %.1f", static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Size().x, static_cast<CUIObject*>(m_pPanelObject)->Get_Current_Size().y);
|
||||
|
||||
GUI::Text("PanelPosition");
|
||||
if (GUI::SliderFloat("X##PanelPos", &m_fPanelPos.x, 0.f, 1920.f))
|
||||
{
|
||||
static_cast<CPanelObject*>(m_pPanelObject)->MoveX(m_fPanelPos.x);
|
||||
}
|
||||
|
||||
if (GUI::SliderFloat("Y##PanelPos", &m_fPanelPos.y, 0.f, 1080))
|
||||
{
|
||||
static_cast<CPanelObject*>(m_pPanelObject)->MoveY(m_fPanelPos.y);
|
||||
}
|
||||
|
||||
GUI::Text("PanelSize");
|
||||
if (GUI::SliderFloat("X##PanelSize", &m_fPanelSize.x, 1.f, 1920.f))
|
||||
{
|
||||
static_cast<CPanelObject*>(m_pPanelObject)->SizeUpdate(m_fPanelSize.x, m_fPanelSize.y);
|
||||
}
|
||||
|
||||
if (GUI::SliderFloat("Y##PanelSize", &m_fPanelSize.y, 1.f, 1080.f))
|
||||
{
|
||||
static_cast<CPanelObject*>(m_pPanelObject)->SizeUpdate(m_fPanelSize.x, m_fPanelSize.y);
|
||||
}
|
||||
|
||||
if (GUI::SliderFloat("PanelSize", &m_fPanelSizeXY.x, 1.f, 1980.f))
|
||||
{
|
||||
m_fPanelSizeXY.y = m_fPanelSizeXY.x;
|
||||
static_cast<CPanelObject*>(m_pPanelObject)->SizeUpdate_float(m_fPanelSizeXY);
|
||||
}
|
||||
|
||||
if (GUI::DragFloat("PanelTimeMult", &m_fPanelTimeMult, 0.01f, 0.f, 10.f))
|
||||
{
|
||||
static_cast<CPanelObject*>(m_pPanelObject)->Set_TimeMult(m_fPanelTimeMult);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GUI::End();
|
||||
|
||||
GUI::Begin("Current_ElementObject_Info");
|
||||
if (m_pPanelObject != nullptr)
|
||||
{
|
||||
auto ElementNames = static_cast<CPanelObject*>(m_pPanelObject)->Element_Name();
|
||||
ElementwstringTostring(ElementNames);
|
||||
if (GUI::Combo("Element", &m_iElementCount, m_pElementName.data(), static_cast<_int>(m_pElementName.size())))
|
||||
{
|
||||
m_pElementObject = static_cast<CPanelObject*>(m_pPanelObject)->Get_Element(m_pElementNamewstring[m_iElementCount]);
|
||||
}
|
||||
}
|
||||
if (m_pElementObject != nullptr)
|
||||
{
|
||||
GUI::Text("Origin Position : %.1f, %.1f", static_cast<CElementObject*>(m_pElementObject)->Get_Origin_Position().x, static_cast<CUIObject*>(m_pElementObject)->Get_Origin_Position().y);
|
||||
GUI::Text("Current Position : %.1f, %.1f", static_cast<CElementObject*>(m_pElementObject)->Get_Current_Position().m128_f32[0], static_cast<CUIObject*>(m_pElementObject)->Get_Current_Position().m128_f32[1]);
|
||||
GUI::Text("Origin Size : %.1f, %.1f", static_cast<CElementObject*>(m_pElementObject)->Get_Origin_Size().x, static_cast<CUIObject*>(m_pElementObject)->Get_Origin_Size().y);
|
||||
GUI::Text("Current Size : %.1f, %.1f", static_cast<CElementObject*>(m_pElementObject)->Get_Current_Size().x, static_cast<CUIObject*>(m_pElementObject)->Get_Current_Size().y);
|
||||
|
||||
GUI::Text("Position");
|
||||
if (GUI::SliderFloat("X##Pos", &m_fPos.x, 0.f, 1920.f))
|
||||
{
|
||||
static_cast<CUIObject*>(m_pElementObject)->MoveX(m_fPos.x);
|
||||
static_cast<CElementObject*>(m_pElementObject)->MoveX(m_fPos.x);
|
||||
}
|
||||
|
||||
if (GUI::SliderFloat("Y##Pos", &m_fPos.y, 0.f, 1080))
|
||||
{
|
||||
static_cast<CUIObject*>(m_pElementObject)->MoveY(m_fPos.y);
|
||||
static_cast<CElementObject*>(m_pElementObject)->MoveY(m_fPos.y);
|
||||
}
|
||||
|
||||
GUI::Text("Size");
|
||||
if (GUI::SliderFloat("X##Size", &m_fSize.x, 1.f, 1920.f))
|
||||
{
|
||||
static_cast<CUIObject*>(m_pElementObject)->SizeUpdate(m_fSize.x, m_fSize.y);
|
||||
static_cast<CElementObject*>(m_pElementObject)->SizeUpdate(m_fSize.x, m_fSize.y);
|
||||
}
|
||||
|
||||
if (GUI::SliderFloat("Y##Size", &m_fSize.y, 1.f, 1080.f))
|
||||
{
|
||||
static_cast<CUIObject*>(m_pElementObject)->SizeUpdate(m_fSize.x, m_fSize.y);
|
||||
static_cast<CElementObject*>(m_pElementObject)->SizeUpdate(m_fSize.x, m_fSize.y);
|
||||
}
|
||||
|
||||
if (GUI::SliderFloat("Size", &m_fSizeXY.x, 1.f, 1980.f))
|
||||
{
|
||||
m_fSizeXY.y = m_fSizeXY.x;
|
||||
static_cast<CUIObject*>(m_pElementObject)->SizeUpdate_float(m_fSizeXY);
|
||||
static_cast<CElementObject*>(m_pElementObject)->SizeUpdate_float(m_fSizeXY);
|
||||
}
|
||||
|
||||
if (GUI::DragFloat("TimeMult", &m_fTimeMult, 0.01f, 0.f, 10.f))
|
||||
{
|
||||
static_cast<CUIObject*>(m_pElementObject)->Set_TimeMult(m_fTimeMult);
|
||||
static_cast<CElementObject*>(m_pElementObject)->Set_TimeMult(m_fTimeMult);
|
||||
}
|
||||
}
|
||||
GUI::End();
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CIMGUIUI::Late_Update(_float fTimeDelta)
|
||||
@@ -110,6 +250,7 @@ HRESULT CIMGUIUI::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
#include "Mission_Key.h"
|
||||
#include "Mission_KeyHold.h"
|
||||
#include "Mouse_Cursor.h"
|
||||
|
||||
#include "MiniMap_TrimBorder.h"
|
||||
#include "Active_Icon.h"
|
||||
|
||||
#include "MiniMap_Panel.h"
|
||||
#include "MiniMap_TrimBorder.h"
|
||||
|
||||
#include "Loading_Panel.h"
|
||||
#include "LoadingWidget.h"
|
||||
@@ -233,73 +233,64 @@ HRESULT CLoader::Loading_For_UI()
|
||||
|
||||
m_strMessage = TEXT("Texture Loading..");
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Keyboard"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Keyboard/Keyboard_%d.png"), 10)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Keyboard", 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;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Cursor"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Cursor/UI_T_CursorRings.dds"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("LodingWidget1"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Loading/LoadingWidget.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Loading", L"Prototype_Texture_", [&](_wstring wstrFileName, const _char* pFilePath)
|
||||
{
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("MissionBanner_Border"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/MissionBanner_Border.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
_string strFilePath = pFilePath;
|
||||
_wstring wstrFilePath = CMyTools::ToWstring(strFilePath);
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("MissionBanner_Key"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/MissionBanner_Key.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Finishi_Rect"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/Finishi_Rect.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Mission_Main"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/Mission_Main.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("ActiveMission_Icon"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Mission/ActiveMission_Icon_%d.png"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
});
|
||||
|
||||
Asset_FileLoad("../Bin/Resources/Textures/Mission", 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;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
});
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("HUD_MiniMap_TrimBorder"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/MiniMap/HUD_MiniMap_TrimBorder.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Mission_Icon"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/Mission/Mission_Icon_%d.png"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("ActiveMission_Icon"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/MiniMap/ActiveMission_Icon_%d.png"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("Mission_Icon_"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::INCREMENTAL, TEXT("../Bin/Resources/Textures/MiniMap/Mission_Icon_%d.png"), 2)))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
if (FAILED(m_pGameInstance->Add_Asset_Prototype(g_iStaticLevel, TEXT("HUD_MiniMap_TrimBorder"),
|
||||
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/MiniMap/HUD_MiniMap_TrimBorder.png"), 0)))) {
|
||||
return E_FAIL;
|
||||
|
||||
}
|
||||
|
||||
|
||||
m_strMessage = TEXT("Model Loading..");
|
||||
|
||||
m_strMessage = TEXT("Shader Loading..");
|
||||
|
||||
@@ -129,7 +129,7 @@ HRESULT CLoadingWidget::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("LodingWidget1"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_LoadingWidget"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ HRESULT CLoadingWidget_Flame::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pTextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ HRESULT CLoadingWidget_Flame::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("LodingWidget1"), reinterpret_cast<CComponent**>(&m_pTextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_LoadingWidget_Flame"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -171,7 +171,7 @@ void CLoadingWidget_Flame::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pTextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ HRESULT CLoading_Panel::Initialize(void* pArg)
|
||||
{
|
||||
CUIObject::UIOBJECT_DESC Desc{};
|
||||
|
||||
Desc.fX = 1920.f;
|
||||
Desc.fY = 1080.f;
|
||||
Desc.fX = 0.f;
|
||||
Desc.fY = 0.f;
|
||||
Desc.fSizeX = 100.f;
|
||||
Desc.fSizeY = 100.f;
|
||||
|
||||
@@ -36,6 +36,10 @@ HRESULT CLoading_Panel::Initialize(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Ready_Element(pArg)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -113,7 +117,7 @@ HRESULT CLoading_Panel::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Keyboard"), reinterpret_cast<CComponent**>(&m_pTextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Keyboard_0"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -125,6 +129,22 @@ HRESULT CLoading_Panel::Ready_Components(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CLoading_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoadingWidget>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pLoadingWidget)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("LoadingWidget"), m_pLoadingWidget);
|
||||
if (FAILED(m_pGameInstance->Add_GameObject_ToLayer<CLoadingWidget_Flame>(g_iStaticLevel, NEXT_LEVEL, LAYER_UI, nullptr, this, &m_pLoadingWidget_Flame)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
Add_Element(TEXT("LoadingWidget_Flame"), m_pLoadingWidget_Flame);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CLoading_Panel* CLoading_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CLoading_Panel* pInstance = new CLoading_Panel(pDevice, pContext);
|
||||
|
||||
@@ -41,10 +41,12 @@ HRESULT CMiniMap_Panel::Initialize(void* pArg)
|
||||
|
||||
void CMiniMap_Panel::Priority_Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Priority_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CMiniMap_Panel::Update(_float fTimeDelta)
|
||||
{
|
||||
__super::Update(fTimeDelta);
|
||||
}
|
||||
|
||||
void CMiniMap_Panel::Late_Update(_float fTimeDelta)
|
||||
@@ -53,6 +55,7 @@ void CMiniMap_Panel::Late_Update(_float fTimeDelta)
|
||||
_float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]);
|
||||
m_pGameInstance->Add_RenderGroup(RENDER::UI, this, *vPos, m_pTransformCom->Get_Radius());
|
||||
}
|
||||
__super::Late_Update(fTimeDelta);
|
||||
}
|
||||
|
||||
HRESULT CMiniMap_Panel::Render()
|
||||
@@ -92,7 +95,7 @@ HRESULT CMiniMap_Panel::Bind_ShaderResources()
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(m_pTextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
if (FAILED(m_pDiffuse_TextureCom->Bind_ShaderResource(m_pShaderCom, "g_Texture", 0)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
@@ -105,9 +108,27 @@ HRESULT CMiniMap_Panel::Bind_ShaderResources()
|
||||
|
||||
HRESULT CMiniMap_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_Keyboard_0"), 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;
|
||||
}
|
||||
|
||||
HRESULT CMiniMap_Panel::Ready_Element(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
CMiniMap_Panel* CMiniMap_Panel::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
{
|
||||
CMiniMap_Panel* pInstance = new CMiniMap_Panel(pDevice, pContext);
|
||||
@@ -138,7 +159,7 @@ void CMiniMap_Panel::Free()
|
||||
{
|
||||
__super::Free();
|
||||
|
||||
SAFE_RELEASE(m_pTextureCom);
|
||||
SAFE_RELEASE(m_pDiffuse_TextureCom);
|
||||
SAFE_RELEASE(m_pShaderCom);
|
||||
SAFE_RELEASE(m_pVIBufferCom);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ HRESULT CMissionBanner_Border::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Cursor"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_MissionBanner_Border"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ HRESULT CMissionBanner_Key::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("MissionBanner_Key"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_MissionBanner_Key"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ HRESULT CMission_Icon::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Cursor"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Mission_Icon_0"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ HRESULT CMission_Key::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Keyboard"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_MissionBanner_Key"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ HRESULT CMission_KeyHold::Ready_Components(void* pArg)
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("Finishi_Rect"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
if (FAILED(Add_Asset_Component(ENUM_CLASS(LEVEL::UI), TEXT("Prototype_Texture_Finishi_Rect"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
|
||||
{
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ void CMouse_Cursor::Priority_Update(_float fTimeDelta)
|
||||
void CMouse_Cursor::Update(_float fTimeDelta)
|
||||
{
|
||||
m_fTime += fTimeDelta;
|
||||
//ShowCursor(false);
|
||||
/*ShowCursor(false);*/
|
||||
}
|
||||
|
||||
void CMouse_Cursor::Late_Update(_float fTimeDelta)
|
||||
@@ -57,7 +57,7 @@ void CMouse_Cursor::Late_Update(_float fTimeDelta)
|
||||
POINT m_pPt{};
|
||||
GetCursorPos(&m_pPt);
|
||||
ScreenToClient(g_hWnd, &m_pPt);
|
||||
_vector MousePos = XMVectorSet(static_cast<_float>(m_pPt.x - m_fWinSizeX * 0.5), static_cast<_float>(-m_pPt.y + m_fWinSizeY * 0.5), 0.f, 1.f);
|
||||
_vector MousePos = XMVectorSet(static_cast<_float>(m_pPt.x - m_fWinSizeX * 0.5), static_cast<_float>(-m_pPt.y + m_fWinSizeY * 0.5) - 10.f, 0.f, 1.f);
|
||||
m_pTransformCom->Set_State(STATE::POSITION, MousePos);
|
||||
|
||||
_float4* vPos = (_float4*)(m_pTransformCom->Get_WorldMatrixPtr()->m[3]);
|
||||
|
||||
@@ -35,9 +35,9 @@ class CGamePlay_Canvas final : public CCanvasObject
|
||||
|
||||
private:
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
//CGameObject* Mission_Panel = { nullptr };
|
||||
//CGameObject* Minimap_Panel = { nullptr };
|
||||
CGameObject* Loading_Panel = { nullptr };
|
||||
//CGameObject* m_pMission_Panel = { nullptr };
|
||||
CGameObject* m_pMinimap_Panel = { nullptr };
|
||||
CGameObject* m_pLoading_Panel = { nullptr };
|
||||
|
||||
public:
|
||||
static CGamePlay_Canvas* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -30,13 +30,32 @@ class CIMGUIUI final : public CGameObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CGameObject* m_pGamePlay_Canvas = { nullptr };
|
||||
CGameObject* m_pPanelObject = { nullptr };
|
||||
CGameObject* m_pElementObject = { nullptr };
|
||||
_float2 m_fPos{};
|
||||
_float2 m_fSize{};
|
||||
_float3 m_fSizeXY{};
|
||||
_float m_fTimeMult{};
|
||||
void PanelwstringTostring(vector<wstring>& panelNames);
|
||||
void ElementwstringTostring(vector<wstring>& panelNames);
|
||||
|
||||
private:
|
||||
CGameObject* m_pGamePlay_Canvas = { nullptr };
|
||||
CGameObject* m_pPanelObject = { nullptr };
|
||||
CGameObject* m_pElementObject = { nullptr };
|
||||
_float2 m_fPos{};
|
||||
_float2 m_fSize{};
|
||||
_float3 m_fSizeXY{};
|
||||
_float m_fTimeMult{};
|
||||
|
||||
_float2 m_fPanelPos{};
|
||||
_float2 m_fPanelSize{};
|
||||
_float3 m_fPanelSizeXY{};
|
||||
_float m_fPanelTimeMult{};
|
||||
|
||||
_int m_iElementCount{};
|
||||
vector<wstring> m_pElementNamewstring;
|
||||
vector<string> m_pElementNamestring;
|
||||
vector<const _char*> m_pElementName;
|
||||
|
||||
_int m_iPanelCount{};
|
||||
vector<wstring> m_iPanelNamewstring;
|
||||
vector<string> m_iPanelNamestring;
|
||||
vector<const _char*> m_iPanelName;
|
||||
|
||||
public:
|
||||
static CIMGUIUI* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -27,7 +27,7 @@ class CLoadingWidget_Flame final : public CElementObject
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pTextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
|
||||
|
||||
@@ -26,17 +26,17 @@ class CLoading_Panel final : public CPanelObject
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Ready_Element(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
private:
|
||||
CTexture* m_pTextureCom = { nullptr };
|
||||
CTexture* m_pDiffuse_TextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CGameObject* m_pMission_KeyHold = { nullptr };
|
||||
CGameObject* m_pMission_Key = { nullptr };
|
||||
CGameObject* m_pActive_Icon = { nullptr };
|
||||
CGameObject* m_pMissionBanner_Key = { nullptr };
|
||||
CGameObject* m_pLoadingWidget = { nullptr };
|
||||
CGameObject* m_pLoadingWidget_Flame = { nullptr };
|
||||
|
||||
|
||||
public:
|
||||
static CLoading_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -26,6 +26,7 @@ class CMiniMap_Panel final : public CPanelObject
|
||||
private:
|
||||
virtual HRESULT Bind_ShaderResources() override;
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Ready_Element(void* pArg) override;
|
||||
virtual HRESULT Initialize_Prototype() override;
|
||||
virtual HRESULT Initialize(void* pArg) override;
|
||||
|
||||
@@ -33,6 +34,10 @@ class CMiniMap_Panel final : public CPanelObject
|
||||
CTexture* m_pTextureCom = { nullptr };
|
||||
CShader* m_pShaderCom = { nullptr };
|
||||
CVIBuffer_Rect* m_pVIBufferCom = { nullptr };
|
||||
CGameObject* m_pMission_KeyHold = { nullptr };
|
||||
CGameObject* m_pMission_Key = { nullptr };
|
||||
CGameObject* m_pActive_Icon = { nullptr };
|
||||
CGameObject* m_pMissionBanner_Key = { nullptr };
|
||||
|
||||
public:
|
||||
static CMiniMap_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
|
||||
@@ -82,6 +82,16 @@ CGameObject* CCanvasObject::Get_Panel(const wstring& Name)
|
||||
return Find_Panel(Name);
|
||||
}
|
||||
|
||||
_int CCanvasObject::Panels_Count()
|
||||
{
|
||||
return m_iPanel_Count;
|
||||
}
|
||||
|
||||
const vector<wstring> CCanvasObject::Panel_Name()
|
||||
{
|
||||
return m_PanelNames;
|
||||
}
|
||||
|
||||
void CCanvasObject::Add_Panel(wstring Name, CGameObject* pPanel)
|
||||
{
|
||||
if (pPanel == nullptr)
|
||||
@@ -95,7 +105,9 @@ void CCanvasObject::Add_Panel(wstring Name, CGameObject* pPanel)
|
||||
}
|
||||
|
||||
m_Panels.push_back(pPanel);
|
||||
m_PanelNames.push_back(Name);
|
||||
m_Panels_map.emplace(Name, pPanel);
|
||||
m_iPanel_Count++;
|
||||
}
|
||||
|
||||
CGameObject* CCanvasObject::Find_Panel(const wstring& Name)
|
||||
|
||||
@@ -39,7 +39,10 @@ void CElementObject::Update(_float fTimeDelta)
|
||||
m_vScale = _float3(m_fSizeX, m_fSizeY, 1.f);
|
||||
m_pTransformCom->Set_Scale(m_vScale);
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(m_fX - m_fWinSizeX * 0.5f, -m_fY + m_fWinSizeY * 0.5f, 0.f, 1.f) * m_pOwner->Get_WorldPostion());
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(
|
||||
m_fX + m_pOwner->Get_WorldPostion().m128_f32[0],
|
||||
-m_fY + m_pOwner->Get_WorldPostion().m128_f32[1],
|
||||
0.f, 1.f));
|
||||
|
||||
m_fCurrent_Posigion = XMVectorSet(m_fX, m_fY, 0.f, 1.f);
|
||||
}
|
||||
|
||||
@@ -64,28 +64,11 @@ HRESULT CPanelObject::Ready_Components(void* pArg)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPanelObject::Ready_Panel(void* pArg)
|
||||
HRESULT CPanelObject::Ready_Element(void* pArg)
|
||||
{
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CPanelObject::MoveX(_float fX)
|
||||
{
|
||||
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(
|
||||
fX - m_fWinSizeX * 0.5f,
|
||||
-m_fY + m_fWinSizeY * 0.5f,
|
||||
0.f, 1.f));
|
||||
}
|
||||
|
||||
void CPanelObject::MoveY(_float fY)
|
||||
{
|
||||
m_pTransformCom->Set_State(STATE::POSITION, XMVectorSet(
|
||||
m_fX - m_fWinSizeX * 0.5f,
|
||||
-fY + m_fWinSizeY * 0.5f,
|
||||
0.f, 1.f));
|
||||
}
|
||||
|
||||
void CPanelObject::Visible(_bool bVisible)
|
||||
{
|
||||
if (m_Elements.empty())
|
||||
@@ -102,8 +85,14 @@ CGameObject* CPanelObject::Get_Element(const wstring& Name)
|
||||
return Find_Element(Name);
|
||||
}
|
||||
|
||||
void CPanelObject::Move_Panel(_float fX, _float fY)
|
||||
_int CPanelObject::Element_Count()
|
||||
{
|
||||
return m_iElements_Count;
|
||||
}
|
||||
|
||||
const vector<wstring> CPanelObject::Element_Name()
|
||||
{
|
||||
return m_ElementName;
|
||||
}
|
||||
|
||||
void CPanelObject::Add_Element(wstring Name, CGameObject* pPanel)
|
||||
@@ -119,7 +108,9 @@ void CPanelObject::Add_Element(wstring Name, CGameObject* pPanel)
|
||||
}
|
||||
|
||||
m_Elements.push_back(pPanel);
|
||||
m_ElementName.push_back(Name);
|
||||
m_Elements_map.emplace(Name, pPanel);
|
||||
m_iElements_Count++;
|
||||
}
|
||||
|
||||
CGameObject* CPanelObject::Find_Element(const wstring& Name)
|
||||
|
||||
@@ -27,13 +27,17 @@ class ENGINE_DLL CCanvasObject abstract : public CUIObject
|
||||
public:
|
||||
virtual void Visible(_bool bVisible) override;
|
||||
virtual class CGameObject* Get_Panel(const wstring& Name);
|
||||
virtual _int Panels_Count();
|
||||
virtual const vector<wstring> Panel_Name();
|
||||
|
||||
protected:
|
||||
virtual void Add_Panel(wstring Name, class CGameObject* pPanel);
|
||||
|
||||
protected:
|
||||
vector<class CGameObject*> m_Panels; // 캔버스가 패널들을 관리 하기 위해서 필요함
|
||||
map<wstring ,class CGameObject*> m_Panels_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서
|
||||
vector<class CGameObject*> m_Panels; // 캔버스가 패널들을 관리 하기 위해서 필요함
|
||||
vector<wstring> m_PanelNames; // 패널들의 이름을 전해주기 위해서
|
||||
map<wstring ,class CGameObject*> m_Panels_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서
|
||||
_int m_iPanel_Count{}; // 전체 패널의 갯수
|
||||
|
||||
private:
|
||||
virtual class CGameObject* Find_Panel(const wstring& Name);
|
||||
|
||||
@@ -22,21 +22,22 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject
|
||||
virtual HRESULT Initialize_Prototype();
|
||||
virtual HRESULT Initialize(void* pArg);
|
||||
virtual HRESULT Ready_Components(void* pArg) override;
|
||||
virtual HRESULT Ready_Panel(void* pArg);
|
||||
virtual HRESULT Ready_Element(void* pArg);
|
||||
|
||||
public:
|
||||
virtual void MoveX(_float fX) override;
|
||||
virtual void MoveY(_float fY) override;
|
||||
virtual void Visible(_bool bVisible) override;
|
||||
virtual class CGameObject* Get_Element(const wstring& Name);
|
||||
virtual void Move_Panel(_float fX, _float fY);
|
||||
virtual _int Element_Count();
|
||||
virtual const vector<wstring> Element_Name();
|
||||
|
||||
protected:
|
||||
virtual void Add_Element(wstring Name, class CGameObject* pPanel);
|
||||
|
||||
protected:
|
||||
vector<class CGameObject*> m_Elements;
|
||||
map<wstring, class CGameObject*> m_Elements_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서
|
||||
vector<class CGameObject*> m_Elements; // 패널이 엘리먼츠를 관리하기 위해 만듬
|
||||
vector<wstring> m_ElementName; // 엘리멘트들의 이름을 전해주기 위해서
|
||||
map<wstring, class CGameObject*> m_Elements_map; // 캔버스에서 내가 원하는 패널을 찾기 위해서
|
||||
_int m_iElements_Count{}; // 전체 엘리멘트의 갯수
|
||||
|
||||
private:
|
||||
virtual class CGameObject* Find_Element(const wstring& Name);
|
||||
|
||||
Reference in New Issue
Block a user