reuse include_str for cross-device compatibilty

This commit is contained in:
2019-06-06 16:38:06 +02:00
parent 60312be5d8
commit c67c4145a7
3 changed files with 6 additions and 6 deletions

View File

@@ -39,8 +39,8 @@ pub struct Pawn {
impl Pawn {
pub fn new<S: Into<String>>(name: S) -> Self {
let pawn_src = "/home/artus/Projets/rust/playmat/res/pawn.glade";
let builder = gtk::Builder::new_from_file(pawn_src);
let pawn_src = include_str!("../res/pawn.glade");
let builder = gtk::Builder::new_from_string(pawn_src);
let name = name.into();
let label: gtk::Label =
builder