class
MBudgetMeter
- Module
- Miri
- Header
#include "Miri/Widgets/MBudgetMeter.h"- Namespace
Miri
Public functions
| Returns | Name | Description |
|---|---|---|
MIRI_WIDGET_ARGS | ||
void | SetValue | |
float | GetRatio | |
const MiriColor* | FillToken | The fill token for a value / budget ratio. |
std::string | Caption | "182 MB of 256 MB · 71 %". |
float | Paint | The meter at rect (bar on top, caption under it) for hosts that paint their own card; returns the height it used. |
MiriVec2 | ComputeDesiredSize | |
int32_t | OnPaint | |
const char* | GetTypeName |
Function details
MIRI_WIDGET_ARGS
C++
MIRI_WIDGET_ARGS(MBudgetMeter) MIRI_ARG(float, Value) MIRI_ARG(float, Budget) MIRI_ARG(std::string, Unit) MIRI_ARG(int32_t, Decimals) MIRI_WIDGET_ARGS_END() void Construct(const CArguments& args)SetValue
C++
void SetValue(float value, float budget)GetRatio
C++
float GetRatio() constFillToken
C++
static const MiriColor* FillToken(float ratio)The fill token for a value / budget ratio.
Caption
C++
static std::string Caption(float value, float budget, const std::string& unit, int32_t decimals)"182 MB of 256 MB · 71 %".
Paint
C++
static float Paint(CMiriRenderer& renderer, const MiriRect& rect, float value, float budget, const std::string& unit, int32_t decimals, float opacity)The meter at rect (bar on top, caption under it) for hosts that paint their own card; returns the height it used.
ComputeDesiredSize
C++
MiriVec2 ComputeDesiredSize(float scale) const overrideOnPaint
C++
int32_t OnPaint(const CMiriPaintArgs& args, const CGeometry& geo, CMiriRenderer& renderer, int32_t layerId) const overrideGetTypeName
C++
const char* GetTypeName() const overrideGenerated from Miri/Widgets/MBudgetMeter.h via miri.json · Dec 5, 2026Version 1.1.0