engine.scr_w()
: useengine.get_width()
insteadengine.scr_h()
: useengine.get_height()
instead
- Replace :
by :
use console_engine::termion::color; use console_engine::termion::event::Key; use console_engine::termion::event::MouseButton;
use console_engine::Color; use console_engine::KeyCode; use console_engine::MouseButton;
- in your code,
Key::Char('*')
becomesKeyCode::Char('*')
color
becomesColor
. Be aware that the Color enum has changed so instead of "Yellow" you have "DarkYellow", and "LightYellow" now is "Yellow".
Black and White variants doesn't exist anymore because of the new "Grey" and "DarkGrey".engine.get_mouse_held()
andengine.get_mouse_released()
now require that you provide aMouseButton
as first parameterscreen.to_string()
as well aspixel.to_string()
no longer exists. If you want to print a screen you'll now usescreen.draw()
instead.pixel.colors
has been replaced bypixel.fg
andpixel.bg
. These two are now of type Color instead of String.
print
andprint_fbg
now uses&str
instead ofString
for text. If you want to keep using Strings, you'll just need to add.as_str()
to get it to work againPubScreen
no longer exists