Skip to content

Commit

Permalink
directvt#400 WIP: Fix realtime statistics (debug)
Browse files Browse the repository at this point in the history
  • Loading branch information
o-sdn-o committed Oct 27, 2023
1 parent d0d2de9 commit d311554
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
22 changes: 14 additions & 8 deletions src/netxs/desktopio/console.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -591,13 +591,19 @@ namespace netxs::ui
X(mouse_btn_6 , "left+right combo" ) \
X(last_event , "event" )

#define X(a, b) a,
enum prop { prop_list count };
#undef X
enum prop
{
#define X(a, b) a,
prop_list
#undef X
};

#define X(a, b) b,
text description[prop::count] = { prop_list };
#undef X
static constexpr auto description = std::to_array(
{
#define X(a, b) b##sv,
prop_list
#undef X
});
#undef prop_list

base& boss;
Expand All @@ -621,7 +627,7 @@ namespace netxs::ui

void shadow()
{
for (auto i = 0; i < prop::count; i++)
for (auto i = 0; i < description.size(); i++)
{
status[i].ease();
}
Expand All @@ -643,7 +649,6 @@ namespace netxs::ui
{
shadow();
status[prop::last_event].set(stress) = "size";

status[prop::win_size].set(stress) =
std::to_string(new_size.x) + " x " +
std::to_string(new_size.y);
Expand Down Expand Up @@ -673,6 +678,7 @@ namespace netxs::ui
utf::format(track.totals) + " bytes";

track.number++;
status.reindex();
canvas.output(status);
}
void stop()
Expand Down
13 changes: 6 additions & 7 deletions src/netxs/desktopio/richtext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2444,13 +2444,12 @@ namespace netxs::ui
X(menu_white, "Light menu color") \
X(menu_black, "Dark menu color")

#define X(a, b) a,
enum prop { prop_list count };
#undef X

//#define X(a, b) b,
//text description[prop::count] = { prop_list };
//#undef X
enum prop
{
#define X(a, b) a,
prop_list
#undef X
};
#undef prop_list

prop active = prop::brighter;
Expand Down

0 comments on commit d311554

Please sign in to comment.