font
This commit is contained in:
parent
ff94e1048e
commit
0c930de0ed
|
@ -691,6 +691,7 @@ dependencies = [
|
|||
"crossbeam-channel 0.4.4",
|
||||
"failure",
|
||||
"ferretro",
|
||||
"find_folder",
|
||||
"gilrs",
|
||||
"glium",
|
||||
"libloading 0.5.2",
|
||||
|
@ -698,6 +699,12 @@ dependencies = [
|
|||
"structopt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "find_folder"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f6d018fb95a0b59f854aed68ecd96ce2b80af7911b92b1fed3c4b1fa516b91b"
|
||||
|
||||
[[package]]
|
||||
name = "fixedbitset"
|
||||
version = "0.1.9"
|
||||
|
|
|
@ -20,4 +20,5 @@ conrod_glium = { git = "https://github.com/vivlim/conrod" } # bumped version of
|
|||
conrod_core = { git = "https://github.com/vivlim/conrod" }
|
||||
glium = "0.30.1"
|
||||
|
||||
gilrs = "0.8.1"
|
||||
gilrs = "0.8.1"
|
||||
find_folder="0.3.0"
|
Binary file not shown.
12
src/main.rs
12
src/main.rs
|
@ -11,7 +11,7 @@ use glium::backend::Facade;
|
|||
use mini_gl_fb::glutin::dpi::LogicalSize;
|
||||
use mini_gl_fb::glutin::event_loop::EventLoop;
|
||||
use mini_gl_fb::glutin::event::{Event, WindowEvent, VirtualKeyCode, KeyboardInput, ElementState};
|
||||
use mini_gl_fb::{GlutinBreakout, config, get_fancy};
|
||||
use mini_gl_fb::{GlutinBreakout, MiniGlFb, config, get_fancy};
|
||||
use mini_gl_fb::glutin::window::{Window, WindowId};
|
||||
use mini_gl_fb::glutin::event_loop::ControlFlow;
|
||||
use mini_gl_fb::glutin::platform::run_return::EventLoopExtRunReturn;
|
||||
|
@ -548,7 +548,7 @@ impl MultiWindow {
|
|||
|
||||
struct EmuWindow {
|
||||
pub emu: Rc<RefCell<Pin<Box<MyEmulator>>>>,
|
||||
pub breakout: GlutinBreakout,
|
||||
pub fb: MiniGlFb,
|
||||
next_frame_time: Instant,
|
||||
frame_duration: Duration,
|
||||
}
|
||||
|
@ -560,7 +560,8 @@ impl EmuWindow {
|
|||
window_title: emu_inner.title.clone(),
|
||||
window_size: LogicalSize::new(emu_inner.av_info.geometry.base_width.into(), emu_inner.av_info.geometry.base_height.into())
|
||||
};
|
||||
let breakout = get_fancy(config, &event_loop).glutin_breakout();
|
||||
let fb = get_fancy(config, &event_loop);
|
||||
let breakout = .glutin_breakout();
|
||||
|
||||
Box::from(EmuWindow {
|
||||
emu: Rc::clone(emu),
|
||||
|
@ -661,6 +662,11 @@ impl ConrodWindow {
|
|||
let ids = Ids::new(ui.widget_id_generator());
|
||||
let breakout = get_fancy(config, &event_loop).glutin_breakout();
|
||||
let image_map = conrod_core::image::Map::<glium::texture::Texture2d>::new();
|
||||
let assets = find_folder::Search::KidsThenParents(3, 5)
|
||||
.for_folder("assets")
|
||||
.unwrap();
|
||||
let font_path = assets.join("libre-franklin.ttf");
|
||||
ui.fonts.insert_from_file(font_path).unwrap();
|
||||
|
||||
let window_id = breakout.context.window().id();
|
||||
|
||||
|
|
Loading…
Reference in New Issue