// --------------------------------------------------------------------------
// Citadel: UIMisc.CPP
//
// User interface garbage dump; if it ain't elsewhere, it's here.

#include "ctdl.h"
#pragma hdrstop

#include "log.h"

// --------------------------------------------------------------------------
// Contents
//


void TwirlyCursorC::Start(void)
	{
	if (!Active && TI()CurrentUser->IsTwirly() && !IsKeyFromUserReady())
		{
		Length = strlen(cfg.twirly);
		Active = TRUE;

		oChar(' ');
		}
	}

void TwirlyCursorC::Update(void)
	{
	if (Active && !IsKeyFromUserReady())
		{
		// oldprinting = printing
		// printing = FALSE;

		twirlypause(cfg.twirlypause);

		if (++Position >= Length)
			{
			Position = 0;
			}

		oChar('\b');
		oChar(cfg.twirly[Position]);

		// printing = oldprinting;
		}
	}

void TwirlyCursorC::Stop(void)
	{
	if (Active)
		{
		doBS();
		Active = FALSE;
		}
	}

void BadMenuSelection(int C)
	{
	if (C)
		{
		oChar(C);
		mPrintfCR(sqst);
		}
	else
		{
		mPrintfCR(qst);
		}

	if (!TI()CurrentUser->IsExpert())
		{
		CRCRmPrintfCR(getmsg(200));
		}
	}


int DoMenuPrompt(const char *Text1, const char *Text2)
	{
	TI()UserControl.SetOutFlag(IMPERVIOUS);

	CRmPrintf(Text1, Text2);

	return (iCharNE());
	}
