made the switch to using bracket-lib directly, instead of rltk wrapper
this should solve the build issues; it makes using the non-crashing github build a lot easier, because it lets the explicit rltk dependency be removed.
This commit is contained in:
parent
455b8f2d80
commit
85efe13dc5
93 changed files with 1528 additions and 770 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use super::{ events, LogFragment, Logger };
|
||||
use rltk::prelude::*;
|
||||
use bracket_lib::prelude::*;
|
||||
use std::sync::Mutex;
|
||||
|
||||
lazy_static! {
|
||||
|
|
@ -19,7 +19,13 @@ pub fn clear_log() {
|
|||
LOG.lock().unwrap().clear();
|
||||
}
|
||||
|
||||
pub fn print_log(console: &mut Box<dyn Console>, pos: Point, _descending: bool, len: usize, maximum_len: i32) {
|
||||
pub fn print_log(
|
||||
console: &mut Box<dyn Console>,
|
||||
pos: Point,
|
||||
_descending: bool,
|
||||
len: usize,
|
||||
maximum_len: i32
|
||||
) {
|
||||
let mut y = pos.y;
|
||||
let mut x = pos.x;
|
||||
// Reverse the log, take the number we want to show, and iterate through them
|
||||
|
|
@ -61,7 +67,13 @@ pub fn print_log(console: &mut Box<dyn Console>, pos: Point, _descending: bool,
|
|||
}
|
||||
// Stay within bounds
|
||||
if y > pos.y - (len as i32) {
|
||||
console.print_color(x, y, frag.colour.into(), RGB::named(rltk::BLACK).into(), part);
|
||||
console.print_color(
|
||||
x,
|
||||
y,
|
||||
frag.colour.into(),
|
||||
RGB::named(BLACK).into(),
|
||||
part
|
||||
);
|
||||
}
|
||||
x += part.len() as i32;
|
||||
}
|
||||
|
|
@ -80,7 +92,7 @@ pub fn setup_log() {
|
|||
|
||||
Logger::new()
|
||||
.append("Welcome!")
|
||||
.colour(rltk::CYAN)
|
||||
.colour(CYAN)
|
||||
.append_n("Press [?] at any time to view controls")
|
||||
.period()
|
||||
.log();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue