Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxLHy0424 committed Sep 7, 2024
1 parent 8ec0a36 commit d91578c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class CUI{
height=tmp.dwSize.Y;
width=tmp.dwSize.X;
}
auto clearScreen(){
auto cls(){
getConsoleSize();
setCursor({0,0});
for(i16 i{};i<height;++i){
Expand All @@ -137,7 +137,7 @@ class CUI{
setCursor({0,data.pos.Y});
}
auto initPosition(){
clearScreen();
cls();
for(auto &data:lineData){
data.pos=getCursor();
data.color.setDefault();
Expand All @@ -161,7 +161,7 @@ class CUI{
for(auto &data:lineData){
if(data==mouseEvent.dwMousePosition){
if(data.fn!=nullptr){
clearScreen();
cls();
data.color.setDefault();
addAttrs();
showCursor();
Expand Down Expand Up @@ -213,7 +213,7 @@ class CUI{
}
}
}
clearScreen();
cls();
Sleep(50);
}
};

0 comments on commit d91578c

Please sign in to comment.