Animation demo
This commit is contained in:
53
main.cpp
53
main.cpp
@@ -2,6 +2,7 @@
|
||||
#include <Desktop.hpp>
|
||||
#include <Console.hpp>
|
||||
#include <source_location>
|
||||
#include <unistd.h>
|
||||
|
||||
class Debug : public Mutil::Logging::LoggerObj {
|
||||
std::string NormalRen = Mutil::Console::Graphics::Rendition().Compile();
|
||||
@@ -65,17 +66,53 @@ int main() {
|
||||
display << "DICK" << "FUCK" << std::endl;
|
||||
display.m({});
|
||||
|
||||
//display.H(12, 40);
|
||||
//display << "λ" << std::endl;
|
||||
|
||||
display.J(2);
|
||||
//display << "\x1b[?47h";
|
||||
for (uint i = 1; i < 24; i++) {
|
||||
//display.J(2);
|
||||
Mutil::Console::Graphics::Rendition r(0, i);
|
||||
display.H(i, i+1);
|
||||
display.m(r);
|
||||
display << std::format("F{}", i) << "λ" << std::endl;
|
||||
// 1 second = 1000000 microseconds
|
||||
// 24 frames (technically)
|
||||
// 1000000 / 24
|
||||
// 41666 microseconds between frames roughly
|
||||
usleep(41666*2);
|
||||
display.A();
|
||||
display.m(r);
|
||||
display.G(i+std::string(std::format("F{}λ", i)).size()-1);
|
||||
usleep(41666*2);
|
||||
display.K();
|
||||
for (uint j = i+std::string(std::format("F{}λ", i)).size()-1; j < 80; j++) {
|
||||
display << "-" << std::endl;
|
||||
display.A();
|
||||
display.G(j);
|
||||
usleep(41666/2);
|
||||
}
|
||||
display << "λ";
|
||||
display << '\n';
|
||||
//display.K(0);
|
||||
|
||||
}
|
||||
display.m({});
|
||||
//display << '\n';
|
||||
//display << "\x1b[?47l";
|
||||
|
||||
|
||||
//display << "\x1b[?47h";
|
||||
display.H();
|
||||
display.J(2);
|
||||
display.s();
|
||||
display.H(24,80);
|
||||
display.m({Mutil::Console::Graphics::RUnderline, 27});
|
||||
display << "SomethingSomethingAsshole" << std::endl;
|
||||
////display.H();
|
||||
////display.J(2);
|
||||
////display.s();
|
||||
////display.H(24,80);
|
||||
////display.m({Mutil::Console::Graphics::RUnderline, 27});
|
||||
////display << "SomethingSomethingAsshole" << std::endl;
|
||||
//display.H(3,3);
|
||||
display.m({});
|
||||
display.u();
|
||||
////display.m({});
|
||||
////display.u();
|
||||
//display.s();
|
||||
//display.H(24,80);
|
||||
//display << "0" << std::endl;
|
||||
|
Reference in New Issue
Block a user