#include "FixedText.hpp"
#include "MessageBox.hpp"
#include "../graphics/EntityMesh.hpp"
-#include "../graphics/OutlineMesh.hpp"
+#include "../graphics/PrimitiveMesh.hpp"
#include <glm/glm.hpp>
class Block;
class BlockTypeRegistry;
class Config;
+class CongestionControl;
class Environment;
class Font;
class Player;
void UpdatePosition();
void UpdateOrientation();
+ // net stats
+ void UpdateNetStats(const CongestionControl &);
+
// message box
void PostMessage(const char *);
void PostMessage(const std::string &msg) {
PostMessage(msg.c_str());
}
+ // whether to always render message box regardless of last post
+ void KeepMessages(bool k) { msg_keep = k; }
void Update(int dt);
void Render(Viewport &) noexcept;
const Player &player;
// block focus
- OutlineMesh outline;
+ PrimitiveMesh outline;
glm::mat4 outline_transform;
bool outline_visible;
bool show_block;
bool show_entity;
+ // net stats
+ FixedText bandwidth_text;
+ FixedText rtt_text;
+ FixedText packet_loss_text;
+ bool show_net;
+
// message box
MessageBox messages;
- IntervalTimer msg_timer;
+ CoarseTimer msg_timer;
+ bool msg_keep;
// crosshair
- OutlineMesh crosshair;
+ PrimitiveMesh crosshair;
};