mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-31 00:04:07 -04:00
Merge remote-tracking branch 'origin/main' into better-tools
# Conflicts: # files.cmake # src/dusk/game_clock.cpp # src/dusk/imgui/ImGuiConsole.cpp # src/dusk/settings.cpp # src/dusk/settings.h # src/m_Do/m_Do_main.cpp
This commit is contained in:
@@ -102,6 +102,15 @@ bool Document::focus() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Document::has_focus() const {
|
||||
if (mDocument == nullptr) {
|
||||
return false;
|
||||
}
|
||||
auto* context = mDocument->GetContext();
|
||||
const auto* focused = context != nullptr ? context->GetFocusElement() : nullptr;
|
||||
return focused != nullptr && focused->GetOwnerDocument() == mDocument;
|
||||
}
|
||||
|
||||
bool Document::set_document_styles(const Rml::String& rcss) {
|
||||
if (rcss.empty()) {
|
||||
mDocumentStyleSheets = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user