mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-11-04 15:53:00 +00:00
color parser
This commit is contained in:
@@ -354,7 +354,8 @@ struct color_parameter : public val_parameter<color_t> {
|
||||
return this;
|
||||
}
|
||||
|
||||
void load_from_raw(const string& s) override { sscanf(s.c_str(), "%x", value); }
|
||||
cld get_cld() override { return has_alpha ? *value : (*value * 256 + 0xFF); }
|
||||
void load_from_raw(const string& s) override { *value = parsecolor(s, has_alpha); }
|
||||
string save() override { return itsh(*value); }
|
||||
shared_ptr<parameter> clone(struct local_parameter_set& lps, void *value) override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user