Skip to content

Commit

Permalink
[config][page] enum set type should be not decomposed in default value
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpoelen committed Nov 21, 2023
1 parent 0af6d91 commit 8370597
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions projects/redemption_configs/pages/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -557,15 +557,17 @@ <h2 id="${sectionId}"><a href="#${sectionId}">${sectionPrefix}Section: ${realSec
const e = enumDatas[type];
extraDescription = e.intValues;
description ??= e.description;
preferHex = e.category === 'flags';
const flags = [];
for (const info of e.values) {
if (info.value && (info.value & option.value) === info.value) {
flags.push(`<code>0x${info.value.toString(16)}</code>`);
preferHex = (e.category === 'flags');
if (e.category !== 'set') {
const flags = [];
for (const info of e.values) {
if (info.value && (info.value & option.value) === info.value) {
flags.push(`<code>0x${info.value.toString(16)}</code>`);
}
}
if (flags.length > 1) {
humanValue = flags.join(' + ');
}
}
if (flags.length > 1) {
humanValue = flags.join(' + ');
}
}
else if (type === 'list') {
Expand Down

0 comments on commit 8370597

Please sign in to comment.