39 lines
721 B
C
39 lines
721 B
C
|
//
|
||
|
// Created by jedi on 11/1/18.
|
||
|
//
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include "hal/hal.h"
|
||
|
#include "gfx/Canvas.h"
|
||
|
|
||
|
namespace micromenu {
|
||
|
|
||
|
class Screen {
|
||
|
private:
|
||
|
const int width_;
|
||
|
const int height_;
|
||
|
|
||
|
public:
|
||
|
explicit Screen(int w, int h) noexcept;
|
||
|
|
||
|
void draw(int x, int y);
|
||
|
|
||
|
void draw(int x, int y, Canvas &c);
|
||
|
|
||
|
void print(int x, int y, const char *str, Font & = basic_5x4);
|
||
|
|
||
|
void print(int x, int y, char *str, Font & = basic_5x4);
|
||
|
|
||
|
[[nodiscard]] int getWidth() const{
|
||
|
return width_;
|
||
|
}
|
||
|
|
||
|
[[nodiscard]] int getHeight() const{
|
||
|
return height_;
|
||
|
}
|
||
|
|
||
|
};
|
||
|
|
||
|
}
|