Menus can now have a title and a Cancel button

This commit is contained in:
Bertrand Songis
2019-11-04 18:31:50 +01:00
parent c744ee226a
commit 3e3d8b95e7
6 changed files with 134 additions and 47 deletions
+17 -6
View File
@@ -108,6 +108,17 @@ class BitmapBufferBase
this->offsetY = offsetY;
}
inline void clearOffset()
{
setOffset(0, 0);
}
inline void reset()
{
clearOffset();
clearClippingRect();
}
coord_t getOffsetX() const
{
return offsetX;
@@ -146,8 +157,8 @@ class BitmapBufferBase
inline const pixel_t * getPixelPtr(coord_t x, coord_t y) const
{
#if defined(PCBX10) && !defined(SIMU)
x = width - x - 1;
y = height - y - 1;
x = _width - x - 1;
y = _height - y - 1;
#endif
return &data[y * _width + x];
}
@@ -284,8 +295,8 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
inline const pixel_t * getPixelPtr(coord_t x, coord_t y) const
{
#if defined(PCBX10) && !defined(SIMU)
x = width - x - 1;
y = height - y - 1;
x = _width - x - 1;
y = _height - y - 1;
#endif
return &data[y * _width + x];
}
@@ -293,8 +304,8 @@ class BitmapBuffer: public BitmapBufferBase<uint16_t>
inline pixel_t * getPixelPtr(coord_t x, coord_t y)
{
#if defined(PCBX10) && !defined(SIMU)
x = width - x - 1;
y = height - y - 1;
x = _width - x - 1;
y = _height - y - 1;
#endif
return &data[y * _width + x];
}