mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-24 01:46:31 +00:00
Update pancurses backend
This commit is contained in:
parent
508c9833e3
commit
0ab2c6db07
@ -24,12 +24,12 @@ unicode-width = "0.1"
|
|||||||
[dependencies.ncurses]
|
[dependencies.ncurses]
|
||||||
features = ["wide"]
|
features = ["wide"]
|
||||||
optional = true
|
optional = true
|
||||||
version = "5.83.0"
|
version = "5.84.0"
|
||||||
|
|
||||||
[dependencies.pancurses]
|
[dependencies.pancurses]
|
||||||
features = ["wide"]
|
features = ["wide"]
|
||||||
optional = true
|
optional = true
|
||||||
version = "0.6"
|
version = "0.7"
|
||||||
|
|
||||||
[dependencies.termion]
|
[dependencies.termion]
|
||||||
optional = true
|
optional = true
|
||||||
|
@ -23,7 +23,7 @@ impl backend::Backend for Concrete {
|
|||||||
pancurses::cbreak();
|
pancurses::cbreak();
|
||||||
pancurses::start_color();
|
pancurses::start_color();
|
||||||
pancurses::curs_set(0);
|
pancurses::curs_set(0);
|
||||||
window.bkgd(pancurses::COLOR_PAIR(ColorStyle::Background.id() as u64));
|
window.bkgd(pancurses::COLOR_PAIR(ColorStyle::Background.id() as u32));
|
||||||
|
|
||||||
Concrete {
|
Concrete {
|
||||||
window: window,
|
window: window,
|
||||||
@ -58,7 +58,7 @@ impl backend::Backend for Concrete {
|
|||||||
// pancurses::attr_get(&mut current_style, &mut current_color);
|
// pancurses::attr_get(&mut current_style, &mut current_color);
|
||||||
let current_style = self.current_style.get();
|
let current_style = self.current_style.get();
|
||||||
|
|
||||||
let style = pancurses::COLOR_PAIR(color.id() as u64);
|
let style = pancurses::COLOR_PAIR(color.id() as u32);
|
||||||
self.window.attron(style);
|
self.window.attron(style);
|
||||||
|
|
||||||
self.current_style.set(color);
|
self.current_style.set(color);
|
||||||
@ -66,7 +66,7 @@ impl backend::Backend for Concrete {
|
|||||||
self.current_style.set(current_style);
|
self.current_style.set(current_style);
|
||||||
|
|
||||||
// self.window.attroff(style);
|
// self.window.attroff(style);
|
||||||
self.window.attron(pancurses::COLOR_PAIR(current_style.id() as u64));
|
self.window.attron(pancurses::COLOR_PAIR(current_style.id() as u32));
|
||||||
}
|
}
|
||||||
|
|
||||||
fn with_effect<F: FnOnce()>(&self, effect: Effect, f: F) {
|
fn with_effect<F: FnOnce()>(&self, effect: Effect, f: F) {
|
||||||
|
Loading…
Reference in New Issue
Block a user