Skip to content

Commit

Permalink
查看事件的参数
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Apr 28, 2024
1 parent b05dcef commit 323a8c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/customDefine/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class Events extends BaseDefine {
event.args.push({
name,
type,
luaType: typeID[type]?.[0] ?? '不支持的类型',
luaType: typeID[type]?.[0] ?? 'any',
desc: typeID[type]?.[1] ?? '不支持的类型',
});
}
Expand Down
5 changes: 4 additions & 1 deletion src/mainMenu/pages/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ export class 自定义事件 extends TreeNode {
node.childs = (await define.自定义事件.getEvents()).map(event => {
let args = event.args.map(arg => arg.name);
return new TreeNode(event.name, {
iconPath: new vscode.ThemeIcon('symbol-event'),
description: `${event.id.toString()}(${args.join(',')})`,
contextValue: '自定义事件',
data: event.id,
childs: event.args.map(arg => new TreeNode(arg.name, {
description: `${arg.desc}(${arg.luaType})`,
})),
});
});
},
Expand Down

0 comments on commit 323a8c6

Please sign in to comment.