feat: players interpolation & add hud.set_allow_pause(...)
This commit is contained in:
@@ -166,7 +166,7 @@ void GUI::actFocused() {
|
||||
focus->keyPressed(key);
|
||||
}
|
||||
|
||||
if (!Events::_cursor_locked) {
|
||||
if (!Events::isCursorLocked()) {
|
||||
if (Events::clicked(mousecode::BUTTON_1) &&
|
||||
(Events::jclicked(mousecode::BUTTON_1) || Events::delta.x || Events::delta.y))
|
||||
{
|
||||
@@ -189,7 +189,7 @@ void GUI::act(float delta, const Viewport& vp) {
|
||||
auto prevfocus = focus;
|
||||
|
||||
updateTooltip(delta);
|
||||
if (!Events::_cursor_locked) {
|
||||
if (!Events::isCursorLocked()) {
|
||||
actMouse(delta);
|
||||
} else {
|
||||
if (hover) {
|
||||
|
||||
@@ -91,6 +91,10 @@ Page& Menu::getCurrent() {
|
||||
return current;
|
||||
}
|
||||
|
||||
bool Menu::hasOpenPage() const {
|
||||
return current.panel != nullptr;
|
||||
}
|
||||
|
||||
void Menu::clearHistory() {
|
||||
pageStack = std::stack<Page>();
|
||||
}
|
||||
|
||||
@@ -64,5 +64,7 @@ namespace gui {
|
||||
|
||||
/// @brief Get current page
|
||||
Page& getCurrent();
|
||||
|
||||
bool hasOpenPage() const;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user