diff options
Diffstat (limited to 'src/emulator.rs')
-rw-r--r-- | src/emulator.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/emulator.rs b/src/emulator.rs index 606704d..195b8c8 100644 --- a/src/emulator.rs +++ b/src/emulator.rs @@ -16,6 +16,7 @@ macro_rules! u16 { ($u32:expr) => { $u32.try_into().unwrap_or(u16::MAX) }; } pub struct BedrockEmulator { vm: Processor<StandardDevices>, + title: String, initialising: bool, sleeping: bool, pixel_scale: u32, @@ -35,6 +36,7 @@ impl BedrockEmulator { Self { vm, + title: String::from("Bedrock emulator"), initialising: true, sleeping: false, pixel_scale: 3, @@ -46,6 +48,11 @@ impl BedrockEmulator { } } + pub fn with_title(mut self, title: &str) -> Self { + self.title = title.to_string(); + self + } + pub fn run(self) -> ! { let mut wm = WindowManager::new(); wm.add_window(Box::new(self)); @@ -95,7 +102,7 @@ impl BedrockEmulator { impl WindowController for BedrockEmulator { fn title(&self) -> String { - String::from("Bedrock emulator") + self.title.clone() } fn exact_size(&self) -> Option<Dimensions> { |