GameDevTecnico / cubos

A still very barebones game engine focused on voxels and data-oriented programming
https://gamedevtecnico.github.io/cubos/
MIT License
80 stars 20 forks source link

Add a Menu Bar to Tesseratos #1235

Open RiscadoA opened 1 month ago

RiscadoA commented 1 month ago

Rebased on #1227.

Description

Adds a menu bar plugin to Tesseratos. This plugin basically picks up all entities with the MenuBarItem component, and shows them in the menu bar.

image

Additionally, ChildOf hierarchies lead to having drop-down menus within the bar.

image

Check out the editor main.cpp for an example of how these entities can be created. Down the road, we should change plugins to add their own entries there.

User interaction is handled through observers: if the user selects an item in the menu, the MenuBarSelected component is added and immediately removed. This triggers any .onAdd<MenuBarSelected> observers added by users.

Checklist

github-actions[bot] commented 1 month ago

PR Preview Action v1.4.7 :---: :rocket: Deployed preview to https://GameDevTecnico.github.io/cubos/docs-preview/pr-1235/ on branch gh-pages at 2024-06-05 22:32 UTC

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 40.34%. Comparing base (50e078c) to head (73f8450).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1235 +/- ## ======================================= Coverage 40.34% 40.34% ======================================= Files 351 351 Lines 26050 26050 ======================================= + Hits 10509 10510 +1 + Misses 15541 15540 -1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.