#include <tool.h>
Collaboration diagram for WearBarParams:Public Types | |
| enum | BlendMode : u8 { BLEND_MODE_CONSTANT , BLEND_MODE_LINEAR , BlendMode_END } |
Public Member Functions | |
| WearBarParams (const std::map< f32, video::SColor > &colorStops, BlendMode blend) | |
| WearBarParams (const video::SColor color) | |
| void | serialize (std::ostream &os) const |
| void | serializeJson (std::ostream &os) const |
| video::SColor | getWearBarColor (f32 durabilityPercent) |
Static Public Member Functions | |
| static WearBarParams | deserialize (std::istream &is) |
| static std::optional< WearBarParams > | deserializeJson (std::istream &is) |
Public Attributes | |
| std::map< f32, video::SColor > | colorStops |
| BlendMode | blend |
Static Public Attributes | |
| constexpr static const EnumString | es_BlendMode [3] |
| enum WearBarParams::BlendMode : u8 |
|
inline |
|
inline |
|
static |
References WearBarParams(), blend, BlendMode_END, colorStops, readARGB8(), readF32(), readU16(), and readU8().
Referenced by ItemDefinition::deSerialize().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
References WearBarParams(), blend, colorStops, es_BlendMode, parseColorString(), stof, and string_to_enum().
Referenced by ItemStackMetadata::updateWearBarParams().
Here is the call graph for this function:
Here is the caller graph for this function:| video::SColor WearBarParams::getWearBarColor | ( | f32 | durabilityPercent | ) |
References blend, BLEND_MODE_CONSTANT, BLEND_MODE_LINEAR, BlendMode_END, and colorStops.
| void WearBarParams::serialize | ( | std::ostream & | os | ) | const |
References blend, colorStops, writeARGB8(), writeF32(), writeU16(), and writeU8().
Here is the call graph for this function:| void WearBarParams::serializeJson | ( | std::ostream & | os | ) | const |
References blend, colorStops, encodeHexColorString(), enum_to_string(), es_BlendMode, fastWriteJson(), and ftos().
Referenced by ItemStackMetadata::setWearBarParams().
Here is the call graph for this function:
Here is the caller graph for this function:| BlendMode WearBarParams::blend |
Referenced by deserialize(), deserializeJson(), getWearBarColor(), push_wear_bar_params(), serialize(), and serializeJson().
| std::map<f32, video::SColor> WearBarParams::colorStops |
Referenced by deserialize(), deserializeJson(), getWearBarColor(), push_wear_bar_params(), serialize(), and serializeJson().
|
staticconstexpr |
Referenced by deserializeJson(), push_wear_bar_params(), read_wear_bar_params(), and serializeJson().