Implement mode() required by trait Renderer
Changes in orbclient to implement drawing with different blending modes require new mode() function in orbtk as well.
extern crate orbfont;
-use orbclient::{self, Renderer, WindowFlag};
+use orbclient::{self, Renderer, Mode, WindowFlag};
use orbclient::color::Color;
use std::cell::{Cell, RefCell};
use std::collections::VecDeque;
@@ -47,6 +47,10 @@ impl<'a> Renderer for WindowRenderer<'a> {
self.inner.sync()
}
+ fn mode(&self) -> &Cell<Mode> {
+ &self.inner.mode()
+ }
+
fn char(&mut self, x: i32, y: i32, c: char, color: Color) {
if let Some(ref font) = *self.font {
let mut buf = [0; 4];
