initial port for Cevo game in C++ (libs)
This commit is contained in:
commit
8436242032
375 files changed
+46282
No files matched your search
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "Cevo/CevoButtonBase.h"
|
||||
|
||||
namespace Cevo {
|
||||
|
||||
// TButtonB equivalent: a 25x25 button whose sprite is cut out with a mask
|
||||
// (SRCAND) and painted in (SRCPAINT) over the background, selected by
|
||||
// ButtonIndex from a 12-columns-wide grid.
|
||||
class ButtonB : public ButtonBase {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ButtonB(QWidget *parent = nullptr);
|
||||
|
||||
Dpi::Bitmap *mask() const { return m_mask; }
|
||||
void setMask(Dpi::Bitmap *value) { m_mask = value; }
|
||||
int buttonIndex() const { return m_index; }
|
||||
void setButtonIndex(int value);
|
||||
|
||||
protected:
|
||||
void paint(Dpi::Canvas &canvas) override;
|
||||
|
||||
private:
|
||||
Dpi::Bitmap *m_mask = nullptr;
|
||||
int m_index = -1;
|
||||
Dpi::Bitmap m_buffer;
|
||||
};
|
||||
|
||||
} // namespace Cevo
|
||||
Reference in new issue
Block a user