Closed Flowtter closed 1 year ago
This is a great idea for open levels, thanks! Would it be possible to move this to a module? The "modules" folder, I think you can put the css, hbs and JS in there. For the integration in the radial menu and other interfaces I could do it in a second time if you are not comfortable with that
ACK, I'll have a look next week probably ! Thanks for the fast feedback after the reopening off the PR.
I moved the three specified files, however, since @alimtunc is working on a ban feature, we agreed to let him extend this PR.
For the integration in the radial menu and other interfaces I could do it in a second time if you are not comfortable with that
What do you mean ? I don't see anything wrong with the implement, did I missed something ? 🙂
@alimtunc Sorry, maybe I misspoke. Instead of directly editing the radial-menu.js
file to add the option, you can do something like I did in the textual-communication-tools.js
:
registerModules(
[
{ id: 'report', icon: '🚨️', order: 4, label: 'Report', shortcut: 53, closeMenu: true, scope: 'other' },
],
moduleType.RADIAL_MENU,
);
And add a listener on the radial menu in the report.js
file with:
window.addEventListener(eventTypes.onMenuOptionSelected, onMenuOptionSelected);
The advantage of this is that the core is not aware of the existence of your module and you can remove the module without affecting the simulation.
Add a report option. Useful to report an user or a message. Available in:
video