-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTruOrganizer.cpp
1120 lines (971 loc) · 27.9 KB
/
TruOrganizer.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#include <SFML/Graphics.hpp>
#include <iostream>
#include <string>
#include <fstream>
#include <vector>
#include <sstream>
#include <iomanip>
#include <stdlib.h>
using namespace std;
//converts string time into two int of hour and minute
class Time
{
private:
string hourAndMin;
int hour;
int minute;
void convertStringTime()
{
vector<int> time;
splitHourAndMin(this->hourAndMin, ':', time);
this->hour = time.at(0);
this->minute = time.at(1);
}
void splitHourAndMin(const string& stringTime, char delimiter, vector<int>& intTime)
{
size_t token_start = 0;
size_t delim_position = stringTime.find(delimiter);
int splittedHour = stringToInteger(stringTime.substr(token_start, delim_position - token_start));
intTime.push_back(splittedHour);
delim_position++;
int splittedMin = stringToInteger(stringTime.substr(delim_position, stringTime.length()));
intTime.push_back(splittedMin);
}
int stringToInteger(const string &string)
{
stringstream convertion(string);
int integerValue;
convertion >> integerValue;
return integerValue;
}
public:
Time()
{
this->hourAndMin = "";
this->hour = 0;
this->minute = 0;
}
Time(string time)
{
this->hourAndMin = time;
this->hour = 0;
this->minute = 0;
convertStringTime();
}
int getHour() const
{
return this->hour;
}
int getMinute() const
{
return this->minute;
}
int intReturn()
{
return ((this -> hour)*100) + this -> minute;
}
friend ostream &operator << (ostream &strm, const Time &obj)
{
strm << obj.hour << ":" << obj.minute;
return strm;
}
};
class Event
{
private:
string name;
string day;
Time startTime;
Time endTime;
string location;
public:
Event()
{
this->location = "";
this->day = "";
this->name = "";
}
Event(string name, string day, string start, string end, string location) : startTime(start), endTime(end)
{
this -> name = name;
this -> day = day;
this -> location = location;
}
Time& getStartTime()
{
return this->startTime;
}
Time& getEndTime()
{
return this->endTime;
}
string getLocation() const
{
return this->location;
}
string getDay() const
{
return this->day;
}
string getName() const
{
return this->name;
}
vector<size_t> convertDayIntoArrayPosition()
{
vector<size_t> position;
for(size_t index = 0; index < this->day.length(); index++)
{
if(this->day.at(index) == 'M')
{
position.push_back(0);
}
else if(this->day.at(index) == 'T')
{
position.push_back(1);
}
else if(this->day.at(index) == 'W')
{
position.push_back(2);
}
else if(this->day.at(index) == 'R')
{
position.push_back(3);
}
else if(this->day.at(index) == 'F')
{
position.push_back(4);
}
else
{
cout << "Invalid day" << endl;
exit(0);
}
}
return position;
}
void setLocation(string setLocation)
{
this->location = setLocation;
}
void setDay(string setDay)
{
this->day = setDay;
}
void setName(string setName)
{
this->name = setName;
}
};
class Person
{
private:
string name;
string email;
public:
Person()
{
this->name = "";
this->email = "";
}
Person(string name, string studentID)
{
this->name = name;
this->email = studentID + "@truman.edu";
}
/*
void setName(string initialName)
{
this->name = initialName;
}
*/
void setContactInfo(string initialContactInfo)
{
this->email = initialContactInfo;
}
string getName() const
{
return this->name;
}
string getContactInfo() const
{
return this->email;
}
};
class Professor: public Person
{
private:
Event officeHourTimes;
string department;
public:
Professor()
{
this->department = "";
}
Professor(string name,
string department,
string eventName ,
string day,
string startTime,
string endTime,
string location = "Your momma's bed",
string email = "Your mom's Number") :
Person (name, email), officeHourTimes(eventName, day, startTime, endTime, location)
{
this->department = department;
}
void setOfficeHourTimes(const Event& initialOfficeHourTimes)
{
this->officeHourTimes = initialOfficeHourTimes;
}
void setDepartment(string initialDepartment)
{
this->department = initialDepartment;
}
const Event& getOfficeHourTimes()
{
return this->officeHourTimes;
}
string getDepartment()
{
return this->department;
}
};
class Course : public Event
{
private:
Professor courseProfessor;
public:
Course(const Professor& instructor, string name, string day, string start, string end, string location) :
Event(name, day, start, end, location)
{
this->courseProfessor = instructor;
}
const Professor& getCourseProfessor()
{
return this->courseProfessor;
}
void setCourseProfessor(const Professor& setProfessor)
{
this->courseProfessor = setProfessor;
}
};
class Club : public Event
{
private:
string contactInfo;
string socialMedia;
public:
Club()
{
contactInfo = "";
socialMedia = "";
}
//eventName(club meeting), day, startTime, endTime, location, contactInfo, socialMedia
Club(string eventName,
string day,
string start,
string end,
string location,
string info,
string socialMedia) : Event(eventName, day, start, end, location)
{
this -> contactInfo = info;
this -> socialMedia = socialMedia;
}
string getContactInfo() const
{
return this->contactInfo;
}
string getSocialMedia() const
{
return this->socialMedia;
}
void setContactInfo(string info)
{
this->contactInfo = info;
}
void setSocialMedia(string media)
{
this->socialMedia = media;
}
};
class Schedule
{
private:
vector<Course> enrolledCourses;
vector<Club> participatingClubs;
public:
Schedule()
{
}
void operator=(const vector<Course>& courses)
{
this->enrolledCourses = courses;
}
void operator=(const vector<Club>& clubs)
{
this->participatingClubs = clubs;
}
vector<Course>& getEnrolledCourses()
{
return this->enrolledCourses;
}
vector<Club>& getParticipatingClubs()
{
return this->participatingClubs;
}
};
class Student : public Person
{
private:
string bannerID;
string studentID;
string year;
Schedule studentSchedule;
public:
Student()
{
this->bannerID = "";
this->studentID = "";
this->year = "";
}
Student(string name, string bID, string sID, string grade): Person(name, bID)
{
this -> bannerID = bID;
this -> studentID = sID;
this -> year = grade;
}
string getBannerID() const
{
return this->bannerID;
}
string getStudentID() const
{
return this->studentID;
}
string getYear() const
{
return this->year;
}
Schedule& getStudentSchedule()
{
return this->studentSchedule;
}
/*
void setBannerID(string setBannerID)
{
this->bannerID = bannerID;
}
void setStudentID(string setStudentID)
{
this->studentID = studentID;
}
*/
};
class DataBaseProcess
{
private:
string fileName;
ifstream file;
vector<Professor> professorsData;
vector<Club> clubsData;
public:
DataBaseProcess(string dataFileName)
{
this->fileName = dataFileName;
openFile();
processData();
}
void openFile()
{
this->file.open(this->fileName);
if(file.fail())
{
cout << "Invalid file name." << endl;
exit(0);
}
}
void processData()
{
string dummy;
getline(file, dummy);
string line;
if(isProfessorFile())
{
while(getline(file, line))
{
vector<string> processedData;
split(line, ',', processedData);
Professor professorData(processedData.at(0), processedData.at(1), processedData.at(2),
processedData.at(3), processedData.at(4), processedData.at(5),
processedData.at(6), processedData.at(7));
this->professorsData.push_back(professorData);
}
}
else if(isClubFile())
{
while(getline(file, line))
{
vector<string> processedData;
split(line, ',', processedData);
Club clubData(processedData.at(0), processedData.at(1), processedData.at(2),
processedData.at(3), processedData.at(4), processedData.at(5),
processedData.at(6));
this->clubsData.push_back(clubData);
}
}
else
{
cout << "Logical error." ;
cout << "The file must be either professorData.txt or clubData.txt given that the file was successfully opened." << endl;
exit(0);
}
}
bool isProfessorFile()
{
string professor = "professor";
bool match = true;
size_t index = 0;
while(match && index < 9) // number of characters in "professor"
{
match = this->fileName.at(index) == professor.at(index);
index++;
}
return match;
}
bool isClubFile()
{
string club = "club";
bool match = true;
size_t index = 0;
while(match && index < 4) // number of characters in "club"
{
match = this->fileName.at(index) == club.at(index);
index++;
}
return match;
}
const Professor& professorSearch(string professorName)
{
size_t index = 0;
bool done = false;
while(!done && index < this->professorsData.size())
{
if(this->professorsData.at(index).getName().find(professorName) != string::npos)
{
done = true;
}
else
{
index++;
}
}
return (this->professorsData).at(index);
}
const Club& clubSearch(string clubName)
{
size_t index = 0;
bool done = false;
while(!done && index < this->clubsData.size())
{
if(this->clubsData.at(index).getName().find(clubName) != string::npos)
{
done = true;
}
else
{
index++;
}
}
return this->clubsData.at(index);
}
void split(const string& line, char delimiter, vector<string>& tokens)
{
size_t token_start = 0;
size_t delim_position = line.find(delimiter);
while(delim_position != string::npos)
{
string token =
line.substr(token_start, delim_position - token_start);
tokens.push_back(token);
delim_position++;
token_start = delim_position;
delim_position = line.find(delimiter, delim_position);
if(delim_position == string::npos)
{
token = line.substr(token_start);
tokens.push_back(token);
}
}
}
};
class SampleStudents
{
private:
vector<Student> sampleStudents;
public:
SampleStudents(DataBaseProcess& professorDataBase, DataBaseProcess& clubDataBase)
{
Course cs181_1(professorDataBase.professorSearch("Jaiswal"), "CS181", "MWF", "8:30", "9:20", "VH 1345");
Course cs181_2(professorDataBase.professorSearch("Jaiswal"), "CS181", "MWF", "11:30", "12:20", "VH 1345");
Course cs191_1(professorDataBase.professorSearch("Halma"), "CS191", "MWF", "13:30", "14:20", "VH 1135");
Course cs191_2(professorDataBase.professorSearch("Halma"), "CS191", "MWF", "14:30", "15:20", "VH 1135");
Course math263_1(professorDataBase.professorSearch("Fernando"), "MATH263", "MTWRF", "12:30", "13:20", "VH 1224");
Course math263_2(professorDataBase.professorSearch("Fernando"), "MATH263", "MTWRF", "13:30", "14:20", "VH 1224");
Student JacobChoi("Jacob Choi", "001358684", "hc7341", "Freshman");
vector<Course> ajustinGalangCourses;
ajustinGalangCourses.push_back(cs181_1);
ajustinGalangCourses.push_back(cs191_2);
ajustinGalangCourses.push_back(math263_1);
JacobChoi.getStudentSchedule() = ajustinGalangCourses;
vector<Club> jacobChoiClubs;
jacobChoiClubs.push_back(clubDataBase.clubSearch("KASA"));
jacobChoiClubs.push_back(clubDataBase.clubSearch("JLEG"));
JacobChoi.getStudentSchedule() = jacobChoiClubs;
Student JustinGalang("Justin Galang", "001356969", "jg6969", "Freshman");
vector<Course> justinGalangCourses;
justinGalangCourses.push_back(cs181_1);
justinGalangCourses.push_back(cs191_2);
justinGalangCourses.push_back(math263_1);
JustinGalang.getStudentSchedule() = justinGalangCourses;
vector<Club> justinGalangClubs;
justinGalangClubs.push_back(clubDataBase.clubSearch("KASA"));
JustinGalang.getStudentSchedule() = justinGalangClubs;
Student ElenaPelaez("Elena Pelaez", "001355123", "ecp1004", "Freshman");
vector<Course> elenaPelaezCourse;
elenaPelaezCourse.push_back(cs181_1);
elenaPelaezCourse.push_back(cs191_1);
elenaPelaezCourse.push_back(math263_2);
ElenaPelaez.getStudentSchedule() = elenaPelaezCourse;
this->sampleStudents.push_back(JacobChoi);
this->sampleStudents.push_back(JustinGalang);
this->sampleStudents.push_back(ElenaPelaez);
}
Student& searchStudent(string studentName)
{
size_t index = 0;
bool done = false;
while(!done && index < this->sampleStudents.size())
{
if(this->sampleStudents.at(index).getName().find(studentName) != string::npos)
{
done = true;
}
else
{
index++;
}
}
return this->sampleStudents.at(index);
}
};
void skipScreen();
void firstScreenStudentInfo(Student& userStudent);
void secondScreenAddCourse(Student& userStudent, DataBaseProcess& opennedProfessorFile);
void thirdScreenAddClub(Student& userStudent, DataBaseProcess& opennedClubFile);
void fourthScreenSearchStudent(DataBaseProcess& opennedProfessorFile, DataBaseProcess& opennedClubFile);
void skipScreen()
{
for(size_t count = 0; count < (50/10); count++)
{
cout << endl << endl << endl << endl << endl << endl << endl << endl << endl << endl;
}
}
void firstScreenStudentInfo(Student& userStudent)
{
cout << endl << "Please enter in your student information." << endl;
cout << "Student Name: ";
string studentName;
getline(cin, studentName);
cout << "Student Banner ID: ";
string studentBannerID;
getline(cin, studentBannerID);
cout << "Student ID: ";
string studentID;
getline(cin, studentID);
cout << "Student Year: ";
string studentYear;
getline(cin, studentYear);
cout << "Updating your information..." << endl;
Student userInput(studentName, studentBannerID, studentID, studentYear);
userStudent = userInput;
}
void secondScreenAddCourse(Student& userStudent, DataBaseProcess& opennedProfessorFile)
{
vector<Course> enrolledCourses;
cout << endl << "Add enrolled courses to fill out your schedule." << endl;
bool done = false;
while(!done)
{
cout << "Course Code: ";
string courseCode;
getline(cin, courseCode);
cout << "Professor Name: ";
string professorName;
getline(cin, professorName);
cout << "Class Day: ";
string day;
getline(cin, day);
cout << "Start Time: ";
string startTime;
getline(cin, startTime);
cout << "End Time: ";
string endTime;
getline(cin, endTime);
cout << "Class Location: ";
string classLocation;
getline(cin, classLocation);
cout << "Updating course schedule..." << endl;
Course userInput(opennedProfessorFile.professorSearch(professorName), courseCode,
day, startTime, endTime, classLocation);
enrolledCourses.push_back(userInput);
cout << "Add more courses? (Y/N): ";
string userContinueInput;
getline(cin, userContinueInput);
if(userContinueInput.at(0) == 'n')
{
done = true;
}
else
{
cout << endl << "Adding another course." << endl;
}
}
userStudent.getStudentSchedule() = enrolledCourses;
}
void thirdScreenAddClub(Student& userStudent, DataBaseProcess& opennedClubFile)
{
vector<Club> participatingClub;
cout << endl << "Add participating clubs to fill out your schedule." << endl;
bool done = false;
while(!done)
{
cout << "Club Name: ";
string clubName;
getline(cin, clubName);
cout << "Searching for the club..." << endl;
participatingClub.push_back(opennedClubFile.clubSearch(clubName));
cout << "Add more club? (Y/N): ";
string userContinueInput;
getline(cin, userContinueInput);
if(userContinueInput.at(0) == 'n')
{
done = true;
}
else
{
cout << endl << "Adding another club." << endl;
}
}
userStudent.getStudentSchedule() = participatingClub;
}
void fourthScreenSearchStudent(DataBaseProcess& opennedProfessorFile, DataBaseProcess& opennedClubFile)
{
SampleStudents sampleStudents(opennedProfessorFile, opennedClubFile);
cout << endl << "Search a student to check their weekly schedule." << endl;
bool done = false;
while(!done)
{
cout << endl <<"Search Student Name: ";
string searchStudentName;
getline(cin, searchStudentName);
cout << "Searching for the student..." << endl;
Student searchedStudent = sampleStudents.searchStudent(searchStudentName);
cout << endl << "Displaying student information..." << endl;
cout << "Student Name: " << searchedStudent.getName() << endl;
cout << "Student Banner ID: " << searchedStudent.getBannerID() << endl;
cout << "Student Student ID: " << searchedStudent.getStudentID() << endl;
cout << "Student Year: " << searchedStudent.getYear() << endl;
cout << endl << "Search more student? (Y/N): ";
string userContinueInput;
getline(cin, userContinueInput);
if(tolower(userContinueInput.at(0)) == 'n')
{
done = true;
}
else
{
cout << endl << "Searching another student." << endl;
}
}
}
int main()
{
cout << "Welcome to the TruTouch: TruOrganizer!!" << endl;
cout << endl << "Setting up..." << endl;
DataBaseProcess professorDataBase("professorData.txt");
DataBaseProcess clubDataBase("clubData.txt");
Student userStudent;
cout << endl << "Opening Screen One - Student Info Input..." << endl;
firstScreenStudentInfo(userStudent);
skipScreen();
cout << endl << "Opening Screen Two - Add Course..." << endl;
secondScreenAddCourse(userStudent, professorDataBase);
skipScreen();
cout << "Participating clubs (Y/N): ";
string userClubInput;
getline(cin, userClubInput);
if(tolower(userClubInput.at(0)) == 'y')
{
thirdScreenAddClub(userStudent, clubDataBase);
}
// create window object with size, name in top left corner, and style
sf::RenderWindow window(sf::VideoMode(1334, 832), "TruCoordinator", sf::Style::Default);
sf::Font font;
font.loadFromFile("arial.ttf");
// sf::RectangleShape(Vector2f)
sf::RectangleShape newSquare(sf::Vector2f(222.f, 52.f));
newSquare.setFillColor(sf::Color(92, 22, 124));
sf::Text headerName;
headerName.setCharacterSize(50);
headerName.setFillColor(sf::Color::White);
headerName.setFont(font);
headerName.setPosition(5,0);
//student.getName();
headerName.setString(userStudent.getName());
sf::Text headerSID;
headerSID.setCharacterSize(30);
headerSID.setFillColor(sf::Color::White);
headerSID.setFont(font);
headerSID.setPosition(7,60);
headerSID.setString(userStudent.getStudentID());
sf::Text headerBID;
headerBID.setCharacterSize(20);
headerBID.setFillColor(sf::Color::White);
headerBID.setFont(font);
headerBID.setPosition(1225,75);
headerBID.setString(userStudent.getBannerID());
sf::Text mondayHeader;
mondayHeader.setCharacterSize(25);
mondayHeader.setFillColor(sf::Color::White);
mondayHeader.setFont(font);
mondayHeader.setPosition(290, 100);
string mondayString = "Monday";
mondayHeader.setString(mondayString);
sf::Text tuesdayHeader;
tuesdayHeader.setCharacterSize(25);
tuesdayHeader.setFillColor(sf::Color::White);
tuesdayHeader.setFont(font);
tuesdayHeader.setPosition(512, 100);
std::string tuesdayString = "Tuesday";
tuesdayHeader.setString(tuesdayString);
sf::Text wednesdayHeader;
wednesdayHeader.setCharacterSize(25);
wednesdayHeader.setFillColor(sf::Color::White);
wednesdayHeader.setFont(font);
wednesdayHeader.setPosition(700, 100);
std::string wednesdayString = "Wednesday";
wednesdayHeader.setString(wednesdayString);
sf::Text thursdayHeader;
thursdayHeader.setCharacterSize(25);
thursdayHeader.setFillColor(sf::Color::White);
thursdayHeader.setFont(font);
thursdayHeader.setPosition(945, 100);
std::string thursdayString = "Thursday";
thursdayHeader.setString(thursdayString);
sf::Text fridayHeader;
fridayHeader.setCharacterSize(25);
fridayHeader.setFillColor(sf::Color::White);
fridayHeader.setFont(font);
fridayHeader.setPosition(1178, 100);
std::string fridayString = "Friday";
fridayHeader.setString(fridayString);
sf::Text header1;
header1.setCharacterSize(25);
header1.setFillColor(sf::Color::White);
header1.setFont(font);
header1.setPosition(85, 156);
header1.setString("7:30");
sf::Text header2;
header2.setCharacterSize(25);
header2.setFillColor(sf::Color::White);
header2.setFont(font);
header2.setPosition(85, 208);
header2.setString("8:30");
sf::Text header3;
header3.setCharacterSize(25);
header3.setFillColor(sf::Color::White);
header3.setFont(font);
header3.setPosition(85, 260);
header3.setString("9:30");
sf::Text header4;
header4.setCharacterSize(25);
header4.setFillColor(sf::Color::White);
header4.setFont(font);
header4.setPosition(75, 312);
header4.setString("10:30");
sf::Text header5;
header5.setCharacterSize(25);
header5.setFillColor(sf::Color::White);
header5.setFont(font);
header5.setPosition(75, 364);
header5.setString("11:30");
sf::Text header6;
header6.setCharacterSize(25);
header6.setFillColor(sf::Color::White);
header6.setFont(font);
header6.setPosition(75, 416);
header6.setString("12:30");
sf::Text header7;
header7.setCharacterSize(25);
header7.setFillColor(sf::Color::White);
header7.setFont(font);
header7.setPosition(85, 468);
header7.setString("1:30");
sf::Text header8;
header8.setCharacterSize(25);
header8.setFillColor(sf::Color::White);
header8.setFont(font);
header8.setPosition(85, 520);
header8.setString("2:30");
sf::Text header9;
header9.setCharacterSize(25);
header9.setFillColor(sf::Color::White);
header9.setFont(font);
header9.setPosition(85, 572);
header9.setString("3:30");
sf::Text header10;
header10.setCharacterSize(25);
header10.setFillColor(sf::Color::White);
header10.setFont(font);
header10.setPosition(85, 624);
header10.setString("4:30");
sf::Text header11;
header11.setCharacterSize(25);
header11.setFillColor(sf::Color::White);
header11.setFont(font);
header11.setPosition(85, 676);
header11.setString("5:30");
sf::Text header12;
header12.setCharacterSize(25);
header12.setFillColor(sf::Color::White);
header12.setFont(font);
header12.setPosition(85, 728);
header12.setString("6:30");
sf::Text header13;
header13.setCharacterSize(25);
header13.setFillColor(sf::Color::White);
header13.setFont(font);
header13.setPosition(85, 780);
header13.setString("7:30");
sf::Color colorArray[] = {sf::Color(53, 67, 221), sf::Color(204, 34, 34),
sf::Color(237, 138, 0), sf::Color(38, 193, 183),
sf::Color(214, 52, 138), sf::Color(23, 168, 35)};
//Blue, Red, Orange, Teal, Magenta, Green
while (window.isOpen())
{
sf::Event event;
// checks when to close window
while (window.pollEvent(event))
{
sf::Vector2i localPosition = sf::Mouse::getPosition(window);
switch(event.type)
{
case sf::Event::Closed:
window.close();
break;
case sf::Event::MouseButtonPressed:
std::cout << "NONE OF IT" << std::endl;
break;
}
}
//MAKES GRID
window.clear(sf::Color(92, 22, 124));