Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
60
GameTools/NeoRylClient/GUIButtonManager.cpp
Normal file
60
GameTools/NeoRylClient/GUIButtonManager.cpp
Normal file
@@ -0,0 +1,60 @@
|
||||
// GUIButtonManager.cpp: implementation of the CGUIButtonManager class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "GUIButtonManager.h"
|
||||
|
||||
CGUIButtonManager g_ButtonManager;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
CGUIButtonManager::CGUIButtonManager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CGUIButtonManager::~CGUIButtonManager()
|
||||
{
|
||||
DestroyAllButton();
|
||||
}
|
||||
|
||||
BOOL CGUIButtonManager::AddButton(CGUIButton *pButton)
|
||||
{
|
||||
m_lstButton.push_back(pButton);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CGUIButtonManager::Update(void)
|
||||
{
|
||||
vector<CGUIButton *>::iterator it;
|
||||
|
||||
for(it = m_lstButton.begin(); it != m_lstButton.end(); it++)
|
||||
{
|
||||
(*it)->Update();
|
||||
}
|
||||
}
|
||||
|
||||
void CGUIButtonManager::DestroyAllButton()
|
||||
{
|
||||
vector<CGUIButton *>::iterator it;
|
||||
|
||||
for(it = m_lstButton.begin(); it != m_lstButton.end(); it++)
|
||||
{
|
||||
if((*it)) { delete (*it); (*it) = NULL; }
|
||||
}
|
||||
|
||||
m_lstButton.clear();
|
||||
}
|
||||
|
||||
void CGUIButtonManager::Render(LPDIRECT3DDEVICE8 lpD3DDevice, unsigned char cAlpha)
|
||||
{
|
||||
vector<CGUIButton *>::iterator it;
|
||||
|
||||
for(it = m_lstButton.begin(); it != m_lstButton.end(); it++)
|
||||
{
|
||||
if((*it)->m_bShow) (*it)->Render(lpD3DDevice, cAlpha);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user