source: abuse/trunk/src/imlib/tools.hpp @ 57

Last change on this file since 57 was 57, checked in by Sam Hocevar, 11 years ago
  • Move each header to the same directory as its corresponding source, to get a better idea of which files are likely to export symbols.
File size: 1.3 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *
5 *  This software was released into the Public Domain. As with most public
6 *  domain software, no warranty is made or implied by Crack dot Com or
7 *  Jonathan Clark.
8 */
9
10#ifndef __TOOLS_HPP_
11#define __TOOLS_HPP_
12
13#include "jwindow.hpp"
14#include "input.hpp"
15#include "specs.hpp"
16#include "scroller.hpp"
17#include "visobj.hpp"
18
19class tool_picker : public spicker
20{
21  filter *map;
22  visual_object **icons;
23  int *ids;
24  int total_icons;
25  int iw,ih;
26  palette *old_pal;
27
28  public :
29
30  // you are expected keep image and id list in memory, tool_picker does not copy them
31  tool_picker(int X, int Y, int ID,
32              int show_h, visual_object **Icons, int *Ids, int total_ic,
33              palette *icon_palette, palette *pal, window_manager *wm, ifield *Next);
34
35  virtual void draw_item(window_manager *wm, image *screen, int x, int y, int num, int active);
36  virtual int total() { return total_icons; }
37  virtual int item_width(window_manager *wm) { return iw; }
38  virtual int item_height(window_manager *wm) { return ih; }
39  virtual void note_new_current(window_manager *wm, image *screen, input_manager *inm, int x)
40  { wm->push_event(new event(ids[x],NULL)); }
41
42  void remap(palette *pal, window_manager *wm, image *screen);
43  ~tool_picker();
44} ;
45
46
47#endif
48
49
50
51
52
53
54
Note: See TracBrowser for help on using the repository browser.