Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#include "print_menu.h"
#include <ncurses.h>
#include "window.h"
#include "newWindow.h"
#include <string>
using namespace std;
void Print_Output(string inputAction, Window outputWindow, int outputY)
{
int x = outputWindow.Start_x - outputWindow.Width + 2;
int y = outputWindow.Start_y - outputWindow.Height + 1;
string arrows = ">>> ";
string message = "You chose " + inputAction;
string finalMessage = arrows + message;
string output2 = "This resulted in " + inputAction;
mvprintw(y+outputY, x, finalMessage.c_str());
mvprintw(y+outputY+1, x, output2.c_str());
}
void WindowPrint(string text, Window outputWindow, bool isOutput, int outputY)
{
int x = outputWindow.Start_x - outputWindow.Width + 2;
int y = outputWindow.Start_y - outputWindow.Height+1;
string message = text;
if (isOutput)
{
message = " >>> " + text;
}
mvprintw(y+outputY, x, message.c_str());
}
void Refresh_Window(Window outputWindow)
{
int x = outputWindow.Start_x - outputWindow.Width + 2;
int y = outputWindow.Start_y - outputWindow.Height +1;
for (int i = 0; i < 18; i++)
{
mvprintw(y+i, x, " ");
refresh();
}
refresh();
}