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
37 setTitleBarColour(Colour::TITLEBARBACKGROUND);
42 if (mainText) delete[] mainText;
45 void VInfo::setExitable()
50 void VInfo::setDropThrough()
55 void VInfo::setMainText(const char* takeText)
57 int length = strlen(takeText);
58 mainText = new char[length + 1];
59 strcpy(mainText, takeText);
60 mainTextType = NORMAL;
63 void VInfo::setOneLiner(const char* takeText)
65 int length = strlen(takeText);
66 mainText = new char[length + 1];
67 strcpy(mainText, takeText);
68 mainTextType = ONELINER;
77 if (mainTextType == NORMAL)
79 drawPara(mainText, 10, 45, Colour::LIGHTTEXT);
82 if (mainTextType == ONELINER)
84 if (titleBarOn) drawTextCentre(mainText, area.w / 2, 75, Colour::LIGHTTEXT);
85 else drawTextCentre(mainText, area.w / 2, 55, Colour::LIGHTTEXT);
93 button.setPosition((area.w / 2) - 30, area.h - 50);
94 button.setText(tr("OK"));
102 int VInfo::handleCommand(int command)
104 if (dropThrough) return 0;
111 if (exitable) return 4;
118 void VInfo::okButton()
123 void VInfo::processMessage(Message* m)
125 if (m->message == Message::MOUSE_LBDOWN)
127 BoxStack::getInstance()->handleCommand(Remote::OK); //simulate OK press