source: golgotha/src/maxtool/st_edit.hh @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 1.6 KB
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9#ifndef ST_EDIT_HH
10#define ST_EDIT_HH
11
12#include "window/window.hh"
13#include "device/device.hh"
14#include "string/string.hh"
15#include "math/num_type.hh"
16
17class i4_image_class;
18class i4_text_input_class;
19
20class m1_st_edit_window_class : public i4_window_class
21{
22private:
23  enum { LEFT = 1, RIGHT = 2, MIDDLE = 3 };
24  int grab;
25  int last_x, last_y, last_but;
26
27  i4_image_class *texture;
28  int preselect_x, preselect_y;
29  int snap_off_x, snap_off_y;
30
31  i4_bool verts_are_selected();
32  i4_bool dragging;
33  i4_text_input_class *tname_edit;
34  void get_point(int poly, int num, int &x, int &y);
35
36  void drag_points(int xc, int yc);
37
38  i4_float twidth() const;
39  i4_float theight() const;
40public:
41  void edit_poly_changed();
42  m1_st_edit_window_class(w16 w , w16 h, i4_text_input_class *tname_edit);
43  void draw(i4_draw_context_class &context);
44  void receive_event(i4_event *ev);
45  void change_current_texture(i4_const_str new_name);
46  void change_current_verts();
47  void select_point(int point);
48
49  char *name() { return "texture coord editor"; }
50};
51
52extern i4_event_handler_reference_class<m1_st_edit_window_class> m1_st_edit;
53
54
55#endif
Note: See TracBrowser for help on using the repository browser.