Add missing group icons on the conditions and actions list (#5014)

This commit is contained in:
D8H
2023-02-24 14:34:05 +01:00
committed by GitHub
parent d25cad5aaf
commit b8de8d4f15
2 changed files with 6 additions and 1 deletions

View File

@@ -27,6 +27,10 @@ void GD_CORE_API BuiltinExtensionsImplementer::ImplementsBaseObjectExtension(
.SetIcon("res/actions/create24.png");
extension.AddInstructionOrExpressionGroupMetadata(_("Movement using forces"))
.SetIcon("res/actions/force24.png");
extension.AddInstructionOrExpressionGroupMetadata(_("Variables"))
.SetIcon("res/conditions/var24.png");
extension.AddInstructionOrExpressionGroupMetadata(_("Position"))
.SetIcon("res/actions/position24_black.png");
gd::ObjectMetadata& obj = extension.AddObject<gd::ObjectConfiguration>(
"", _("Base object"), _("Base object"), "res/objeticon24.png");

View File

@@ -81,6 +81,7 @@ export const renderInstructionOrExpressionTree = <
// $FlowFixMe - see above
const groupOfInstructionInformation: InstructionOrExpressionTreeNode = instructionOrGroup;
if (useSubheaders) {
const iconSrc = getGroupIconSrc(key) || parentGroupIconSrc;
return [
<Subheader key={getSubheaderListItemKey(key)}>{key}</Subheader>,
].concat(
@@ -93,7 +94,7 @@ export const renderInstructionOrExpressionTree = <
selectedItemRef,
initiallyOpenedPath: restOfInitiallyOpenedPath,
getGroupIconSrc,
parentGroupIconSrc,
parentGroupIconSrc: iconSrc,
})
);
} else {