mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
add 'is_new' argument to on_world_open
This commit is contained in:
parent
9ce70d70e1
commit
53ce219127
4 changed files with 15 additions and 6 deletions
|
|
@ -324,7 +324,7 @@ void Hud::updateWorldGenDebug() {
|
|||
|
||||
void Hud::update(bool visible) {
|
||||
const auto& chunks = *player.chunks;
|
||||
bool is_menu_open = menu.hasOpenPage();
|
||||
bool isMenuOpen = menu.hasOpenPage();
|
||||
|
||||
debugPanel->setVisible(
|
||||
debug && visible && !(inventoryOpen && inventoryView == nullptr)
|
||||
|
|
@ -333,13 +333,13 @@ void Hud::update(bool visible) {
|
|||
if (!visible && inventoryOpen) {
|
||||
closeInventory();
|
||||
}
|
||||
if (pause && !is_menu_open) {
|
||||
if (pause && !isMenuOpen) {
|
||||
setPause(false);
|
||||
}
|
||||
if (!gui.isFocusCaught()) {
|
||||
processInput(visible);
|
||||
}
|
||||
if ((is_menu_open || inventoryOpen) == input.getCursor().locked) {
|
||||
if ((isMenuOpen || inventoryOpen) == input.getCursor().locked) {
|
||||
input.toggleCursor();
|
||||
}
|
||||
|
||||
|
|
@ -360,8 +360,8 @@ void Hud::update(bool visible) {
|
|||
contentAccessPanel->setSize(glm::vec2(caSize.x, windowSize.y));
|
||||
contentAccess->setMinSize(glm::vec2(1, windowSize.y));
|
||||
hotbarView->setVisible(visible && !(secondUI && !inventoryView));
|
||||
darkOverlay->setVisible(is_menu_open);
|
||||
menu.setVisible(is_menu_open);
|
||||
darkOverlay->setVisible(isMenuOpen);
|
||||
menu.setVisible(isMenuOpen);
|
||||
|
||||
if (visible) {
|
||||
for (auto& element : elements) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue