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::State;
|
||||
use rltk::prelude::*;
|
||||
use bracket_lib::prelude::*;
|
||||
|
||||
#[derive(PartialEq, Copy, Clone)]
|
||||
pub enum CheatMenuResult {
|
||||
|
|
@ -12,13 +12,13 @@ pub enum CheatMenuResult {
|
|||
GodMode,
|
||||
}
|
||||
|
||||
pub fn show_cheat_menu(_gs: &mut State, ctx: &mut Rltk) -> CheatMenuResult {
|
||||
pub fn show_cheat_menu(_gs: &mut State, ctx: &mut BTerm) -> CheatMenuResult {
|
||||
let (x_offset, y_offset) = (1, 10);
|
||||
ctx.print_color(
|
||||
1 + x_offset,
|
||||
1 + y_offset,
|
||||
RGB::named(rltk::RED),
|
||||
RGB::named(rltk::BLACK),
|
||||
RGB::named(RED),
|
||||
RGB::named(BLACK),
|
||||
"DEBUG MENU! [aA-zZ][Esc.]"
|
||||
);
|
||||
let x = 1 + x_offset;
|
||||
|
|
@ -26,26 +26,26 @@ pub fn show_cheat_menu(_gs: &mut State, ctx: &mut Rltk) -> CheatMenuResult {
|
|||
let count = 5;
|
||||
let width = 19;
|
||||
|
||||
ctx.draw_box(x, y, width, (count + 1) as i32, RGB::named(rltk::RED), RGB::named(rltk::BLACK));
|
||||
ctx.draw_box(x, y, width, (count + 1) as i32, RGB::named(RED), RGB::named(BLACK));
|
||||
y += 1;
|
||||
// Asc
|
||||
ctx.set(x_offset + 2, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), rltk::to_cp437('a'));
|
||||
ctx.set(x_offset + 2, y, RGB::named(YELLOW), RGB::named(BLACK), to_cp437('a'));
|
||||
ctx.print(x_offset + 4, y, "ASCEND A FLOOR");
|
||||
y += 1;
|
||||
// Desc
|
||||
ctx.set(x_offset + 2, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), rltk::to_cp437('d'));
|
||||
ctx.set(x_offset + 2, y, RGB::named(YELLOW), RGB::named(BLACK), to_cp437('d'));
|
||||
ctx.print(x_offset + 4, y, "DESCEND A FLOOR");
|
||||
y += 1;
|
||||
// Heal
|
||||
ctx.set(x_offset + 2, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), rltk::to_cp437('h'));
|
||||
ctx.set(x_offset + 2, y, RGB::named(YELLOW), RGB::named(BLACK), to_cp437('h'));
|
||||
ctx.print(x_offset + 4, y, "HEAL TO FULL");
|
||||
y += 1;
|
||||
// Reveal map
|
||||
ctx.set(x_offset + 2, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), rltk::to_cp437('m'));
|
||||
ctx.set(x_offset + 2, y, RGB::named(YELLOW), RGB::named(BLACK), to_cp437('m'));
|
||||
ctx.print(x_offset + 4, y, "MAGIC MAP REVEAL");
|
||||
y += 1;
|
||||
// Godmode
|
||||
ctx.set(x_offset + 2, y, RGB::named(rltk::YELLOW), RGB::named(rltk::BLACK), rltk::to_cp437('g'));
|
||||
ctx.set(x_offset + 2, y, RGB::named(YELLOW), RGB::named(BLACK), to_cp437('g'));
|
||||
ctx.print(x_offset + 4, y, "GOD MODE");
|
||||
// Match keys
|
||||
match ctx.key {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue