Menu system broken
Dependencies: ANSITermMenuSystem
Fork of menuSystemMbed by
CdisplayItem.cpp
- Committer:
- Rybowonder
- Date:
- 2013-05-04
- Revision:
- 8:6ddb8c26387a
- Parent:
- 6:2f220f5d782d
File content as of revision 8:6ddb8c26387a:
// // menuItem.cpp // menuSystem // // Created by BradDSmith on 2013-02-26. // Copyright (c) 2013 BradDSmith. All rights reserved. // #include "CdisplayItem.h" #include "console.h" CdisplayItem::CdisplayItem():Text("EMPTY") { } void CdisplayItem::initialize(const char * text, int x, int y,int x2, int y2) { setText( (char *) text); setPosition(x,y); value.X = x2; value.Y = y2; } void CdisplayItem::setText( char * CdisplayText) { Text.assign(CdisplayText); } void CdisplayItem::setPosition(int x, int y) { position.X = x; position.Y = y; } void CdisplayItem::print() { const char * msg = Text.c_str(); printXY( (char *)msg, position.X, position.Y); } void CdisplayItem::erase() { printXY (" ", position.X - 2, position.Y); } void CdisplayItem::setValue(char * newval) { printXY( (char *)newval, value.X, value.Y); } void CdisplayItem::Crect(int x1, int y1, int x2, int y2) { printRec(x1, y1, x2, y2); } /* void CdisplayItem::DeleteCrect(int x1, int y1, int x2, int y2) { eraseRec(x1, y1, x2, y2); } */