2 Copyright 2004-2005 Chris Tallon
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
35 setTitleBarColour(Colour::TITLEBARBACKGROUND);
40 if (mainText) delete[] mainText;
43 void VInfo::setExitable()
48 void VInfo::setDropThrough()
53 void VInfo::setMainText(const char* takeText)
55 int length = strlen(takeText);
56 mainText = new char[length + 1];
57 strcpy(mainText, takeText);
58 mainTextType = NORMAL;
61 void VInfo::setOneLiner(const char* takeText)
63 int length = strlen(takeText);
64 mainText = new char[length + 1];
65 strcpy(mainText, takeText);
66 mainTextType = ONELINER;
75 if (mainTextType == NORMAL)
77 drawPara(mainText, 10, 45, Colour::LIGHTTEXT);
80 if (mainTextType == ONELINER)
82 if (titleBarOn) drawTextCentre(mainText, area.w / 2, 75, Colour::LIGHTTEXT);
83 else drawTextCentre(mainText, area.w / 2, 55, Colour::LIGHTTEXT);
88 int VInfo::handleCommand(int command)
90 if (dropThrough) return 0;
97 if (exitable) return 4;
104 void VInfo::okButton()
106 okbutton.setPosition((area.w / 2) - 30, area.h - 50);
107 okbutton.setText(tr("OK"));
108 okbutton.setActive(1);
112 void VInfo::processMessage(Message* m)
114 if (m->message == Message::MOUSE_LBDOWN)
116 BoxStack::getInstance()->handleCommand(Remote::OK); //simulate OK press