1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-17 06:07:12 +00:00

fixed hex color parsing

This commit is contained in:
Zeno Rogue
2024-05-27 12:29:37 +02:00
parent 83575d9d7d
commit f823a53f84
3 changed files with 12 additions and 3 deletions

View File

@@ -356,7 +356,7 @@ struct color_parameter : public val_parameter<color_t> {
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); }
string save() override { return has_alpha ? itsh8(*value) : itsh6(*value); }
shared_ptr<parameter> clone(struct local_parameter_set& lps, void *value) override;
};