~ubuntu-branches/ubuntu/quantal/zaz/quantal

« back to all changes in this revision

Viewing changes to src/lineeditor.h

  • Committer: Bazaar Package Importer
  • Author(s): Miriam Ruiz
  • Date: 2009-08-31 20:08:58 UTC
  • Revision ID: james.westby@ubuntu.com-20090831200858-54lcmcrna6dwk3wr
Tags: upstream-0.2.9+dfsg1
ImportĀ upstreamĀ versionĀ 0.2.9+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Zaz
 
3
 * Copyright (C) Remigiusz Dybka 2009 <remigiusz.dybka@gmail.com>
 
4
 *
 
5
 Zaz is free software: you can redistribute it and/or modify it
 
6
 under the terms of the GNU General Public License as published by the
 
7
 Free Software Foundation, either version 3 of the License, or
 
8
 (at your option) any later version.
 
9
 
 
10
 Zaz is distributed in the hope that it will be useful, but
 
11
 WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
13
 See the GNU General Public License for more details.
 
14
 
 
15
 You should have received a copy of the GNU General Public License along
 
16
 with this program.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
#ifndef __LINEEDITOR_H__
 
20
#define __LINEEDITOR_H__
 
21
 
 
22
#include "scene.h"
 
23
 
 
24
#define BLINK_RATE 50
 
25
 
 
26
namespace Scenes
 
27
{
 
28
    struct LineEditor
 
29
    {
 
30
        std::string txt;
 
31
        uint pos;
 
32
        double width;
 
33
        double y;
 
34
        bool blinkOn;
 
35
        int blinkCountdown;
 
36
        bool shift;
 
37
        uint maxLength;
 
38
 
 
39
        LineEditor(std::string txt, double width, double y, uint maxLength);
 
40
        void Render();
 
41
        void Logic(FrameEvents events);
 
42
    };
 
43
}
 
44
 
 
45
#endif //__LINEEDITOR_H__