Skip to content

Commit

Permalink
Added normal colors, Better opening
Browse files Browse the repository at this point in the history
  • Loading branch information
adiultra committed May 30, 2016
1 parent 5a8f661 commit 80ce84d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
Binary file modified data.tdx
Binary file not shown.
17 changes: 12 additions & 5 deletions fabric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using namespace std;

// Color variables
// Color variables using ANSI sequences

const char Bred[12] = "\033[1;31m";
const char Bgreen[12] = "\033[1;32m";
Expand All @@ -12,6 +12,13 @@ const char Bblue[12] = "\033[1;34m";
const char Bmagenta[12] = "\033[1;35m";
const char Bcyan[12] = "\033[1;36m";

const char red[12] = "\033[;31m";
const char green[12] = "\033[;32m";
const char yellow[12] = "\033[;33m";
const char blue[12] = "\033[;34m";
const char magenta[12] = "\033[;35m";
const char cyan[12] = "\033[;36m";

const char normal[12] = "\033[0;m";

class Todo{
Expand Down Expand Up @@ -78,7 +85,7 @@ List::List(char Title[100]) {
}

void List::enter(){
cout << "Enter title for your list" << endl << Bgreen << " +> " << normal;
cout << "Enter title for your list" << endl << green << " +> " << normal;
cin.getline(title, sizeof(title));

char choice[10];
Expand All @@ -89,14 +96,14 @@ void List::enter(){
char tagTemp[220];

cout << "Enter the tag one at a time" << endl << "\'d\' when done " << endl;
cout << Bgreen << " +> " << normal;
cout << green << " +> " << normal;

while (1) {
cin.getline(tagTemp, 20);

if (strcmp(tagTemp, "d") != 0) {
addTag(tagTemp);
cout << Bgreen << " +> " << normal;
cout << green << " +> " << normal;
}

else {
Expand Down Expand Up @@ -159,7 +166,7 @@ void List::todoView(int index) {

void List::append(){
char Content[200];
cout << "Enter the content of ToDo" << endl << Bgreen << " +> " << normal;
cout << "Enter the content of ToDo" << endl << green << " +> " << normal;
cin.getline(Content, 200);

strcpy(list[_listIndex].content, Content);
Expand Down
8 changes: 4 additions & 4 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ int parse(char command[80]){

char status;

cout << "Enter The new Status" << endl << Bgreen << " +> " << normal;
cout << "Enter The new Status" << endl << green << " +> " << normal;
cin >> status;
cin.ignore();

Expand Down Expand Up @@ -167,7 +167,7 @@ int parse(char command[80]){
// Search the Database
char term[40];

cout << "Enter the search term " << endl << Bgreen << " +> " << normal;
cout << "Enter the search term " << endl << green << " +> " << normal;
cin.getline(term, sizeof(term));
search(term, arrayL);
success = 1;
Expand Down Expand Up @@ -370,14 +370,14 @@ void finish() {
int main() {
initiate();

cout << "=== --- --> TodX <-- --- ===" << endl;
cout << "=== --- --> \033[5;33;1m TodX \033[0;m <-- --- ===" << endl;
cout << "Welcome to TodX the ultimate Todo list" << endl;
cout << "v0.01a = Linux Build, docs at -> http://todx.rtfd.io" << endl;

char command[80];

while (1) {
cout << Byellow << "\n *> " << normal;
cout << yellow << "\n *> " << normal;
cin.getline(command, 80);
int result = parse(command);

Expand Down

0 comments on commit 80ce84d

Please sign in to comment.