| 1 | /* |
| 2 | * Descent 3 |
| 3 | * Copyright (C) 2024 Parallax Software |
| 4 | * |
| 5 | * This program is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | |
| 18 | --- HISTORICAL COMMENTS FOLLOW --- |
| 19 | |
| 20 | * $Logfile: /DescentIII/main/lib/uires.h $ |
| 21 | * $Revision: 19 $ |
| 22 | * $Date: 10/21/99 1:53p $ |
| 23 | * $Author: Kevin $ |
| 24 | * |
| 25 | * Resources |
| 26 | * |
| 27 | * $Log: /DescentIII/main/lib/uires.h $ |
| 28 | * |
| 29 | * 19 10/21/99 1:53p Kevin |
| 30 | * Mac Merge |
| 31 | * |
| 32 | * 18 7/06/99 5:52p Kevin |
| 33 | * PXO & multiplayer fixes for the patch |
| 34 | * |
| 35 | * 17 5/20/99 10:50p Samir |
| 36 | * changed way memory was allocated for strings in text items, empty |
| 37 | * strings all point to same empty buffer for efficiency. |
| 38 | * |
| 39 | * 16 5/10/99 10:53p Ardussi |
| 40 | * changes to compile on Mac |
| 41 | * |
| 42 | * 15 9/30/98 4:32p Samir |
| 43 | * added snazzy text. |
| 44 | * |
| 45 | * 14 9/23/98 11:46a Samir |
| 46 | * added static text saturation. |
| 47 | * |
| 48 | * 13 8/20/98 6:45p Samir |
| 49 | * use const char for UITextItem create. |
| 50 | * |
| 51 | * 12 5/25/98 8:18p Samir |
| 52 | * added function to get text pointer to text item. |
| 53 | * |
| 54 | * 11 5/01/98 6:24p Samir |
| 55 | * added draw class field to draw for each resource. |
| 56 | * |
| 57 | * 10 3/13/98 11:51a Samir |
| 58 | * default text color is black. |
| 59 | * |
| 60 | * 9 3/10/98 7:26p Samir |
| 61 | * Fixed UIBitmapItem::get_chunked_bitmap. |
| 62 | * |
| 63 | * 8 3/05/98 6:40p Samir |
| 64 | * Virtualized a lot of functions. |
| 65 | * |
| 66 | * 7 2/13/98 6:34p Samir |
| 67 | * Added UIStatic class. |
| 68 | * |
| 69 | * 6 2/10/98 4:55p Samir |
| 70 | * Added radio buttons. |
| 71 | * |
| 72 | * 5 1/30/98 7:04p Samir |
| 73 | * Moved from ui.h and uilib.h. |
| 74 | * |
| 75 | * 4 1/18/98 4:22p Samir |
| 76 | * Implemented new UIItem system. |
| 77 | * |
| 78 | * 3 1/02/98 12:50p Samir |
| 79 | * Added font caps to UITextItem. |
| 80 | * |
| 81 | * 2 12/30/97 5:13p Samir |
| 82 | * INitial revision |
| 83 | * |
| 84 | * $NoKeywords: $ |
| 85 | */ |
| 86 | |
| 87 | #ifndef UIRES_H |
| 88 | #define UIRES_Hcxx . . $ `ui/uires.h:88:9`! |
| 89 | |
| 90 | #include "bitmap.h"cxx . . $ `<file>/lib/bitmap.h`/ |
| 91 | #include "grdefs.h"cxx . . $ `<file>/lib/grdefs.h`/ |
| 92 | |
| 93 | enum tUIResClasscxx . . $ tUIResClass# { uiItemcxx . . $ uiItem., uiTextItemcxx . . $ uiTextItem., uiBitmapItemcxx . . $ uiBitmapItem. }; |
| 94 | |
| 95 | enum tUIDrawClasscxx . . $ tUIDrawClass# { uiDrawNormalcxx . . $ uiDrawNormal., uiDrawAlphaSaturatecxx . . $ uiDrawAlphaSaturate., uiDrawFadedcxx . . $ uiDrawFaded. }; |
| 96 | |
| 97 | // UIItem |
| 98 | // the root class for all resource items |
| 99 | |
| 100 | class UIItemcxx . . $ UIItem# { |
| 101 | public: |
| 102 | UIItemcxx . . $ UIItem#UIItem(49f6e7a06ebc5aa8).(){}; |
| 103 | virtual ~cxx . . $ UIItem#`~UIItem`(ced63f7c635d850d).UIItemcxx . . $ UIItem#(){}; |
| 104 | |
| 105 | // if returns false, then it didn't draw. |
| 106 | virtual bool drawcxx . . $ UIItem#draw(84329bcd07240ccf).(int x, int y, tUIDrawClasscxx . . $ tUIDrawClass# draw_class = uiDrawNormalcxx . . $ uiDrawNormal.) { return false; }; |
| 107 | virtual bool drawcxx . . $ UIItem#draw(a1642a0ee405ca20).(int x, int y, int w, int h) { return false; }; |
| 108 | virtual int widthcxx . . $ UIItem#width(b126dc7c1de90089).() { return 0; }; |
| 109 | virtual int heightcxx . . $ UIItem#height(b126dc7c1de90089).() { return 0; }; |
| 110 | virtual tUIResClasscxx . . $ tUIResClass# class_typecxx . . $ UIItem#class_type(b573d6a53739293).() { return uiItemcxx . . $ uiItem.; }; |
| 111 | virtual void set_alphacxx . . $ UIItem#set_alpha(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# alpha){}; |
| 112 | virtual uint8_tcxx . . $ uint8_t# get_alphacxx . . $ UIItem#get_alpha(bd807b21b9713a30).() const { return 0; }; |
| 113 | virtual void set_colorcxx . . $ UIItem#set_color(cb2f890c2fdad230).(ddgr_colorcxx . . $ ddgr_color# col){}; |
| 114 | virtual ddgr_colorcxx . . $ ddgr_color# get_colorcxx . . $ UIItem#get_color(ddd8539a2fcdd4ce).() const { return GR_BLACKcxx . . $ GR_BLACK.; }; |
| 115 | virtual UIItemcxx . . $ UIItem# *CopyUIItemcxx . . $ UIItem#CopyUIItem(ff7db2a2e5605676).() { return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; }; |
| 116 | }; |
| 117 | |
| 118 | // UITextItem |
| 119 | // used by user interface system, contains information about how to render |
| 120 | // text. allows for alpha, color and different fonts. |
| 121 | |
| 122 | class UITextItemcxx . . $ UITextItem# : public UIItemcxx . . $ UIItem# { |
| 123 | friend void SetUITextItemTextcxx . . $ SetUITextItemText(ee114b9bb7b54720).(UITextItemcxx . . $ UITextItem# *uit, char *newtext, uint32_tcxx . . $ uint32_t# color); |
| 124 | |
| 125 | uint8_tcxx . . $ uint8_t# m_Alphacxx . . $ UITextItem#m_Alpha.; // alpha value of text. |
| 126 | ddgr_colorcxx . . $ ddgr_color# m_Colorcxx . . $ UITextItem#m_Color.; // color of text. |
| 127 | int m_Fontcxx . . $ UITextItem#m_Font.; |
| 128 | |
| 129 | static int m_DefaultFontcxx . . $ UITextItem#m_DefaultFont.; |
| 130 | static int m_Satcxx . . $ UITextItem#m_Sat.; |
| 131 | |
| 132 | protected: |
| 133 | char *m_Textcxx . . $ UITextItem#m_Text.; |
| 134 | |
| 135 | public: |
| 136 | static void SetDefaultFontcxx . . $ UITextItem#SetDefaultFont(d4f767463ce0a6b3).(int font) { UITextItemcxx . . $ UITextItem#::m_DefaultFontcxx . . $ UITextItem#m_DefaultFont. = font; } |
| 137 | static void SetSaturationFactorcxx . . $ UITextItem#SetSaturationFactor(d4f767463ce0a6b3).(int sat) { UITextItemcxx . . $ UITextItem#::m_Satcxx . . $ UITextItem#m_Sat. = sat; } |
| 138 | static char dummy_strcxx . . $ UITextItem#dummy_str.[4]; |
| 139 | |
| 140 | public: |
| 141 | UITextItemcxx . . $ UITextItem#UITextItem(49f6e7a06ebc5aa8).() { |
| 142 | m_Textcxx . . $ UITextItem#m_Text. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!; |
| 143 | m_Alphacxx . . $ UITextItem#m_Alpha. = 255; |
| 144 | m_Colorcxx . . $ UITextItem#m_Color. = GR_WHITEcxx . . $ GR_WHITE.; |
| 145 | m_Fontcxx . . $ UITextItem#m_Font. = m_DefaultFontcxx . . $ UITextItem#m_DefaultFont.; |
| 146 | }; |
| 147 | UITextItemcxx . . $ UITextItem#UITextItem(5f8aa4f2725849c4).(const char *text, ddgr_colorcxx . . $ ddgr_color# color = GR_WHITEcxx . . $ GR_WHITE., uint8_tcxx . . $ uint8_t# alpha = 255); |
| 148 | UITextItemcxx . . $ UITextItem#UITextItem(284d3affb5f9e25a).(int font, const char *text, ddgr_colorcxx . . $ ddgr_color# color = GR_WHITEcxx . . $ GR_WHITE., uint8_tcxx . . $ uint8_t# alpha = 255); |
| 149 | virtual ~cxx . . $ UITextItem#`~UITextItem`(ced63f7c635d850d).UITextItemcxx . . $ UITextItem#(); |
| 150 | |
| 151 | // if returns false, then it didn't draw. |
| 152 | virtual bool drawcxx . . $ UITextItem#draw(84329bcd07240ccf).(int x, int y, tUIDrawClasscxx . . $ tUIDrawClass# draw_class = uiDrawNormalcxx . . $ uiDrawNormal.); |
| 153 | virtual bool drawcxx . . $ UITextItem#draw(a1642a0ee405ca20).(int x, int y, int w, int h) { return drawcxx . . $ UITextItem#draw(84329bcd07240ccf).(x, y); }; |
| 154 | virtual int widthcxx . . $ UITextItem#width(b126dc7c1de90089).(); |
| 155 | virtual int heightcxx . . $ UITextItem#height(b126dc7c1de90089).(); |
| 156 | virtual tUIResClasscxx . . $ tUIResClass# class_typecxx . . $ UITextItem#class_type(6db6d5b0d050b44b).() const { return uiTextItemcxx . . $ uiTextItem.; }; |
| 157 | virtual UIItemcxx . . $ UIItem# *CopyUIItemcxx . . $ UITextItem#CopyUIItem(ff7db2a2e5605676).(); |
| 158 | |
| 159 | // set visual characteristics of text item |
| 160 | virtual void set_alphacxx . . $ UITextItem#set_alpha(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# alpha) { m_Alphacxx . . $ UITextItem#m_Alpha. = alpha; }; |
| 161 | virtual void set_colorcxx . . $ UITextItem#set_color(cb2f890c2fdad230).(ddgr_colorcxx . . $ ddgr_color# col) { m_Colorcxx . . $ UITextItem#m_Color. = col; }; |
| 162 | |
| 163 | void set_fontcxx . . $ UITextItem#set_font(d4f767463ce0a6b3).(int font) { m_Fontcxx . . $ UITextItem#m_Font. = font; }; |
| 164 | |
| 165 | // get visual characteristics of text item |
| 166 | virtual uint8_tcxx . . $ uint8_t# get_alphacxx . . $ UITextItem#get_alpha(bd807b21b9713a30).() const { return m_Alphacxx . . $ UITextItem#m_Alpha.; }; |
| 167 | virtual ddgr_colorcxx . . $ ddgr_color# get_colorcxx . . $ UITextItem#get_color(ddd8539a2fcdd4ce).() const { return m_Colorcxx . . $ UITextItem#m_Color.; }; |
| 168 | int get_fontcxx . . $ UITextItem#get_font(455f465bc33b4cdf).() const { return m_Fontcxx . . $ UITextItem#m_Font.; }; |
| 169 | |
| 170 | // operators |
| 171 | operatorcxx . . $ UITextItem#`operator const char *`(a9f41ea0e82d88cf). const char *() const { // access m_Text |
| 172 | return m_Textcxx . . $ UITextItem#m_Text.; |
| 173 | }; |
| 174 | |
| 175 | const char *GetBuffercxx . . $ UITextItem#GetBuffer(a9f41ea0e82d88cf).() const { return m_Textcxx . . $ UITextItem#m_Text.; }; |
| 176 | |
| 177 | const UITextItemcxx . . $ UITextItem# &operatorcxx . . $ UITextItem#`operator=`(5ad635489e71ed3b).=(const UITextItemcxx . . $ UITextItem# &item); |
| 178 | }; |
| 179 | |
| 180 | #define UISNAZZYTEXTF_BLINKINGcxx . . $ `ui/uires.h:180:9`! 0x1 |
| 181 | #define UISNAZZYTEXTF_RESERVEDcxx . . $ `ui/uires.h:181:9`! 0xffff0000 |
| 182 | |
| 183 | class UISnazzyTextItemcxx . . $ UISnazzyTextItem# : public UITextItemcxx . . $ UITextItem# { |
| 184 | unsigned m_flagscxx . . $ UISnazzyTextItem#m_flags.; |
| 185 | |
| 186 | unioncxx . . $ UISnazzyTextItem#$anonymous_type_0# { |
| 187 | int icxx . . $ UISnazzyTextItem#$anonymous_type_0#i.; |
| 188 | float fcxx . . $ UISnazzyTextItem#$anonymous_type_0#f.; |
| 189 | } m_internaldatacxx . . $ UISnazzyTextItem#m_internaldata.; |
| 190 | |
| 191 | unioncxx . . $ UISnazzyTextItem#$anonymous_type_1# { |
| 192 | int icxx . . $ UISnazzyTextItem#$anonymous_type_1#i.; |
| 193 | float fcxx . . $ UISnazzyTextItem#$anonymous_type_1#f.; |
| 194 | } m_datacxx . . $ UISnazzyTextItem#m_data.; |
| 195 | |
| 196 | public: |
| 197 | UISnazzyTextItemcxx . . $ UISnazzyTextItem#UISnazzyTextItem(49f6e7a06ebc5aa8).() { m_flagscxx . . $ UISnazzyTextItem#m_flags. = m_datacxx . . $ UISnazzyTextItem#m_data..icxx . . $ UISnazzyTextItem#$anonymous_type_1#i. = m_internaldatacxx . . $ UISnazzyTextItem#m_internaldata..icxx . . $ UISnazzyTextItem#$anonymous_type_0#i. = 0; }; |
| 198 | UISnazzyTextItemcxx . . $ UISnazzyTextItem#UISnazzyTextItem(eaa3060947519dd2).(unsigned flags, const char *text, ddgr_colorcxx . . $ ddgr_color# color = GR_WHITEcxx . . $ GR_WHITE., uint8_tcxx . . $ uint8_t# alpha = 255); |
| 199 | UISnazzyTextItemcxx . . $ UISnazzyTextItem#UISnazzyTextItem(63a199010fdc91d2).(unsigned flags, int font, const char *text, ddgr_colorcxx . . $ ddgr_color# color = GR_WHITEcxx . . $ GR_WHITE., uint8_tcxx . . $ uint8_t# alpha = 255); |
| 200 | |
| 201 | void set_datacxx . . $ UISnazzyTextItem#set_data(d4f767463ce0a6b3).(int data) { m_datacxx . . $ UISnazzyTextItem#m_data..icxx . . $ UISnazzyTextItem#$anonymous_type_1#i. = data; }; |
| 202 | void set_datacxx . . $ UISnazzyTextItem#set_data(9364e6e7bff7660).(float data) { m_datacxx . . $ UISnazzyTextItem#m_data..fcxx . . $ UISnazzyTextItem#$anonymous_type_1#f. = data; }; |
| 203 | |
| 204 | void set_flagscxx . . $ UISnazzyTextItem#set_flags(cb2f890c2fdad230).(unsigned flags); |
| 205 | |
| 206 | virtual bool drawcxx . . $ UISnazzyTextItem#draw(84329bcd07240ccf).(int x, int y, tUIDrawClasscxx . . $ tUIDrawClass# draw_class = uiDrawNormalcxx . . $ uiDrawNormal.); |
| 207 | virtual UIItemcxx . . $ UIItem# *CopyUIItemcxx . . $ UISnazzyTextItem#CopyUIItem(ff7db2a2e5605676).(); |
| 208 | |
| 209 | const UISnazzyTextItemcxx . . $ UISnazzyTextItem# &operatorcxx . . $ UISnazzyTextItem#`operator=`(e280f7066a27ce77).=(const UISnazzyTextItemcxx . . $ UISnazzyTextItem# &item); |
| 210 | }; |
| 211 | |
| 212 | // UIBitmapItem |
| 213 | // used by user interface system, contains information about how to render |
| 214 | // text. allows for alpha, color and different fonts. |
| 215 | |
| 216 | class UIBitmapItemcxx . . $ UIBitmapItem# : public UIItemcxx . . $ UIItem# { |
| 217 | bool m_IsValidcxx . . $ UIBitmapItem#m_IsValid.; |
| 218 | bool m_IsChunkedcxx . . $ UIBitmapItem#m_IsChunked.; // is this a chunked bitmap? |
| 219 | |
| 220 | unioncxx . . $ UIBitmapItem#$anonymous_type_2# { |
| 221 | chunked_bitmapcxx . . $ chunked_bitmap# *chunkcxx . . $ UIBitmapItem#$anonymous_type_2#chunk.; // a chunked bitmap. |
| 222 | int handlecxx . . $ UIBitmapItem#$anonymous_type_2#handle.; // a simple bitmap |
| 223 | } m_Bitmapcxx . . $ UIBitmapItem#m_Bitmap.; // a bitmap. |
| 224 | |
| 225 | uint8_tcxx . . $ uint8_t# m_Alphacxx . . $ UIBitmapItem#m_Alpha.; // alpha value of text. |
| 226 | |
| 227 | public: |
| 228 | UIBitmapItemcxx . . $ UIBitmapItem#UIBitmapItem(49f6e7a06ebc5aa8).() { |
| 229 | m_IsValidcxx . . $ UIBitmapItem#m_IsValid. = false; |
| 230 | m_Alphacxx . . $ UIBitmapItem#m_Alpha. = 255; |
| 231 | }; |
| 232 | UIBitmapItemcxx . . $ UIBitmapItem#UIBitmapItem(93682de7a42f3bc5).(chunked_bitmapcxx . . $ chunked_bitmap# *chunk, uint8_tcxx . . $ uint8_t# alpha = 255) { |
| 233 | m_IsValidcxx . . $ UIBitmapItem#m_IsValid. = true; |
| 234 | m_Bitmapcxx . . $ UIBitmapItem#m_Bitmap..chunkcxx . . $ UIBitmapItem#$anonymous_type_2#chunk. = chunk; |
| 235 | m_Alphacxx . . $ UIBitmapItem#m_Alpha. = alpha; |
| 236 | m_IsChunkedcxx . . $ UIBitmapItem#m_IsChunked. = true; |
| 237 | }; |
| 238 | UIBitmapItemcxx . . $ UIBitmapItem#UIBitmapItem(9633529ce3c4ff50).(int bm_handle, uint8_tcxx . . $ uint8_t# alpha = 255) { |
| 239 | m_IsValidcxx . . $ UIBitmapItem#m_IsValid. = true; |
| 240 | m_Alphacxx . . $ UIBitmapItem#m_Alpha. = alpha; |
| 241 | m_IsChunkedcxx . . $ UIBitmapItem#m_IsChunked. = false; |
| 242 | m_Bitmapcxx . . $ UIBitmapItem#m_Bitmap..handlecxx . . $ UIBitmapItem#$anonymous_type_2#handle. = bm_handle; |
| 243 | }; |
| 244 | virtual ~cxx . . $ UIBitmapItem#`~UIBitmapItem`(ced63f7c635d850d).UIBitmapItemcxx . . $ UIBitmapItem#(){}; |
| 245 | |
| 246 | // if returns false, then it didn't draw. |
| 247 | virtual bool drawcxx . . $ UIBitmapItem#draw(84329bcd07240ccf).(int x, int y, tUIDrawClasscxx . . $ tUIDrawClass# draw_class = uiDrawNormalcxx . . $ uiDrawNormal.); |
| 248 | virtual bool drawcxx . . $ UIBitmapItem#draw(a1642a0ee405ca20).(int x, int y, int w, int h) { return drawcxx . . $ UIBitmapItem#draw(84329bcd07240ccf).(x, y); }; |
| 249 | virtual int widthcxx . . $ UIBitmapItem#width(b126dc7c1de90089).(); |
| 250 | virtual int heightcxx . . $ UIBitmapItem#height(b126dc7c1de90089).(); |
| 251 | virtual tUIResClasscxx . . $ tUIResClass# class_typecxx . . $ UIBitmapItem#class_type(6db6d5b0d050b44b).() const { return uiBitmapItemcxx . . $ uiBitmapItem.; }; |
| 252 | virtual UIItemcxx . . $ UIItem# *CopyUIItemcxx . . $ UIBitmapItem#CopyUIItem(ff7db2a2e5605676).(); |
| 253 | |
| 254 | // flag checking |
| 255 | bool is_chunkedcxx . . $ UIBitmapItem#is_chunked(50ce9a9e25b4a850).() const { return m_IsChunkedcxx . . $ UIBitmapItem#m_IsChunked.; }; |
| 256 | bool is_validcxx . . $ UIBitmapItem#is_valid(50ce9a9e25b4a850).() const { return m_IsValidcxx . . $ UIBitmapItem#m_IsValid.; }; |
| 257 | |
| 258 | // set visual characteristics of bitmap |
| 259 | void set_chunked_bitmapcxx . . $ UIBitmapItem#set_chunked_bitmap(1635f60f4d3c1317).(chunked_bitmapcxx . . $ chunked_bitmap# *chunk) { |
| 260 | m_IsValidcxx . . $ UIBitmapItem#m_IsValid. = true; |
| 261 | m_IsChunkedcxx . . $ UIBitmapItem#m_IsChunked. = true; |
| 262 | m_Bitmapcxx . . $ UIBitmapItem#m_Bitmap..chunkcxx . . $ UIBitmapItem#$anonymous_type_2#chunk. = chunk; |
| 263 | }; |
| 264 | void set_bitmapcxx . . $ UIBitmapItem#set_bitmap(d4f767463ce0a6b3).(int bm_handle) { |
| 265 | m_IsValidcxx . . $ UIBitmapItem#m_IsValid. = true; |
| 266 | m_IsChunkedcxx . . $ UIBitmapItem#m_IsChunked. = false; |
| 267 | m_Bitmapcxx . . $ UIBitmapItem#m_Bitmap..handlecxx . . $ UIBitmapItem#$anonymous_type_2#handle. = bm_handle; |
| 268 | }; |
| 269 | virtual void set_alphacxx . . $ UIBitmapItem#set_alpha(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# alpha) { // sets the alpha |
| 270 | m_Alphacxx . . $ UIBitmapItem#m_Alpha. = alpha; |
| 271 | }; |
| 272 | |
| 273 | // get visual characteristics |
| 274 | chunked_bitmapcxx . . $ chunked_bitmap# *get_chunked_bitmapcxx . . $ UIBitmapItem#get_chunked_bitmap(c897c69353849a).() const { return (chunked_bitmapcxx . . $ chunked_bitmap# *)m_Bitmapcxx . . $ UIBitmapItem#m_Bitmap..chunkcxx . . $ UIBitmapItem#$anonymous_type_2#chunk.; }; |
| 275 | int get_bitmapcxx . . $ UIBitmapItem#get_bitmap(455f465bc33b4cdf).() const { return m_Bitmapcxx . . $ UIBitmapItem#m_Bitmap..handlecxx . . $ UIBitmapItem#$anonymous_type_2#handle.; }; |
| 276 | virtual uint8_tcxx . . $ uint8_t# get_alphacxx . . $ UIBitmapItem#get_alpha(bd807b21b9713a30).() const { // gets alpha. |
| 277 | return m_Alphacxx . . $ UIBitmapItem#m_Alpha.; |
| 278 | }; |
| 279 | |
| 280 | // const UIBitmapItem& UIBitmapItem::operator =(const UIBitmapItem& item); // JCA made Mac compatible |
| 281 | const UIBitmapItemcxx . . $ UIBitmapItem# &operatorcxx . . $ UIBitmapItem#`operator=`(1e6fe964efb8cec0).=(const UIBitmapItemcxx . . $ UIBitmapItem# &item); |
| 282 | }; |
| 283 | |
| 284 | // UIPrimativeItem |
| 285 | // used to render simple 2d backgrounds. |
| 286 | |
| 287 | class UIPrimativeItemcxx . . $ UIPrimativeItem# : public UIItemcxx . . $ UIItem# { |
| 288 | ddgr_colorcxx . . $ ddgr_color# colorcxx . . $ UIPrimativeItem#color.; |
| 289 | uint8_tcxx . . $ uint8_t# alphacxx . . $ UIPrimativeItem#alpha.; |
| 290 | |
| 291 | public: |
| 292 | UIPrimativeItemcxx . . $ UIPrimativeItem#UIPrimativeItem(cc289a6b3dfc48da).(ddgr_colorcxx . . $ ddgr_color# col, uint8_tcxx . . $ uint8_t# alph = 255) { |
| 293 | colorcxx . . $ UIPrimativeItem#color. = col; |
| 294 | alphacxx . . $ UIPrimativeItem#alpha. = alph; |
| 295 | }; |
| 296 | |
| 297 | virtual UIItemcxx . . $ UIItem# *CopyUIItemcxx . . $ UIPrimativeItem#CopyUIItem(ff7db2a2e5605676).(); |
| 298 | |
| 299 | virtual void set_colorcxx . . $ UIPrimativeItem#set_color(cb2f890c2fdad230).(ddgr_colorcxx . . $ ddgr_color# col) { colorcxx . . $ UIPrimativeItem#color. = col; }; |
| 300 | virtual ddgr_colorcxx . . $ ddgr_color# get_colorcxx . . $ UIPrimativeItem#get_color(ddd8539a2fcdd4ce).() const { return colorcxx . . $ UIPrimativeItem#color.; }; |
| 301 | virtual void set_alphacxx . . $ UIPrimativeItem#set_alpha(ac50b47256ae7414).(uint8_tcxx . . $ uint8_t# alph) { alphacxx . . $ UIPrimativeItem#alpha. = alph; }; |
| 302 | virtual uint8_tcxx . . $ uint8_t# get_alphacxx . . $ UIPrimativeItem#get_alpha(bd807b21b9713a30).() const { return alphacxx . . $ UIPrimativeItem#alpha.; }; |
| 303 | |
| 304 | // const UIPrimativeItem& UIPrimativeItem::operator =(const UIPrimativeItem& item) // JCA made Mac compatible |
| 305 | const UIPrimativeItemcxx . . $ UIPrimativeItem# &operatorcxx . . $ UIPrimativeItem#`operator=`(da3fda7e9801fe4b).=(const UIPrimativeItemcxx . . $ UIPrimativeItem# &item) { |
| 306 | colorcxx . . $ UIPrimativeItem#color. = item.colorcxx . . $ UIPrimativeItem#color.; |
| 307 | alphacxx . . $ UIPrimativeItem#alpha. = item.alphacxx . . $ UIPrimativeItem#alpha.; |
| 308 | return *this; |
| 309 | }; |
| 310 | |
| 311 | // if returns false, then it didn't draw. |
| 312 | virtual bool drawcxx . . $ UIPrimativeItem#draw(84329bcd07240ccf).(int x, int y, tUIDrawClasscxx . . $ tUIDrawClass# draw_class = uiDrawNormalcxx . . $ uiDrawNormal.) { return false; }; |
| 313 | virtual bool drawcxx . . $ UIPrimativeItem#draw(a1642a0ee405ca20).(int x, int y, int w, int h); |
| 314 | }; |
| 315 | |
| 316 | #endif |