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('*') colorbecomesColor. 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 aMouseButtonas 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.colorshas been replaced bypixel.fgandpixel.bg. These two are now of type Color instead of String.
printandprint_fbgnow uses&strinstead ofStringfor text. If you want to keep using Strings, you'll just need to add.as_str()to get it to work againPubScreenno longer exists