CommentBox.hpp

Create a light grey “comment bubble.”.

TODO: When prefab tools for adding mobile only and desktop only content are created, remove AddMobileContent(), desktop_content and mobile_content divs, and ConfigPanel as a friend class. AddContent() should stream into all_content div.

class CommentBox : public Div
#include <CommentBox.hpp>

Use CommentBox class to create a light grey “comment bubble”. Optionally, it can contain text and other web elements.

Public Functions

inline CommentBox(const std::string id = "")
template<typename T>
inline void AddContent(T val)

Take input of any type and add it to the comment box. Content will show on all screen sizes.

Protected Functions

template<typename T>
inline void AddMobileContent(T val)

Add content only to be shown on small screens.

Private Members

std::string box_base = this->GetID()
Div triangle = {to_string(box_base, "_triangle")}
Div all_content = {to_string(box_base, "_all_content")}
Div desktop_content = {to_string(box_base, "_desktop_content")}
Div mobile_content = {to_string(box_base, "_mobile_content")}