~ubuntu-branches/ubuntu/natty/balder2d/natty

« back to all changes in this revision

Viewing changes to include/menu/numberfield.h

  • Committer: Bazaar Package Importer
  • Author(s): Bjørn Hansen
  • Date: 2008-06-15 17:15:38 UTC
  • mfrom: (1.1.1 upstream) (3.1.2 hardy)
  • Revision ID: james.westby@ubuntu.com-20080615171538-e407e07wbtdy0qs8
Tags: 1.0-1
* new upstream release
* update for guichan 8.1 (Closes: #482584)
* use physicsfs to make data/config/map/aiscript loading more flexible
* new skins for menus
* fix typo in control file long description (Closes: #458401)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//
2
 
// C++ Interface: numberfield
3
 
//
4
 
// Description: 
5
 
//
6
 
//
7
 
// Author: Bjorn Hansen <Holomorph@users.sourceforge.net>, (C) 2005
8
 
//
9
 
// Copyright: See COPYING file that comes with this distribution
10
 
//
11
 
//
12
 
#ifndef BALDERNUMBERFIELD_H
13
 
#define BALDERNUMBERFIELD_H
14
 
 
15
 
#include <guichan/widgets/textfield.hpp>
16
 
 
17
 
namespace Balder {
18
 
 
19
 
/**
20
 
a text field that only accepts numerical input
21
 
 
22
 
@author Bjorn Hansen
23
 
*/
24
 
class NumberField : public gcn::TextField
25
 
{
26
 
public:
27
 
    NumberField(int n, int maxDigits = 3);
28
 
    virtual void mousePress(int x, int y, int button);
29
 
    virtual void keyPress (const gcn::Key &key);
30
 
    virtual void draw(gcn::Graphics*);
31
 
    int getValue();
32
 
    void setValue(int n); 
33
 
private:
34
 
        int digits;
35
 
};
36
 
 
37
 
}
38
 
 
39
 
#endif