[Modify] 폰트 위치 수정
This commit is contained in:
@@ -274,20 +274,20 @@ HRESULT CLevel_GamePlay::Ready_Background()
|
||||
{
|
||||
|
||||
|
||||
#if 진우
|
||||
|
||||
#else
|
||||
/* 전체 맵 */
|
||||
CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data");
|
||||
|
||||
/* 물 오브젝트 */
|
||||
if (FAILED(CInfoInstance::GetInstance()->Load_WaterElemet("Element_Water_Info"))) {
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
/* 조명 오브젝트 */
|
||||
CInfoInstance::GetInstance()->Load_LightElements("LightElement");
|
||||
#endif
|
||||
//#if 진우
|
||||
//
|
||||
//#else
|
||||
// /* 전체 맵 */
|
||||
// CInfoInstance::GetInstance()->Load_MapObjects("Hogsmeade_MapContainer_Data");
|
||||
//
|
||||
// /* 물 오브젝트 */
|
||||
// if (FAILED(CInfoInstance::GetInstance()->Load_WaterElemet("Element_Water_Info"))) {
|
||||
// return E_FAIL;
|
||||
// }
|
||||
//
|
||||
// /* 조명 오브젝트 */
|
||||
// CInfoInstance::GetInstance()->Load_LightElements("LightElement");
|
||||
//#endif
|
||||
|
||||
/* 상호작용 오브젝트 */
|
||||
CInfoInstance::GetInstance()->Load_InteractableElements("E_INTER_Barrel");
|
||||
|
||||
@@ -55,6 +55,7 @@ HRESULT CQuest_Slot::Initialize(void* pArg)
|
||||
m_pVIBufferCom->Set_Pos(-475.f, 330.f, m_fOffSetX, m_fOffSetY, m_iCols);
|
||||
m_pVIBufferCom->Set_Size(m_fSizeX, m_fSizeY);
|
||||
m_iQuestCount = m_pInfoInstance->Get_Quest_Count(ENUM_CLASS(QUESTSTATE::NONE));
|
||||
Set_QuestType(ENUM_CLASS(QUESTSTATE::NONE));
|
||||
Visible(true);
|
||||
return S_OK;
|
||||
}
|
||||
@@ -99,7 +100,7 @@ void CQuest_Slot::Update(_float fTimeDelta)
|
||||
}
|
||||
}
|
||||
Hover();
|
||||
|
||||
Font_Size();
|
||||
static_cast<CUIObject*>(m_pOwner)->Function_Callback(TEXT("QuestListHover"), &m_Info);
|
||||
|
||||
|
||||
@@ -139,19 +140,53 @@ HRESULT CQuest_Slot::Render()
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
for (_int i = 0; i < m_iQuestCount; ++i)
|
||||
{
|
||||
m_pGameInstance->Render_Text(m_Fonts[i].pFontSizeName.c_str(), m_Fonts[i].pQuestName.c_str(), m_Fonts[i].m_fFontSize);
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CQuest_Slot::Font_Size()
|
||||
{
|
||||
for (_int i = 0; i < m_iQuestCount; ++i)
|
||||
{
|
||||
m_fFontY = 190 + i * 85.f;
|
||||
if (i == m_Info.iQuestIndex)
|
||||
if (m_Info.iQuestIndex == -1)
|
||||
{
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size30"), m_pInfoInstance->Get_Quest(m_Info.iQuestCategory, i).pQuestName.c_str(), _float2(m_fFontX - 10.f + m_fX, m_fFontY - 10.F - m_fY));
|
||||
m_Fonts[i].pFontSizeName = TEXT("Font_size20");
|
||||
m_Fonts[i].m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pGameInstance->Render_Text(TEXT("Font_size20"), m_pInfoInstance->Get_Quest(m_Info.iQuestCategory, i).pQuestName.c_str(), _float2(m_fFontX + m_fX, m_fFontY - m_fY));
|
||||
if (i == m_Info.iQuestIndex)
|
||||
{
|
||||
m_Fonts[i].pFontSizeName = TEXT("Font_size30");
|
||||
m_Fonts[i].m_fFontSize = _float2(m_fFontX - 10.f + m_fX, m_fFontY - 10.f - m_fY);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Fonts[i].pFontSizeName = TEXT("Font_size20");
|
||||
m_Fonts[i].m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY);
|
||||
}
|
||||
}
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
void CQuest_Slot::Font_Setting(_int Index)
|
||||
{
|
||||
m_Fonts.clear();
|
||||
FontInfo Fonts;
|
||||
|
||||
for (_int i = 0; i < Index; ++i)
|
||||
{
|
||||
m_fFontY = 190 + i * 85.f;
|
||||
Fonts.pFontSizeName = TEXT("Font_size20");
|
||||
Fonts.pQuestName = m_pInfoInstance->Get_Quest(m_Info.iQuestCategory, i).pQuestName.c_str();
|
||||
Fonts.m_fFontSize = _float2(m_fFontX + m_fX, m_fFontY - m_fY);
|
||||
|
||||
m_Fonts.push_back(Fonts);
|
||||
}
|
||||
}
|
||||
|
||||
_vector CQuest_Slot::Get_WorldPostion()
|
||||
@@ -258,7 +293,7 @@ void CQuest_Slot::Hover()
|
||||
fMouse.x = ptMouse.x - (g_iWinSizeX * 0.5f);
|
||||
fMouse.y = -(ptMouse.y - (g_iWinSizeY * 0.5f));
|
||||
|
||||
m_Info.iQuestIndex= m_pVIBufferCom->Set_Mouse_Hover(fMouse);
|
||||
m_Info.iQuestIndex = m_pVIBufferCom->Set_Mouse_Hover(fMouse);
|
||||
|
||||
if (m_Info.iQuestIndex != -1)
|
||||
{
|
||||
@@ -270,6 +305,7 @@ void CQuest_Slot::Hover()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CQuest_Slot::Set_QuestType(_int Index)
|
||||
{
|
||||
switch (Index)
|
||||
@@ -295,6 +331,7 @@ void CQuest_Slot::Set_QuestType(_int Index)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Font_Setting(m_iQuestCount);
|
||||
}
|
||||
|
||||
CQuest_Slot* CQuest_Slot::Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext)
|
||||
|
||||
@@ -13,6 +13,12 @@ NS_BEGIN(Client)
|
||||
|
||||
class CQuest_Slot final : public CElementObject
|
||||
{
|
||||
struct FontInfo
|
||||
{
|
||||
_wstring pFontSizeName;
|
||||
_wstring pQuestName;
|
||||
_float2 m_fFontSize{};
|
||||
};
|
||||
private:
|
||||
CQuest_Slot(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
CQuest_Slot(const CQuest_Slot& rhs);
|
||||
@@ -37,6 +43,8 @@ class CQuest_Slot final : public CElementObject
|
||||
|
||||
private:
|
||||
void Hover();
|
||||
void Font_Size();
|
||||
void Font_Setting(_int Index);
|
||||
|
||||
public:
|
||||
void Set_QuestType(_int Index);
|
||||
@@ -54,6 +62,7 @@ class CQuest_Slot final : public CElementObject
|
||||
|
||||
_int m_iCurrentQeustClick{};
|
||||
_int m_iQuestCount{};
|
||||
vector<FontInfo> m_Fonts;
|
||||
public:
|
||||
static CQuest_Slot* Create(ID3D11Device* pDevice, ID3D11DeviceContext* pContext);
|
||||
virtual CGameObject* Clone(void* pArg, class CGameObject* pOwner) override;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user