Add character palette menu item

This commit is contained in:
Antonio Scandurra 2022-07-19 14:51:22 +02:00
parent e5602b0ad4
commit 456a390166
8 changed files with 43 additions and 9 deletions

View file

@ -1,3 +1,4 @@
use super::{geometry::RectFExt, renderer::Renderer};
use crate::{
executor,
geometry::{
@ -448,6 +449,14 @@ impl platform::Window for Window {
// so we have to move it again.
self.0.borrow().move_traffic_light();
}
fn show_character_palette(&self) {
unsafe {
let app = NSApplication::sharedApplication(nil);
let window = self.0.borrow().native_window;
let _: () = msg_send![app, orderFrontCharacterPalette: window];
}
}
}
impl platform::WindowContext for Window {