Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/src/ceguilua/ceguilua-0.5.0/package/UnifiedCoordSystem.pkg @ 2610

Last change on this file since 2610 was 2608, checked in by rgrieder, 16 years ago

Large cleanup in CEGUILua:

  • Removed the heavy 1.7MB bind files and added the small pkg files from the CEGUI source instead
  • Those pkg files get copied version incrementally (starting with 0.5.0) to the binary dir. That saves a lot of files when having 4 different versions.
  • Added support for CEGUI 0.6.0 and 0.6.2
  • Added library info files
  • CEGUILua 0.5.0 finally supports Lua 5.1 too That means all version support both Lua 5.0 and 5.1
  • Added unified diffs with the changes to the CEGUILua source
  • Property svn:eol-style set to native
File size: 1.9 KB
Line 
1/***********************************************************************
2        UDim
3***********************************************************************/
4class UDim
5{
6        float d_scale @ scale;
7        float d_offset @ offset;
8
9        float asAbsolute(float base) const;
10        float asRelative(float base) const;
11
12        UDim operator+ (const UDim& other) const;
13        UDim operator- (const UDim& other) const;
14        UDim operator/ (const UDim& other) const;
15        UDim operator* (const UDim& other) const;
16
17        bool operator== (const UDim& other) const;
18
19        UDim();
20        UDim(float scale, float offset);
21};
22
23
24/***********************************************************************
25        UVector2
26***********************************************************************/
27class UVector2
28{
29        UDim d_x @ x;
30        UDim d_y @ y;
31
32        Vector2 asAbsolute(const Size& base) const;
33        Vector2 asRelative(const Size& base) const;
34
35        UVector2 operator+ (const UVector2& other) const;
36        UVector2 operator- (const UVector2& other) const;
37        UVector2 operator/ (const UVector2& other) const;
38        UVector2 operator* (const UVector2& other) const;
39
40        bool operator== (const UVector2& other) const;
41
42        UVector2();
43        UVector2(UDim& scale, UDim& offset);
44};
45
46
47/***********************************************************************
48        URect
49***********************************************************************/
50class URect
51{
52        UVector2 d_min @ min;
53        UVector2 d_max @ max;
54
55        Rect asAbsolute(const Size& base) const;
56        Rect asRelative(const Size& base) const;
57
58        const UVector2& getPosition() const;
59        UVector2 getSize() const;
60        UDim getWidth() const;
61        UDim getHeight() const;
62
63        void setPosition(const UVector2& pos);
64        void setSize(const UVector2& sz);
65        void setWidth(const UDim& w);
66        void setHeight(const UDim& h);
67
68        void offset(const UVector2& sz);
69
70        URect();
71        URect(const UVector2& min, const UVector2& max);
72        URect(const UDim& left, const UDim& top, const UDim& right, const UDim& bottom);
73};
Note: See TracBrowser for help on using the repository browser.