[saco] Implement/match CMenu::SetColumnTitle(...)

This commit is contained in:
RD42 2024-07-16 23:30:56 +08:00
parent 24286cb0fc
commit f51ecadaef
2 changed files with 11 additions and 0 deletions

View File

@ -44,6 +44,16 @@ void CMenu::AddMenuItem(BYTE byteColumn, BYTE byteRow, PCHAR pText)
strcpy(m_charItems[byteRow][byteColumn], pText);
}
void CMenu::SetColumnTitle(BYTE byteColumn, PCHAR pText)
{
if(strlen(pText) > MAX_MENU_LINE) return;
if(byteColumn >= MAX_COLUMNS) return;
memset(m_charHeader[byteColumn], 0, sizeof(m_charHeader[byteColumn]));
strcpy(m_charHeader[byteColumn], pText);
}
void CMenu::Show()
{
ScriptCommand(&create_panel, m_charTitle[0] ? "SAMPHED" : "DUMMY", m_fXPos, m_fYPos, (m_fCol1Width + m_fCol2Width) / m_byteColumns, m_byteColumns, m_MenuInteraction.bMenu, 1, 1, &m_dwPanel);

View File

@ -42,6 +42,7 @@ public:
void SetTitle(PCHAR pTitle);
void AddMenuItem(BYTE byteColumn, BYTE byteRow, PCHAR pText);
void SetColumnTitle(BYTE byteColumn, PCHAR pText);
void Show();
void Hide();
PCHAR GetMenuItem(BYTE byteColumn, BYTE byteRow);