Improve usage of Line types
This commit is contained in:
@@ -7,10 +7,12 @@ namespace ScreenCenter {
|
||||
|
||||
class Frame : public GPU::internal::LinkedElementCreator<Frame> {
|
||||
private:
|
||||
GPU::TILE top_left[2];
|
||||
GPU::TILE top_right[2];
|
||||
GPU::TILE bottom_left[2];
|
||||
GPU::TILE bottom_right[2];
|
||||
GPU::TILE top_left[2];
|
||||
GPU::TILE top_right[2];
|
||||
GPU::TILE bottom_left[2];
|
||||
GPU::TILE bottom_right[2];
|
||||
GPU::LINE_G_MULTI<5> border;
|
||||
GPU::LINE_G_SINGLE cross[2];
|
||||
|
||||
public:
|
||||
static constexpr Frame::Linked create() {
|
||||
@@ -30,6 +32,17 @@ namespace ScreenCenter {
|
||||
|
||||
frame.bottom_right[0] = Make::TILE(Make::AreaI16(GPU::Display::Width - Size.height, GPU::Display::Height - Size.width, Size.height, Size.width), BaseColor);
|
||||
frame.bottom_right[1] = Make::TILE(Make::AreaI16(GPU::Display::Width - Size.width, GPU::Display::Height - Size.height, Size.width, Size.height), BaseColor);
|
||||
|
||||
frame.border = Make::LINE_G(
|
||||
GPU::ColorVertex{GPU::Color24::Red(), Make::Vertex(0, 0)},
|
||||
GPU::ColorVertex{GPU::Color24::Green(), Make::Vertex(0, GPU::Display::Height - 1)},
|
||||
GPU::ColorVertex{GPU::Color24::Blue(), Make::Vertex(GPU::Display::Width - 1, GPU::Display::Height - 1)},
|
||||
GPU::ColorVertex{GPU::Color24::Yellow(), Make::Vertex(GPU::Display::Width - 1, 0)},
|
||||
GPU::ColorVertex{GPU::Color24::Red(), Make::Vertex(0, 0)}
|
||||
);
|
||||
|
||||
frame.cross[0] = Make::LINE_G(frame.border[0], frame.border[2]);
|
||||
frame.cross[1] = Make::LINE_G(frame.border[3], frame.border[1]);
|
||||
return frame.linked();
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user