-
-
Notifications
You must be signed in to change notification settings - Fork 828
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
desktop: Hook up DesktopUiBackend::is_fullscreen
- Loading branch information
Showing
2 changed files
with
10 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
use tinyfiledialogs::{message_box_ok, MessageBoxIcon}; | ||
|
||
use ruffle_core::backend::ui::UiBackend; | ||
use std::rc::Rc; | ||
use tinyfiledialogs::{message_box_ok, MessageBoxIcon}; | ||
use winit::window::Window; | ||
|
||
pub struct DesktopUiBackend {} | ||
pub struct DesktopUiBackend { | ||
window: Rc<Window>, | ||
} | ||
|
||
impl DesktopUiBackend { | ||
pub fn new() -> Self { | ||
Self {} | ||
pub fn new(window: Rc<Window>) -> Self { | ||
Self { window } | ||
} | ||
} | ||
|
||
impl UiBackend for DesktopUiBackend { | ||
fn is_fullscreen(&self) -> bool { | ||
// TODO: Return proper value when fullscreen implemented on desktop. | ||
false | ||
self.window.fullscreen().is_some() | ||
} | ||
|
||
fn message(&self, message: &str) { | ||
message_box_ok("Ruffle", message, MessageBoxIcon::Info) | ||
} | ||
} | ||
|
||
impl Default for DesktopUiBackend { | ||
fn default() -> Self { | ||
DesktopUiBackend::new() | ||
} | ||
} |