32 lines
943 B
Text
32 lines
943 B
Text
|
|
// module;
|
||
|
|
|
||
|
|
// #include <cstdint>
|
||
|
|
|
||
|
|
// export module Crafter.Graphics:UiImage;
|
||
|
|
// import Crafter.Event;
|
||
|
|
// import :UiElement;
|
||
|
|
|
||
|
|
// export namespace Crafter {
|
||
|
|
// class UiImage : public UiElement {
|
||
|
|
// public:
|
||
|
|
// int test = 150;
|
||
|
|
// Pixel* image;
|
||
|
|
// UiImage() {
|
||
|
|
|
||
|
|
// }
|
||
|
|
// void Draw(Pixel* buffer, std::uint32_t x, std::uint32_t y, std::uint32_t right, std::uint32_t down) override {
|
||
|
|
// width = 128;
|
||
|
|
// height = 128;
|
||
|
|
// for(std::uint32_t x = 0; x < 128; x++) {
|
||
|
|
// for(std::uint32_t y = 0; y < 128; y++) {
|
||
|
|
// buffer[x*128+y].r = test%255;
|
||
|
|
// buffer[x*128+y].g = test%255;
|
||
|
|
// buffer[x*128+y].b = test%255;
|
||
|
|
// buffer[x*128+y].a = 255;
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
// test++;
|
||
|
|
// }
|
||
|
|
// ~UiImage() override {};
|
||
|
|
// };
|
||
|
|
// }
|