missing implementation in cevowidgets

This commit is contained in:
Geoffray Levasseur committed 2026-10-28 18:07:38 +01:00
1 parent e9c191d46f
commit 713ef99e2f
4 files changed
+30

No files matched your search

+16
View File
@@ -28,6 +28,8 @@
#include "Cevo/CevoDrawDlg.h"
#include "Cevo/CevoArea.h"
#include "Cevo/CevoButtonA.h"
#include "Cevo/CevoButtonB.h"
#include "Cevo/CevoButtonBase.h"
#include "Cevo/CevoScreenTools.h"
#include "Cevo/CevoTexture.h"
@@ -108,6 +110,20 @@ void DrawDlg::centerToScreen(int w, int h)
monitor.top() + (monitor.height() - h) / 2, w, h);
}
void DrawDlg::initButtons()
{
const auto children = findChildren<ButtonBase *>(QString(), Qt::FindDirectChildrenOnly);
for (ButtonBase *button : children) {
if (HGrSystem)
button->setGraphic(&HGrSystem->data);
if (auto *buttonA = qobject_cast<ButtonA *>(button))
buttonA->setFont(UniFont[static_cast<std::size_t>(FontType::Button)]);
if (auto *buttonB = qobject_cast<ButtonB *>(button))
if (HGrSystem)
buttonB->setMask(&HGrSystem->mask);
}
}
// ---- BaseMessgDlg ----
BaseMessgDlg::BaseMessgDlg(QWidget *parent) : DrawDlg(parent)