Changeset View
Changeset View
Standalone View
Standalone View
source/gui/CChart.cpp
Show All 26 Lines | |||||
#include "renderer/Renderer.h" | #include "renderer/Renderer.h" | ||||
#include "third_party/cppformat/format.h" | #include "third_party/cppformat/format.h" | ||||
#include <cmath> | #include <cmath> | ||||
CChart::CChart(CGUI* pGUI) | CChart::CChart(CGUI* pGUI) | ||||
: IGUIObject(pGUI), IGUITextOwner(pGUI) | : IGUIObject(pGUI), IGUITextOwner(pGUI) | ||||
{ | { | ||||
} | |||||
CChart::~CChart() | |||||
{ | |||||
} | |||||
void CChart::AddSettings() | |||||
{ | |||||
AddSetting(GUIST_CGUIColor, "axis_color"); | AddSetting(GUIST_CGUIColor, "axis_color"); | ||||
AddSetting(GUIST_float, "axis_width"); | AddSetting(GUIST_float, "axis_width"); | ||||
AddSetting(GUIST_float, "buffer_zone"); | AddSetting(GUIST_float, "buffer_zone"); | ||||
AddSetting(GUIST_CStrW, "font"); | AddSetting(GUIST_CStrW, "font"); | ||||
AddSetting(GUIST_CStrW, "format_x"); | AddSetting(GUIST_CStrW, "format_x"); | ||||
AddSetting(GUIST_CStrW, "format_y"); | AddSetting(GUIST_CStrW, "format_y"); | ||||
AddSetting(GUIST_CGUIList, "series_color"); | AddSetting(GUIST_CGUIList, "series_color"); | ||||
AddSetting(GUIST_CGUISeries, "series"); | AddSetting(GUIST_CGUISeries, "series"); | ||||
AddSetting(GUIST_EAlign, "text_align"); | AddSetting(GUIST_EAlign, "text_align"); | ||||
GUI<float>::GetSetting(this, "axis_width", m_AxisWidth); | GUI<float>::GetSetting(this, "axis_width", m_AxisWidth); | ||||
GUI<CStrW>::GetSetting(this, "format_x", m_FormatX); | GUI<CStrW>::GetSetting(this, "format_x", m_FormatX); | ||||
GUI<CStrW>::GetSetting(this, "format_y", m_FormatY); | GUI<CStrW>::GetSetting(this, "format_y", m_FormatY); | ||||
} | |||||
CChart::~CChart() | IGUIObject::AddSettings(); | ||||
{ | |||||
} | } | ||||
void CChart::HandleMessage(SGUIMessage& Message) | void CChart::HandleMessage(SGUIMessage& Message) | ||||
{ | { | ||||
// TODO: implement zoom | // TODO: implement zoom | ||||
switch (Message.type) | switch (Message.type) | ||||
{ | { | ||||
case GUIM_SETTINGS_UPDATED: | case GUIM_SETTINGS_UPDATED: | ||||
▲ Show 20 Lines • Show All 273 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator