Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Olympe::GraphComment Struct Reference

A rectangular comment box placed on the graph canvas. More...

#include <GraphComment.h>

Public Member Functions

nlohmann::json ToJson () const
 

Static Public Member Functions

static GraphComment FromJson (const nlohmann::json &j)
 

Public Attributes

int id = -1
 Unique comment ID (assigned by CommentManager)
 
std::string text
 Text content displayed inside the box.
 
float posX = 0.0f
 Left edge in graph space.
 
float posY = 0.0f
 Top edge in graph space.
 
float width = 200.0f
 Box width in graph space.
 
float height = 80.0f
 Box height in graph space.
 
unsigned int color = 0xFFFFAA33u
 RGBA packed colour (default: amber)
 
float fontSize = 14.0f
 Font size in points.
 
bool isVisible = true
 Whether the comment is drawn.
 

Detailed Description

A rectangular comment box placed on the graph canvas.

Definition at line 34 of file GraphComment.h.

Member Function Documentation

◆ FromJson()

GraphComment Olympe::GraphComment::FromJson ( const nlohmann::json j)
static

Definition at line 35 of file GraphComment.cpp.

References GetComponentTypeID_Static(), and id.

Referenced by Olympe::CommentManager::LoadFromJson().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToJson()

json Olympe::GraphComment::ToJson ( ) const

Definition at line 20 of file GraphComment.cpp.

References color, fontSize, GetComponentTypeID_Static(), height, id, isVisible, posX, posY, text, and width.

+ Here is the call graph for this function:

Member Data Documentation

◆ color

unsigned int Olympe::GraphComment::color = 0xFFFFAA33u

RGBA packed colour (default: amber)

Definition at line 41 of file GraphComment.h.

Referenced by ToJson().

◆ fontSize

float Olympe::GraphComment::fontSize = 14.0f

Font size in points.

Definition at line 42 of file GraphComment.h.

Referenced by ToJson().

◆ height

float Olympe::GraphComment::height = 80.0f

Box height in graph space.

Definition at line 40 of file GraphComment.h.

Referenced by ToJson().

◆ id

int Olympe::GraphComment::id = -1

Unique comment ID (assigned by CommentManager)

Definition at line 35 of file GraphComment.h.

Referenced by Olympe::CommentManager::AddComment(), FromJson(), ToJson(), and Olympe::CommentManager::UpdateComment().

◆ isVisible

bool Olympe::GraphComment::isVisible = true

Whether the comment is drawn.

Definition at line 43 of file GraphComment.h.

Referenced by ToJson().

◆ posX

float Olympe::GraphComment::posX = 0.0f

Left edge in graph space.

Definition at line 37 of file GraphComment.h.

Referenced by ToJson().

◆ posY

float Olympe::GraphComment::posY = 0.0f

Top edge in graph space.

Definition at line 38 of file GraphComment.h.

Referenced by ToJson().

◆ text

std::string Olympe::GraphComment::text

Text content displayed inside the box.

Definition at line 36 of file GraphComment.h.

Referenced by ToJson().

◆ width

float Olympe::GraphComment::width = 200.0f

Box width in graph space.

Definition at line 39 of file GraphComment.h.

Referenced by ToJson().


The documentation for this struct was generated from the following files: