[Add] Canvas, Panel, Element Object 추가

[Modify] 부모 행렬 따라다니게
[Add] 이미지 다수 추가
This commit is contained in:
fbtk
2025-11-10 15:56:52 +09:00
parent 023aa48844
commit 7028fe9945
17 changed files with 210 additions and 102 deletions
@@ -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.

Before

Width:  |  Height:  |  Size: 228 KiB

@@ -83,20 +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;
//}
CGameObject* asdf = this;
return S_OK;
}
@@ -115,7 +104,10 @@ HRESULT CGamePlay_Canvas::Ready_Panel(void* pArg)
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;
}
+111 -32
View File
@@ -28,13 +28,13 @@ HRESULT CIMGUIUI::Initialize(void* pArg)
return S_OK;
}
void CIMGUIUI::wstringTostring(vector<std::wstring>& panelNames)
void CIMGUIUI::PanelwstringTostring(vector<std::wstring>& panelNames)
{
m_pNamestring.clear();
m_pName.clear();
m_pNamewstring.clear();
m_iPanelNamestring.clear();
m_iPanelName.clear();
m_iPanelNamewstring.clear();
m_pNamewstring = panelNames;
m_iPanelNamewstring = panelNames;
for (auto& wname : panelNames)
{
@@ -50,12 +50,42 @@ void CIMGUIUI::wstringTostring(vector<std::wstring>& panelNames)
&result[0], size, nullptr, nullptr);
// º¯È¯µÈ string ÀúÀå
m_pNamestring.push_back(std::move(result));
m_iPanelNamestring.push_back(std::move(result));
}
// vector<const char*> ¾÷µ¥ÀÌÆ®
for (auto& str : m_pNamestring)
m_pName.push_back(str.c_str());
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)
@@ -64,34 +94,83 @@ void CIMGUIUI::Priority_Update(_float fTimeDelta)
void CIMGUIUI::Update(_float fTimeDelta)
{
if (m_pPanelObject != nullptr)
{
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_fPanelSize.x = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Size().x;
m_fPanelSize.y = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Size().y;
m_fPanelSizeXY = static_cast<CPanelObject*>(m_pPanelObject)->Get_Current_Size();
m_fPanelTimeMult = static_cast<CPanelObject*>(m_pPanelObject)->Get_TimeMult();
}
if (m_pElementObject != 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_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<CUIObject*>(m_pElementObject)->Get_Current_Size().x;
m_fSize.y = static_cast<CUIObject*>(m_pElementObject)->Get_Current_Size().y;
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<CUIObject*>(m_pElementObject)->Get_Current_Size();
m_fTimeMult = static_cast<CUIObject*>(m_pElementObject)->Get_TimeMult();
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)
{
if (m_pGamePlay_Canvas != nullptr)
{
auto panelNames = static_cast<CCanvasObject*>(m_pGamePlay_Canvas)->Panel_Name();
wstringTostring(panelNames);
if (GUI::Combo("Panels", &m_iPanelCount, m_pName.data(), static_cast<_int>(m_pName.size())))
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_pNamewstring[m_iPanelCount]);
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);
}
}
}
@@ -102,50 +181,50 @@ void CIMGUIUI::Update(_float fTimeDelta)
if (m_pPanelObject != nullptr)
{
auto ElementNames = static_cast<CPanelObject*>(m_pPanelObject)->Element_Name();
wstringTostring(ElementNames);
if (GUI::Combo("Panels", &m_iElementCount, m_pName.data(), static_cast<_int>(m_pName.size())))
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_pNamewstring[m_iElementCount]);
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<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);
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();
+31 -14
View File
@@ -13,7 +13,6 @@
#include "Body.h"
#include "Hair.h"
#include "Dummy_Goblin.h"
#include "Dummy_Goblin.h"
#include "Monster.h"
#include <filesystem>
@@ -31,17 +30,13 @@
#include "Mission_KeyHold.h"
#include "Mouse_Cursor.h"
#include "Dummy_Cube.h"
#include "LodingWidget1.h"
#include "Head.h"
#include "Body.h"
#include "LoadingWidget.h"
#include "MiniMap_TrimBorder.h"
#include "Active_Icon.h"
#include "MiniMap_Panel.h"
#include "Loading_Panel.h"
#include "LoadingWidget.h"
#include "LoadingWidget_Flame.h"
#include "IMGUIUI.h"
@@ -234,20 +229,42 @@ 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("LoadingWidget"),
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)
{
_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("MissionBanner_Border"),
CTexture::Create(m_pDevice, m_pContext, TEXTURE_LOAD_TYPE::SINGLE, TEXT("../Bin/Resources/Textures/Mission/MissionBanner_Border.png"), 0)))) {
@@ -129,7 +129,7 @@ HRESULT CLoadingWidget::Ready_Components(void* pArg)
{
return E_FAIL;
}
if (FAILED(Add_Asset_Component(g_iStaticLevel, TEXT("LoadingWidget"), 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("LoadingWidget"), 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 = 500.f;
Desc.fY = 500.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_pDiffuse_TextureCom), 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()
@@ -109,7 +112,7 @@ HRESULT CMiniMap_Panel::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_Keyboard_0"), reinterpret_cast<CComponent**>(&m_pDiffuse_TextureCom), nullptr)))
{
return E_FAIL;
}
@@ -121,6 +124,11 @@ HRESULT CMiniMap_Panel::Ready_Components(void* pArg)
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);
+15 -5
View File
@@ -30,7 +30,8 @@ class CIMGUIUI final : public CGameObject
virtual HRESULT Initialize(void* pArg) override;
private:
void wstringTostring(vector<wstring>& panelNames);
void PanelwstringTostring(vector<wstring>& panelNames);
void ElementwstringTostring(vector<wstring>& panelNames);
private:
CGameObject* m_pGamePlay_Canvas = { nullptr };
@@ -41,11 +42,20 @@ class CIMGUIUI final : public CGameObject
_float3 m_fSizeXY{};
_float m_fTimeMult{};
_int m_iPanelCount{};
_float2 m_fPanelPos{};
_float2 m_fPanelSize{};
_float3 m_fPanelSizeXY{};
_float m_fPanelTimeMult{};
_int m_iElementCount{};
vector<wstring> m_pNamewstring;
vector<string> m_pNamestring;
vector<const _char*> m_pName;
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,6 +26,7 @@ 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;
@@ -33,10 +34,9 @@ class CLoading_Panel final : public CPanelObject
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_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 };
public:
static CMiniMap_Panel* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
+2 -21
View File
@@ -69,23 +69,6 @@ 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())
@@ -112,10 +95,6 @@ const vector<wstring> CPanelObject::Element_Name()
return m_ElementName;
}
void CPanelObject::Move_Panel(_float fX, _float fY)
{
}
void CPanelObject::Add_Element(wstring Name, CGameObject* pPanel)
{
if (pPanel == nullptr)
@@ -129,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)
@@ -25,15 +25,11 @@ class ENGINE_DLL CPanelObject abstract : public CUIObject
virtual HRESULT Ready_Element(void* pArg);
public:
virtual void MoveX(_float fX) override;
virtual void MoveY(_float fY) override;
virtual void Move_Panel(_float fX, _float fY);
virtual void Visible(_bool bVisible) override;
virtual class CGameObject* Get_Element(const wstring& Name);
virtual _int Element_Count();
virtual const vector<wstring> Element_Name();
protected:
virtual void Add_Element(wstring Name, class CGameObject* pPanel);