koffi 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (313) hide show
  1. package/ChangeLog.md +13 -1
  2. package/build/qemu/2.1.2/koffi_darwin_arm64.tar.gz +0 -0
  3. package/build/qemu/2.1.2/koffi_darwin_x64.tar.gz +0 -0
  4. package/build/qemu/2.1.2/koffi_freebsd_arm64.tar.gz +0 -0
  5. package/build/qemu/2.1.2/koffi_freebsd_ia32.tar.gz +0 -0
  6. package/build/qemu/2.1.2/koffi_freebsd_x64.tar.gz +0 -0
  7. package/build/qemu/2.1.2/koffi_linux_arm32hf.tar.gz +0 -0
  8. package/build/qemu/2.1.2/koffi_linux_arm64.tar.gz +0 -0
  9. package/build/qemu/2.1.2/koffi_linux_ia32.tar.gz +0 -0
  10. package/build/qemu/2.1.2/koffi_linux_riscv64hf64.tar.gz +0 -0
  11. package/build/qemu/2.1.2/koffi_linux_x64.tar.gz +0 -0
  12. package/build/qemu/2.1.2/koffi_openbsd_ia32.tar.gz +0 -0
  13. package/build/qemu/2.1.2/koffi_openbsd_x64.tar.gz +0 -0
  14. package/build/qemu/2.1.2/koffi_win32_arm64.tar.gz +0 -0
  15. package/build/qemu/2.1.2/koffi_win32_ia32.tar.gz +0 -0
  16. package/build/qemu/2.1.2/koffi_win32_x64.tar.gz +0 -0
  17. package/doc/templates/badges.html +3 -0
  18. package/package.json +2 -2
  19. package/src/abi_arm64.cc +35 -1
  20. package/src/abi_x64_win.cc +2 -8
  21. package/src/abi_x86.cc +1 -7
  22. package/src/call.cc +2 -2
  23. package/src/call.hh +1 -1
  24. package/src/ffi.hh +1 -1
  25. package/src/util.hh +6 -0
  26. package/test/raylib.js +37 -5
  27. package/vendor/libcc/libcc.cc +488 -254
  28. package/vendor/libcc/libcc.hh +1463 -1277
  29. package/vendor/raylib/BINDINGS.md +87 -70
  30. package/vendor/raylib/CHANGELOG +263 -50
  31. package/vendor/raylib/CMakeLists.txt +12 -0
  32. package/vendor/raylib/CMakeOptions.txt +8 -1
  33. package/vendor/raylib/CONVENTIONS.md +2 -3
  34. package/vendor/raylib/FAQ.md +137 -0
  35. package/vendor/raylib/HISTORY.md +62 -29
  36. package/vendor/raylib/LICENSE +1 -1
  37. package/vendor/raylib/README.md +22 -17
  38. package/vendor/raylib/ROADMAP.md +8 -7
  39. package/vendor/raylib/cmake/CompileDefinitions.cmake +19 -15
  40. package/vendor/raylib/cmake/GlfwImport.cmake +2 -0
  41. package/vendor/raylib/cmake/LibraryConfigurations.cmake +22 -16
  42. package/vendor/raylib/cmake/raylib-config.cmake +52 -49
  43. package/vendor/raylib/examples/CMakeLists.txt +14 -9
  44. package/vendor/raylib/examples/Makefile +112 -125
  45. package/vendor/raylib/examples/Makefile.Android +1 -1
  46. package/vendor/raylib/examples/Makefile.Web +145 -158
  47. package/vendor/raylib/examples/README.md +141 -141
  48. package/vendor/raylib/examples/audio/audio_module_playing.c +9 -4
  49. package/vendor/raylib/examples/audio/audio_multichannel_sound.c +8 -3
  50. package/vendor/raylib/examples/audio/audio_music_stream.c +16 -11
  51. package/vendor/raylib/examples/audio/audio_raw_stream.c +57 -9
  52. package/vendor/raylib/examples/audio/audio_sound_loading.c +8 -3
  53. package/vendor/raylib/examples/audio/audio_stream_effects.c +179 -0
  54. package/vendor/raylib/examples/audio/audio_stream_effects.png +0 -0
  55. package/vendor/raylib/examples/build.zig +17 -6
  56. package/vendor/raylib/examples/core/core_2d_camera.c +8 -4
  57. package/vendor/raylib/examples/core/core_2d_camera_mouse_zoom.c +105 -0
  58. package/vendor/raylib/examples/core/core_2d_camera_mouse_zoom.png +0 -0
  59. package/vendor/raylib/examples/core/core_2d_camera_platformer.c +11 -6
  60. package/vendor/raylib/examples/core/core_3d_camera_first_person.c +9 -4
  61. package/vendor/raylib/examples/core/core_3d_camera_free.c +9 -4
  62. package/vendor/raylib/examples/core/core_3d_camera_mode.c +8 -3
  63. package/vendor/raylib/examples/core/core_3d_picking.c +9 -4
  64. package/vendor/raylib/examples/core/core_basic_screen_manager.c +9 -7
  65. package/vendor/raylib/examples/core/core_basic_window.c +8 -3
  66. package/vendor/raylib/examples/core/core_basic_window_web.c +13 -11
  67. package/vendor/raylib/examples/core/core_custom_frame_control.c +9 -4
  68. package/vendor/raylib/examples/core/core_custom_logging.c +12 -8
  69. package/vendor/raylib/examples/core/core_drop_files.c +20 -12
  70. package/vendor/raylib/examples/core/core_input_gamepad.c +20 -15
  71. package/vendor/raylib/examples/core/core_input_gestures.c +19 -15
  72. package/vendor/raylib/examples/core/core_input_keys.c +8 -3
  73. package/vendor/raylib/examples/core/core_input_mouse.c +8 -3
  74. package/vendor/raylib/examples/core/core_input_mouse_wheel.c +8 -3
  75. package/vendor/raylib/examples/core/core_input_multitouch.c +8 -3
  76. package/vendor/raylib/examples/core/core_loading_thread.c +10 -6
  77. package/vendor/raylib/examples/core/core_random_values.c +8 -3
  78. package/vendor/raylib/examples/core/core_scissor_test.c +8 -3
  79. package/vendor/raylib/examples/core/core_smooth_pixelperfect.c +9 -4
  80. package/vendor/raylib/examples/core/core_split_screen.c +8 -3
  81. package/vendor/raylib/examples/core/core_storage_values.c +109 -3
  82. package/vendor/raylib/examples/core/core_vr_simulator.c +15 -7
  83. package/vendor/raylib/examples/core/core_window_flags.c +8 -3
  84. package/vendor/raylib/examples/core/core_window_letterbox.c +13 -18
  85. package/vendor/raylib/examples/core/core_window_should_close.c +77 -0
  86. package/vendor/raylib/examples/core/core_window_should_close.png +0 -0
  87. package/vendor/raylib/examples/core/core_world_screen.c +9 -4
  88. package/vendor/raylib/examples/examples_template.c +8 -3
  89. package/vendor/raylib/examples/models/models_animation.c +11 -7
  90. package/vendor/raylib/examples/models/models_billboard.c +9 -4
  91. package/vendor/raylib/examples/models/models_box_collisions.c +8 -3
  92. package/vendor/raylib/examples/models/models_cubicmap.c +9 -4
  93. package/vendor/raylib/examples/models/models_first_person_maze.c +9 -4
  94. package/vendor/raylib/examples/models/models_geometric_shapes.c +8 -3
  95. package/vendor/raylib/examples/models/models_heightmap.c +9 -4
  96. package/vendor/raylib/examples/models/models_loading.c +21 -17
  97. package/vendor/raylib/examples/models/models_loading_gltf.c +15 -41
  98. package/vendor/raylib/examples/models/models_loading_vox.c +9 -4
  99. package/vendor/raylib/examples/models/models_mesh_generation.c +71 -58
  100. package/vendor/raylib/examples/models/models_mesh_picking.c +25 -7
  101. package/vendor/raylib/examples/models/models_orthographic_projection.c +8 -5
  102. package/vendor/raylib/examples/models/models_rlgl_solar_system.c +6 -4
  103. package/vendor/raylib/examples/models/models_skybox.c +16 -12
  104. package/vendor/raylib/examples/models/models_waving_cubes.c +9 -4
  105. package/vendor/raylib/examples/models/models_yaw_pitch_roll.c +12 -7
  106. package/vendor/raylib/examples/models/resources/LICENSE.md +9 -10
  107. package/vendor/raylib/examples/models/resources/models/gltf/LICENSE +2 -23
  108. package/vendor/raylib/examples/models/resources/models/gltf/{raylib_32x32.glb → raylib_logo_3d.glb} +0 -0
  109. package/vendor/raylib/examples/models/resources/models/gltf/robot.blend +0 -0
  110. package/vendor/raylib/examples/models/resources/models/gltf/robot.glb +0 -0
  111. package/vendor/raylib/examples/others/easings_testbed.c +10 -8
  112. package/vendor/raylib/examples/others/easings_testbed.png +0 -0
  113. package/vendor/raylib/examples/others/embedded_files_loading.c +10 -5
  114. package/vendor/raylib/examples/others/embedded_files_loading.png +0 -0
  115. package/vendor/raylib/examples/others/raylib_opengl_interop.c +10 -6
  116. package/vendor/raylib/{src/extras/easings.h → examples/others/reasings.h} +38 -38
  117. package/vendor/raylib/examples/others/rlgl_compute_shader.c +21 -20
  118. package/vendor/raylib/examples/others/rlgl_compute_shader.png +0 -0
  119. package/vendor/raylib/examples/others/rlgl_standalone.c +4 -4
  120. package/vendor/raylib/examples/others/rlgl_standalone.png +0 -0
  121. package/vendor/raylib/examples/raylib_compile_execute.bat +2 -2
  122. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/lighting.fs +1 -1
  123. package/vendor/raylib/examples/shaders/resources/shaders/glsl330/{base_lighting_instanced.vs → lighting_instancing.vs} +2 -2
  124. package/vendor/raylib/examples/shaders/rlights.h +14 -27
  125. package/vendor/raylib/examples/shaders/shaders_basic_lighting.c +24 -26
  126. package/vendor/raylib/examples/shaders/shaders_custom_uniform.c +10 -5
  127. package/vendor/raylib/examples/shaders/shaders_eratosthenes.c +13 -8
  128. package/vendor/raylib/examples/shaders/shaders_fog.c +8 -12
  129. package/vendor/raylib/examples/shaders/shaders_hot_reloading.c +10 -5
  130. package/vendor/raylib/examples/shaders/shaders_julia_set.c +9 -4
  131. package/vendor/raylib/examples/shaders/shaders_mesh_instancing.c +45 -119
  132. package/vendor/raylib/examples/shaders/shaders_model_shader.c +10 -5
  133. package/vendor/raylib/examples/shaders/shaders_multi_sample2d.c +8 -3
  134. package/vendor/raylib/examples/shaders/shaders_palette_switch.c +8 -3
  135. package/vendor/raylib/examples/shaders/shaders_postprocessing.c +9 -4
  136. package/vendor/raylib/examples/shaders/shaders_raymarching.c +14 -11
  137. package/vendor/raylib/examples/shaders/shaders_shapes_textures.c +8 -3
  138. package/vendor/raylib/examples/shaders/shaders_simple_mask.c +10 -5
  139. package/vendor/raylib/examples/shaders/shaders_spotlight.c +10 -6
  140. package/vendor/raylib/examples/shaders/shaders_texture_drawing.c +9 -4
  141. package/vendor/raylib/examples/shaders/shaders_texture_outline.c +8 -3
  142. package/vendor/raylib/examples/shaders/shaders_texture_waves.c +8 -3
  143. package/vendor/raylib/{src/extras → examples/shapes}/raygui.h +1290 -1141
  144. package/vendor/raylib/examples/{others/easings.h → shapes/reasings.h} +40 -40
  145. package/vendor/raylib/examples/shapes/shapes_basic_shapes.c +8 -3
  146. package/vendor/raylib/examples/shapes/shapes_bouncing_ball.c +8 -3
  147. package/vendor/raylib/examples/shapes/shapes_collision_area.c +10 -4
  148. package/vendor/raylib/examples/shapes/shapes_colors_palette.c +8 -3
  149. package/vendor/raylib/examples/shapes/shapes_draw_circle_sector.c +9 -4
  150. package/vendor/raylib/examples/shapes/shapes_draw_rectangle_rounded.c +9 -4
  151. package/vendor/raylib/examples/shapes/shapes_draw_ring.c +10 -6
  152. package/vendor/raylib/examples/shapes/shapes_easings_ball_anim.c +9 -4
  153. package/vendor/raylib/examples/shapes/shapes_easings_box_anim.c +9 -4
  154. package/vendor/raylib/examples/shapes/shapes_easings_rectangle_array.c +9 -4
  155. package/vendor/raylib/examples/shapes/shapes_following_eyes.c +8 -3
  156. package/vendor/raylib/examples/shapes/shapes_lines_bezier.c +8 -3
  157. package/vendor/raylib/examples/shapes/shapes_logo_raylib.c +8 -3
  158. package/vendor/raylib/examples/shapes/shapes_logo_raylib_anim.c +8 -3
  159. package/vendor/raylib/examples/shapes/shapes_rectangle_scaling.c +14 -5
  160. package/vendor/raylib/examples/shapes/shapes_top_down_lights.c +355 -0
  161. package/vendor/raylib/examples/shapes/shapes_top_down_lights.png +0 -0
  162. package/vendor/raylib/examples/text/resources/DotGothic16-Regular.ttf +0 -0
  163. package/vendor/raylib/examples/text/resources/DotGothic16-Regular_OFL.txt +93 -0
  164. package/vendor/raylib/examples/text/resources/LICENSE.md +1 -1
  165. package/vendor/raylib/examples/text/text_codepoints_loading.c +138 -0
  166. package/vendor/raylib/examples/text/text_codepoints_loading.png +0 -0
  167. package/vendor/raylib/examples/text/text_draw_3d.c +42 -33
  168. package/vendor/raylib/examples/text/text_font_filters.c +14 -11
  169. package/vendor/raylib/examples/text/text_font_loading.c +9 -4
  170. package/vendor/raylib/examples/text/text_font_sdf.c +9 -4
  171. package/vendor/raylib/examples/text/text_font_spritefont.c +12 -6
  172. package/vendor/raylib/examples/text/text_format_text.c +8 -3
  173. package/vendor/raylib/examples/text/text_input_box.c +8 -3
  174. package/vendor/raylib/examples/text/text_raylib_fonts.c +9 -4
  175. package/vendor/raylib/examples/text/text_rectangle_bounds.c +9 -5
  176. package/vendor/raylib/examples/text/text_unicode.c +9 -7
  177. package/vendor/raylib/examples/text/text_writing_anim.c +8 -3
  178. package/vendor/raylib/examples/textures/resources/scarfy_run.gif +0 -0
  179. package/vendor/raylib/examples/textures/textures_background_scrolling.c +8 -3
  180. package/vendor/raylib/examples/textures/textures_blend_modes.c +8 -3
  181. package/vendor/raylib/examples/textures/textures_bunnymark.c +8 -3
  182. package/vendor/raylib/examples/textures/textures_draw_tiled.c +14 -10
  183. package/vendor/raylib/examples/textures/textures_fog_of_war.c +154 -0
  184. package/vendor/raylib/examples/textures/textures_fog_of_war.png +0 -0
  185. package/vendor/raylib/examples/textures/textures_gif_player.c +121 -0
  186. package/vendor/raylib/examples/textures/textures_gif_player.png +0 -0
  187. package/vendor/raylib/examples/textures/textures_image_drawing.c +8 -3
  188. package/vendor/raylib/examples/textures/textures_image_generation.c +8 -3
  189. package/vendor/raylib/examples/textures/textures_image_loading.c +8 -3
  190. package/vendor/raylib/examples/textures/textures_image_processing.c +8 -3
  191. package/vendor/raylib/examples/textures/textures_image_text.c +8 -3
  192. package/vendor/raylib/examples/textures/textures_logo_raylib.c +8 -3
  193. package/vendor/raylib/examples/textures/textures_mouse_painting.c +9 -4
  194. package/vendor/raylib/examples/textures/textures_npatch_drawing.c +8 -3
  195. package/vendor/raylib/examples/textures/textures_particles_blending.c +8 -3
  196. package/vendor/raylib/examples/textures/textures_polygon.c +9 -5
  197. package/vendor/raylib/examples/textures/textures_raw_data.c +8 -3
  198. package/vendor/raylib/examples/textures/{textures_rectangle.c → textures_sprite_anim.c} +11 -5
  199. package/vendor/raylib/examples/textures/{textures_rectangle.png → textures_sprite_anim.png} +0 -0
  200. package/vendor/raylib/examples/textures/textures_sprite_button.c +8 -3
  201. package/vendor/raylib/examples/textures/textures_sprite_explosion.c +8 -3
  202. package/vendor/raylib/examples/textures/textures_srcrec_dstrec.c +8 -3
  203. package/vendor/raylib/examples/textures/textures_to_image.c +8 -3
  204. package/vendor/raylib/parser/LICENSE +1 -1
  205. package/vendor/raylib/parser/Makefile +28 -0
  206. package/vendor/raylib/parser/README.md +49 -5
  207. package/vendor/raylib/parser/output/raylib_api.json +10717 -0
  208. package/vendor/raylib/parser/output/raylib_api.lua +7435 -0
  209. package/vendor/raylib/parser/{raylib_api.txt → output/raylib_api.txt} +1371 -824
  210. package/vendor/raylib/parser/{raylib_api.xml → output/raylib_api.xml} +827 -595
  211. package/vendor/raylib/parser/raylib_parser.c +1174 -196
  212. package/vendor/raylib/projects/4coder/Makefile +2 -4
  213. package/vendor/raylib/projects/4coder/main.c +0 -1
  214. package/vendor/raylib/projects/CMake/CMakeLists.txt +13 -16
  215. package/vendor/raylib/projects/CMake/README.md +27 -0
  216. package/vendor/raylib/projects/CMake/core_basic_window.c +52 -31
  217. package/vendor/raylib/projects/CodeBlocks/README.md +4 -4
  218. package/vendor/raylib/projects/Geany/core_basic_window.c +1 -1
  219. package/vendor/raylib/projects/Notepad++/c_raylib.xml +168 -128
  220. package/vendor/raylib/projects/Notepad++/npes_saved_tcc.txt +0 -0
  221. package/vendor/raylib/projects/Notepad++/npes_saved_w64devkit.txt +0 -0
  222. package/vendor/raylib/projects/Notepad++/npes_saved_zig.txt +0 -0
  223. package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_npp.xml +168 -84
  224. package/vendor/raylib/projects/Notepad++/raylib_npp_parser/raylib_to_parse.h +67 -51
  225. package/vendor/raylib/projects/README.md +1 -1
  226. package/vendor/raylib/projects/VSCode/.vscode/c_cpp_properties.json +1 -1
  227. package/vendor/raylib/projects/VSCode/Makefile +8 -11
  228. package/vendor/raylib/projects/VSCode/main.c +53 -26
  229. package/vendor/raylib/projects/VSCode/resources/LICENSE +1 -0
  230. package/vendor/raylib/projects/scripts/build-linux.sh +6 -6
  231. package/vendor/raylib/projects/scripts/build-osx.sh +6 -6
  232. package/vendor/raylib/projects/scripts/build-rpi.sh +6 -6
  233. package/vendor/raylib/projects/scripts/build-windows.bat +2 -2
  234. package/vendor/raylib/src/CMakeLists.txt +6 -7
  235. package/vendor/raylib/src/Makefile +209 -103
  236. package/vendor/raylib/src/build.zig +56 -20
  237. package/vendor/raylib/src/config.h +32 -27
  238. package/vendor/raylib/src/external/cgltf.h +342 -104
  239. package/vendor/raylib/src/external/dr_wav.h +487 -225
  240. package/vendor/raylib/src/external/glfw/src/posix_time.c +1 -3
  241. package/vendor/raylib/src/external/glfw/src/wl_init.c +1 -3
  242. package/vendor/raylib/src/external/jar_xm.h +2 -1
  243. package/vendor/raylib/src/external/miniaudio.h +62251 -42061
  244. package/vendor/raylib/src/external/qoi.h +671 -0
  245. package/vendor/raylib/src/external/stb_vorbis.h +1 -1
  246. package/vendor/raylib/src/external/vox_loader.h +30 -25
  247. package/vendor/raylib/src/minshell.html +82 -0
  248. package/vendor/raylib/src/raudio.c +359 -201
  249. package/vendor/raylib/src/raylib.dll.rc +5 -5
  250. package/vendor/raylib/src/raylib.dll.rc.data +0 -0
  251. package/vendor/raylib/src/raylib.h +95 -63
  252. package/vendor/raylib/src/raylib.rc +5 -5
  253. package/vendor/raylib/src/raylib.rc.data +0 -0
  254. package/vendor/raylib/src/raymath.h +391 -133
  255. package/vendor/raylib/src/rcamera.h +32 -41
  256. package/vendor/raylib/src/rcore.c +775 -471
  257. package/vendor/raylib/src/rgestures.h +5 -5
  258. package/vendor/raylib/src/rglfw.c +3 -3
  259. package/vendor/raylib/src/rlgl.h +184 -144
  260. package/vendor/raylib/src/rmodels.c +207 -144
  261. package/vendor/raylib/src/rshapes.c +105 -47
  262. package/vendor/raylib/src/rtext.c +255 -38
  263. package/vendor/raylib/src/rtextures.c +167 -71
  264. package/vendor/raylib/src/shell.html +63 -63
  265. package/vendor/raylib/src/utils.c +49 -3
  266. package/vendor/raylib/src/utils.h +3 -3
  267. package/build/qemu/2.1.0/koffi_darwin_arm64.tar.gz +0 -0
  268. package/build/qemu/2.1.0/koffi_darwin_x64.tar.gz +0 -0
  269. package/build/qemu/2.1.0/koffi_freebsd_arm64.tar.gz +0 -0
  270. package/build/qemu/2.1.0/koffi_freebsd_ia32.tar.gz +0 -0
  271. package/build/qemu/2.1.0/koffi_freebsd_x64.tar.gz +0 -0
  272. package/build/qemu/2.1.0/koffi_linux_arm32hf.tar.gz +0 -0
  273. package/build/qemu/2.1.0/koffi_linux_arm64.tar.gz +0 -0
  274. package/build/qemu/2.1.0/koffi_linux_ia32.tar.gz +0 -0
  275. package/build/qemu/2.1.0/koffi_linux_riscv64hf64.tar.gz +0 -0
  276. package/build/qemu/2.1.0/koffi_linux_x64.tar.gz +0 -0
  277. package/build/qemu/2.1.0/koffi_openbsd_ia32.tar.gz +0 -0
  278. package/build/qemu/2.1.0/koffi_openbsd_x64.tar.gz +0 -0
  279. package/build/qemu/2.1.0/koffi_win32_arm64.tar.gz +0 -0
  280. package/build/qemu/2.1.0/koffi_win32_ia32.tar.gz +0 -0
  281. package/build/qemu/2.1.0/koffi_win32_x64.tar.gz +0 -0
  282. package/vendor/raylib/CONTRIBUTORS.md +0 -63
  283. package/vendor/raylib/SPONSORS.md +0 -68
  284. package/vendor/raylib/examples/core/core_quat_conversion.c +0 -132
  285. package/vendor/raylib/examples/core/core_quat_conversion.png +0 -0
  286. package/vendor/raylib/examples/models/resources/models/gltf/AnimatedMorphCube.glb +0 -0
  287. package/vendor/raylib/examples/models/resources/models/gltf/AnimatedTriangle.gltf +0 -118
  288. package/vendor/raylib/examples/models/resources/models/gltf/BoxAnimated.glb +0 -0
  289. package/vendor/raylib/examples/models/resources/models/gltf/girl.glb +0 -0
  290. package/vendor/raylib/examples/models/resources/models/gltf/rigged_figure.glb +0 -0
  291. package/vendor/raylib/examples/models/resources/models/gltf/vertex_colored_object.glb +0 -0
  292. package/vendor/raylib/examples/models/resources/models/iqm/vertex_colored_object.iqm +0 -0
  293. package/vendor/raylib/examples/models/rlights.h +0 -183
  294. package/vendor/raylib/examples/others/raudio_standalone.c +0 -152
  295. package/vendor/raylib/examples/others/resources/audio/country.mp3 +0 -0
  296. package/vendor/raylib/examples/others/resources/audio/target.ogg +0 -0
  297. package/vendor/raylib/examples/others/resources/audio/weird.wav +0 -0
  298. package/vendor/raylib/examples/physics/physics_demo.c +0 -128
  299. package/vendor/raylib/examples/physics/physics_demo.png +0 -0
  300. package/vendor/raylib/examples/physics/physics_friction.c +0 -142
  301. package/vendor/raylib/examples/physics/physics_friction.png +0 -0
  302. package/vendor/raylib/examples/physics/physics_movement.c +0 -128
  303. package/vendor/raylib/examples/physics/physics_movement.png +0 -0
  304. package/vendor/raylib/examples/physics/physics_restitution.c +0 -129
  305. package/vendor/raylib/examples/physics/physics_restitution.png +0 -0
  306. package/vendor/raylib/examples/physics/physics_shatter.c +0 -111
  307. package/vendor/raylib/examples/physics/physics_shatter.png +0 -0
  308. package/vendor/raylib/parser/raylib_api.json +0 -6668
  309. package/vendor/raylib/projects/VS2019/raylib/raylib.rc +0 -0
  310. package/vendor/raylib/projects/VS2019/raylib/resource.h +0 -14
  311. package/vendor/raylib/src/extras/physac.h +0 -1977
  312. package/vendor/raylib/src/extras/rmem.h +0 -751
  313. package/vendor/raylib/src/raudio.h +0 -198
@@ -1,6 +1,6 @@
1
1
  /*******************************************************************************************
2
2
  *
3
- * raygui v3.0 - A simple and easy-to-use immediate-mode gui library
3
+ * raygui v3.2 - A simple and easy-to-use immediate-mode gui library
4
4
  *
5
5
  * DESCRIPTION:
6
6
  *
@@ -10,10 +10,11 @@
10
10
  * Controls provided:
11
11
  *
12
12
  * # Container/separators Controls
13
- * - WindowBox
14
- * - GroupBox
13
+ * - WindowBox --> StatusBar, Panel
14
+ * - GroupBox --> Line
15
15
  * - Line
16
- * - Panel
16
+ * - Panel --> StatusBar
17
+ * - ScrollPanel --> StatusBar
17
18
  *
18
19
  * # Basic Controls
19
20
  * - Label
@@ -32,8 +33,6 @@
32
33
  * - SliderBar --> Slider
33
34
  * - ProgressBar
34
35
  * - StatusBar
35
- * - ScrollBar
36
- * - ScrollPanel
37
36
  * - DummyRec
38
37
  * - Grid
39
38
  *
@@ -46,7 +45,7 @@
46
45
  * It also provides a set of functions for styling the controls based on its properties (size, color).
47
46
  *
48
47
  *
49
- * GUI STYLE (guiStyle):
48
+ * RAYGUI STYLE (guiStyle):
50
49
  *
51
50
  * raygui uses a global data array for all gui style properties (allocated on data segment by default),
52
51
  * when a new style is loaded, it is loaded over the global style... but a default gui style could always be
@@ -71,11 +70,11 @@
71
70
  * TOOL: rGuiStyler is a visual tool to customize raygui style.
72
71
  *
73
72
  *
74
- * GUI ICONS (guiIcons):
73
+ * RAYGUI ICONS (guiIcons):
75
74
  *
76
75
  * raygui could use a global array containing icons data (allocated on data segment by default),
77
76
  * a custom icons set could be loaded over this array using GuiLoadIcons(), but loaded icons set
78
- * must be same RICON_SIZE and no more than RICON_MAX_ICONS will be loaded
77
+ * must be same RAYGUI_ICON_SIZE and no more than RAYGUI_ICON_MAX_ICONS will be loaded
79
78
  *
80
79
  * Every icon is codified in binary form, using 1 bit per pixel, so, every 16x16 icon
81
80
  * requires 8 integers (16*16/32) to be stored in memory.
@@ -84,7 +83,7 @@
84
83
  *
85
84
  * The global icons array size is fixed and depends on the number of icons and size:
86
85
  *
87
- * static unsigned int guiIcons[RICON_MAX_ICONS*RICON_DATA_ELEMENTS];
86
+ * static unsigned int guiIcons[RAYGUI_ICON_MAX_ICONS*RAYGUI_ICON_DATA_ELEMENTS];
88
87
  *
89
88
  * guiIcons size is by default: 256*(16*16/32) = 2048*4 = 8192 bytes = 8 KB
90
89
  *
@@ -103,17 +102,32 @@
103
102
  * internally in the library and input management and drawing functions must be provided by
104
103
  * the user (check library implementation for further details).
105
104
  *
106
- * #define RAYGUI_NO_RICONS
105
+ * #define RAYGUI_NO_ICONS
107
106
  * Avoid including embedded ricons data (256 icons, 16x16 pixels, 1-bit per pixel, 2KB)
108
107
  *
109
- * #define RAYGUI_CUSTOM_RICONS
108
+ * #define RAYGUI_CUSTOM_ICONS
110
109
  * Includes custom ricons.h header defining a set of custom icons,
111
110
  * this file can be generated using rGuiIcons tool
112
111
  *
113
112
  *
114
113
  * VERSIONS HISTORY:
115
- *
116
- * 3.0 (xx-Sep-2021) Integrated ricons data to avoid external file
114
+ * 3.2 (22-May-2022) RENAMED: Some enum values, for unification, avoiding prefixes
115
+ * REMOVED: GuiScrollBar(), only internal
116
+ * REDESIGNED: GuiPanel() to support text parameter
117
+ * REDESIGNED: GuiScrollPanel() to support text parameter
118
+ * REDESIGNED: GuiColorPicker() to support text parameter
119
+ * REDESIGNED: GuiColorPanel() to support text parameter
120
+ * REDESIGNED: GuiColorBarAlpha() to support text parameter
121
+ * REDESIGNED: GuiColorBarHue() to support text parameter
122
+ * REDESIGNED: GuiTextInputBox() to support password
123
+ * 3.1 (12-Jan-2022) REVIEWED: Default style for consistency (aligned with rGuiLayout v2.5 tool)
124
+ * REVIEWED: GuiLoadStyle() to support compressed font atlas image data and unload previous textures
125
+ * REVIEWED: External icons usage logic
126
+ * REVIEWED: GuiLine() for centered alignment when including text
127
+ * RENAMED: Multiple controls properties definitions to prepend RAYGUI_
128
+ * RENAMED: RICON_ references to RAYGUI_ICON_ for library consistency
129
+ * Projects updated and multiple tweaks
130
+ * 3.0 (04-Nov-2021) Integrated ricons data to avoid external file
117
131
  * REDESIGNED: GuiTextBoxMulti()
118
132
  * REMOVED: GuiImageButton*()
119
133
  * Multiple minor tweaks and bugs corrected
@@ -160,7 +174,7 @@
160
174
  *
161
175
  * LICENSE: zlib/libpng
162
176
  *
163
- * Copyright (c) 2014-2021 Ramon Santamaria (@raysan5)
177
+ * Copyright (c) 2014-2022 Ramon Santamaria (@raysan5)
164
178
  *
165
179
  * This software is provided "as-is", without any express or implied warranty. In no event
166
180
  * will the authors be held liable for any damages arising from the use of this software.
@@ -182,7 +196,7 @@
182
196
  #ifndef RAYGUI_H
183
197
  #define RAYGUI_H
184
198
 
185
- #define RAYGUI_VERSION "3.0"
199
+ #define RAYGUI_VERSION "3.2"
186
200
 
187
201
  #if !defined(RAYGUI_STANDALONE)
188
202
  #include "raylib.h"
@@ -206,7 +220,6 @@
206
220
  //----------------------------------------------------------------------------------
207
221
  // Defines and Macros
208
222
  //----------------------------------------------------------------------------------
209
-
210
223
  // Allow custom memory allocators
211
224
  #ifndef RAYGUI_MALLOC
212
225
  #define RAYGUI_MALLOC(sz) malloc(sz)
@@ -218,8 +231,14 @@
218
231
  #define RAYGUI_FREE(p) free(p)
219
232
  #endif
220
233
 
221
- // TODO: Implement custom TraceLog()
222
- #define TRACELOG(level, ...) (void)0
234
+ // Simple log system to avoid printf() calls if required
235
+ // NOTE: Avoiding those calls, also avoids const strings memory usage
236
+ #define RAYGUI_SUPPORT_LOG_INFO
237
+ #if defined(RAYGUI_SUPPORT_LOG_INFO)
238
+ #define RAYGUI_LOG(...) printf(__VA_ARGS__)
239
+ #else
240
+ #define RAYGUI_LOG(...)
241
+ #endif
223
242
 
224
243
  //----------------------------------------------------------------------------------
225
244
  // Types and Structures Definition
@@ -296,27 +315,29 @@
296
315
  typedef struct GuiStyleProp {
297
316
  unsigned short controlId;
298
317
  unsigned short propertyId;
299
- int propertyValue;
318
+ unsigned int propertyValue;
300
319
  } GuiStyleProp;
301
320
 
302
321
  // Gui control state
303
322
  typedef enum {
304
- GUI_STATE_NORMAL = 0,
305
- GUI_STATE_FOCUSED,
306
- GUI_STATE_PRESSED,
307
- GUI_STATE_DISABLED,
308
- } GuiControlState;
323
+ STATE_NORMAL = 0,
324
+ STATE_FOCUSED,
325
+ STATE_PRESSED,
326
+ STATE_DISABLED,
327
+ } GuiState;
309
328
 
310
329
  // Gui control text alignment
311
330
  typedef enum {
312
- GUI_TEXT_ALIGN_LEFT = 0,
313
- GUI_TEXT_ALIGN_CENTER,
314
- GUI_TEXT_ALIGN_RIGHT,
331
+ TEXT_ALIGN_LEFT = 0,
332
+ TEXT_ALIGN_CENTER,
333
+ TEXT_ALIGN_RIGHT,
315
334
  } GuiTextAlignment;
316
335
 
317
336
  // Gui controls
318
337
  typedef enum {
319
- DEFAULT = 0, // Generic control -> populates to all controls when set
338
+ // Default -> populates to all controls when set
339
+ DEFAULT = 0,
340
+ // Basic controls
320
341
  LABEL, // Used also for: LABELBUTTON
321
342
  BUTTON,
322
343
  TOGGLE, // Used also for: TOGGLEGROUP
@@ -327,7 +348,7 @@ typedef enum {
327
348
  DROPDOWNBOX,
328
349
  TEXTBOX, // Used also for: TEXTBOXMULTI
329
350
  VALUEBOX,
330
- SPINNER,
351
+ SPINNER, // Uses: BUTTON, VALUEBOX
331
352
  LISTVIEW,
332
353
  COLORPICKER,
333
354
  SCROLLBAR,
@@ -357,102 +378,98 @@ typedef enum {
357
378
 
358
379
  // Gui extended properties depend on control
359
380
  // NOTE: RAYGUI_MAX_PROPS_EXTENDED properties (by default 8 properties)
381
+ //----------------------------------------------------------------------------------
360
382
 
361
383
  // DEFAULT extended properties
362
- // NOTE: Those properties are actually common to all controls
384
+ // NOTE: Those properties are common to all controls or global
363
385
  typedef enum {
364
- TEXT_SIZE = 16,
365
- TEXT_SPACING,
366
- LINE_COLOR,
367
- BACKGROUND_COLOR,
386
+ TEXT_SIZE = 16, // Text size (glyphs max height)
387
+ TEXT_SPACING, // Text spacing between glyphs
388
+ LINE_COLOR, // Line control color
389
+ BACKGROUND_COLOR, // Background color
368
390
  } GuiDefaultProperty;
369
391
 
370
392
  // Label
371
393
  //typedef enum { } GuiLabelProperty;
372
394
 
373
- // Button
395
+ // Button/Spinner
374
396
  //typedef enum { } GuiButtonProperty;
375
397
 
376
398
  // Toggle/ToggleGroup
377
399
  typedef enum {
378
- GROUP_PADDING = 16,
400
+ GROUP_PADDING = 16, // ToggleGroup separation between toggles
379
401
  } GuiToggleProperty;
380
402
 
381
403
  // Slider/SliderBar
382
404
  typedef enum {
383
- SLIDER_WIDTH = 16,
384
- SLIDER_PADDING
405
+ SLIDER_WIDTH = 16, // Slider size of internal bar
406
+ SLIDER_PADDING // Slider/SliderBar internal bar padding
385
407
  } GuiSliderProperty;
386
408
 
387
409
  // ProgressBar
388
410
  typedef enum {
389
- PROGRESS_PADDING = 16,
411
+ PROGRESS_PADDING = 16, // ProgressBar internal padding
390
412
  } GuiProgressBarProperty;
391
413
 
414
+ // ScrollBar
415
+ typedef enum {
416
+ ARROWS_SIZE = 16,
417
+ ARROWS_VISIBLE,
418
+ SCROLL_SLIDER_PADDING, // (SLIDERBAR, SLIDER_PADDING)
419
+ SCROLL_SLIDER_SIZE,
420
+ SCROLL_PADDING,
421
+ SCROLL_SPEED,
422
+ } GuiScrollBarProperty;
423
+
392
424
  // CheckBox
393
425
  typedef enum {
394
- CHECK_PADDING = 16
426
+ CHECK_PADDING = 16 // CheckBox internal check padding
395
427
  } GuiCheckBoxProperty;
396
428
 
397
429
  // ComboBox
398
430
  typedef enum {
399
- COMBO_BUTTON_WIDTH = 16,
400
- COMBO_BUTTON_PADDING
431
+ COMBO_BUTTON_WIDTH = 16, // ComboBox right button width
432
+ COMBO_BUTTON_SPACING // ComboBox button separation
401
433
  } GuiComboBoxProperty;
402
434
 
403
435
  // DropdownBox
404
436
  typedef enum {
405
- ARROW_PADDING = 16,
406
- DROPDOWN_ITEMS_PADDING
437
+ ARROW_PADDING = 16, // DropdownBox arrow separation from border and items
438
+ DROPDOWN_ITEMS_SPACING // DropdownBox items separation
407
439
  } GuiDropdownBoxProperty;
408
440
 
409
441
  // TextBox/TextBoxMulti/ValueBox/Spinner
410
442
  typedef enum {
411
- TEXT_INNER_PADDING = 16,
412
- TEXT_LINES_PADDING,
413
- COLOR_SELECTED_FG,
414
- COLOR_SELECTED_BG
443
+ TEXT_INNER_PADDING = 16, // TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
444
+ TEXT_LINES_SPACING, // TextBoxMulti lines separation
415
445
  } GuiTextBoxProperty;
416
446
 
417
447
  // Spinner
418
448
  typedef enum {
419
- SPIN_BUTTON_WIDTH = 16,
420
- SPIN_BUTTON_PADDING,
449
+ SPIN_BUTTON_WIDTH = 16, // Spinner left/right buttons width
450
+ SPIN_BUTTON_SPACING, // Spinner buttons separation
421
451
  } GuiSpinnerProperty;
422
452
 
423
- // ScrollBar
424
- typedef enum {
425
- ARROWS_SIZE = 16,
426
- ARROWS_VISIBLE,
427
- SCROLL_SLIDER_PADDING,
428
- SCROLL_SLIDER_SIZE,
429
- SCROLL_PADDING,
430
- SCROLL_SPEED,
431
- } GuiScrollBarProperty;
432
-
433
- // ScrollBar side
434
- typedef enum {
435
- SCROLLBAR_LEFT_SIDE = 0,
436
- SCROLLBAR_RIGHT_SIDE
437
- } GuiScrollBarSide;
438
-
439
453
  // ListView
440
454
  typedef enum {
441
- LIST_ITEMS_HEIGHT = 16,
442
- LIST_ITEMS_PADDING,
443
- SCROLLBAR_WIDTH,
444
- SCROLLBAR_SIDE,
455
+ LIST_ITEMS_HEIGHT = 16, // ListView items height
456
+ LIST_ITEMS_SPACING, // ListView items separation
457
+ SCROLLBAR_WIDTH, // ListView scrollbar size (usually width)
458
+ SCROLLBAR_SIDE, // ListView scrollbar side (0-left, 1-right)
445
459
  } GuiListViewProperty;
446
460
 
447
461
  // ColorPicker
448
462
  typedef enum {
449
463
  COLOR_SELECTOR_SIZE = 16,
450
- HUEBAR_WIDTH, // Right hue bar width
451
- HUEBAR_PADDING, // Right hue bar separation from panel
452
- HUEBAR_SELECTOR_HEIGHT, // Right hue bar selector height
453
- HUEBAR_SELECTOR_OVERFLOW // Right hue bar selector overflow
464
+ HUEBAR_WIDTH, // ColorPicker right hue bar width
465
+ HUEBAR_PADDING, // ColorPicker right hue bar separation from panel
466
+ HUEBAR_SELECTOR_HEIGHT, // ColorPicker right hue bar selector height
467
+ HUEBAR_SELECTOR_OVERFLOW // ColorPicker right hue bar selector overflow
454
468
  } GuiColorPickerProperty;
455
469
 
470
+ #define SCROLLBAR_LEFT_SIDE 0
471
+ #define SCROLLBAR_RIGHT_SIDE 1
472
+
456
473
  //----------------------------------------------------------------------------------
457
474
  // Global Variables Definition
458
475
  //----------------------------------------------------------------------------------
@@ -488,8 +505,8 @@ RAYGUIAPI int GuiGetStyle(int control, int property); // Get o
488
505
  RAYGUIAPI bool GuiWindowBox(Rectangle bounds, const char *title); // Window Box control, shows a window that can be closed
489
506
  RAYGUIAPI void GuiGroupBox(Rectangle bounds, const char *text); // Group Box control with text name
490
507
  RAYGUIAPI void GuiLine(Rectangle bounds, const char *text); // Line separator control, could contain text
491
- RAYGUIAPI void GuiPanel(Rectangle bounds); // Panel control, useful to group controls
492
- RAYGUIAPI Rectangle GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 *scroll); // Scroll Panel control
508
+ RAYGUIAPI void GuiPanel(Rectangle bounds, const char *text); // Panel control, useful to group controls
509
+ RAYGUIAPI Rectangle GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll); // Scroll Panel control
493
510
 
494
511
  // Basic controls set
495
512
  RAYGUIAPI void GuiLabel(Rectangle bounds, const char *text); // Label control, shows text
@@ -509,43 +526,301 @@ RAYGUIAPI float GuiSliderBar(Rectangle bounds, const char *textLeft, const char
509
526
  RAYGUIAPI float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue); // Progress Bar control, shows current progress value
510
527
  RAYGUIAPI void GuiStatusBar(Rectangle bounds, const char *text); // Status Bar control, shows info text
511
528
  RAYGUIAPI void GuiDummyRec(Rectangle bounds, const char *text); // Dummy control for placeholders
512
- RAYGUIAPI int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue); // Scroll Bar control
513
- RAYGUIAPI Vector2 GuiGrid(Rectangle bounds, float spacing, int subdivs); // Grid control
514
-
529
+ RAYGUIAPI Vector2 GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs); // Grid control, returns mouse cell position
515
530
 
516
531
  // Advance controls set
517
532
  RAYGUIAPI int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int active); // List View control, returns selected list item index
518
533
  RAYGUIAPI int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, int *scrollIndex, int active); // List View with extended parameters
519
534
  RAYGUIAPI int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons); // Message Box control, displays a message
520
- RAYGUIAPI int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text); // Text Input Box control, ask for text
521
- RAYGUIAPI Color GuiColorPicker(Rectangle bounds, Color color); // Color Picker control (multiple color controls)
522
- RAYGUIAPI Color GuiColorPanel(Rectangle bounds, Color color); // Color Panel control
523
- RAYGUIAPI float GuiColorBarAlpha(Rectangle bounds, float alpha); // Color Bar Alpha control
524
- RAYGUIAPI float GuiColorBarHue(Rectangle bounds, float value); // Color Bar Hue control
535
+ RAYGUIAPI int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, int *secretViewActive); // Text Input Box control, ask for text, supports secret
536
+ RAYGUIAPI Color GuiColorPicker(Rectangle bounds, const char *text, Color color); // Color Picker control (multiple color controls)
537
+ RAYGUIAPI Color GuiColorPanel(Rectangle bounds, const char *text, Color color); // Color Panel control
538
+ RAYGUIAPI float GuiColorBarAlpha(Rectangle bounds, const char *text, float alpha); // Color Bar Alpha control
539
+ RAYGUIAPI float GuiColorBarHue(Rectangle bounds, const char *text, float value); // Color Bar Hue control
525
540
 
526
541
  // Styles loading functions
527
542
  RAYGUIAPI void GuiLoadStyle(const char *fileName); // Load style file over global style variable (.rgs)
528
543
  RAYGUIAPI void GuiLoadStyleDefault(void); // Load style default over global style
529
544
 
530
- /*
531
- typedef GuiStyle (unsigned int *)
532
- RAYGUIAPI GuiStyle LoadGuiStyle(const char *fileName); // Load style from file (.rgs)
533
- RAYGUIAPI void UnloadGuiStyle(GuiStyle style); // Unload style
534
- */
535
-
545
+ // Icons functionality
536
546
  RAYGUIAPI const char *GuiIconText(int iconId, const char *text); // Get text with icon id prepended (if supported)
537
547
 
538
- #if !defined(RAYGUI_NO_RICONS)
539
- // Gui icons functionality
548
+ #if !defined(RAYGUI_NO_ICONS)
540
549
  RAYGUIAPI void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color);
541
550
 
542
551
  RAYGUIAPI unsigned int *GuiGetIcons(void); // Get full icons data pointer
543
552
  RAYGUIAPI unsigned int *GuiGetIconData(int iconId); // Get icon bit data
544
553
  RAYGUIAPI void GuiSetIconData(int iconId, unsigned int *data); // Set icon bit data
554
+ RAYGUIAPI void GuiSetIconScale(unsigned int scale); // Set icon scale (1 by default)
545
555
 
546
556
  RAYGUIAPI void GuiSetIconPixel(int iconId, int x, int y); // Set icon pixel value
547
557
  RAYGUIAPI void GuiClearIconPixel(int iconId, int x, int y); // Clear icon pixel value
548
558
  RAYGUIAPI bool GuiCheckIconPixel(int iconId, int x, int y); // Check icon pixel value
559
+
560
+ #if !defined(RAYGUI_CUSTOM_ICONS)
561
+ //----------------------------------------------------------------------------------
562
+ // Icons enumeration
563
+ //----------------------------------------------------------------------------------
564
+ typedef enum {
565
+ ICON_NONE = 0,
566
+ ICON_FOLDER_FILE_OPEN = 1,
567
+ ICON_FILE_SAVE_CLASSIC = 2,
568
+ ICON_FOLDER_OPEN = 3,
569
+ ICON_FOLDER_SAVE = 4,
570
+ ICON_FILE_OPEN = 5,
571
+ ICON_FILE_SAVE = 6,
572
+ ICON_FILE_EXPORT = 7,
573
+ ICON_FILE_ADD = 8,
574
+ ICON_FILE_DELETE = 9,
575
+ ICON_FILETYPE_TEXT = 10,
576
+ ICON_FILETYPE_AUDIO = 11,
577
+ ICON_FILETYPE_IMAGE = 12,
578
+ ICON_FILETYPE_PLAY = 13,
579
+ ICON_FILETYPE_VIDEO = 14,
580
+ ICON_FILETYPE_INFO = 15,
581
+ ICON_FILE_COPY = 16,
582
+ ICON_FILE_CUT = 17,
583
+ ICON_FILE_PASTE = 18,
584
+ ICON_CURSOR_HAND = 19,
585
+ ICON_CURSOR_POINTER = 20,
586
+ ICON_CURSOR_CLASSIC = 21,
587
+ ICON_PENCIL = 22,
588
+ ICON_PENCIL_BIG = 23,
589
+ ICON_BRUSH_CLASSIC = 24,
590
+ ICON_BRUSH_PAINTER = 25,
591
+ ICON_WATER_DROP = 26,
592
+ ICON_COLOR_PICKER = 27,
593
+ ICON_RUBBER = 28,
594
+ ICON_COLOR_BUCKET = 29,
595
+ ICON_TEXT_T = 30,
596
+ ICON_TEXT_A = 31,
597
+ ICON_SCALE = 32,
598
+ ICON_RESIZE = 33,
599
+ ICON_FILTER_POINT = 34,
600
+ ICON_FILTER_BILINEAR = 35,
601
+ ICON_CROP = 36,
602
+ ICON_CROP_ALPHA = 37,
603
+ ICON_SQUARE_TOGGLE = 38,
604
+ ICON_SYMMETRY = 39,
605
+ ICON_SYMMETRY_HORIZONTAL = 40,
606
+ ICON_SYMMETRY_VERTICAL = 41,
607
+ ICON_LENS = 42,
608
+ ICON_LENS_BIG = 43,
609
+ ICON_EYE_ON = 44,
610
+ ICON_EYE_OFF = 45,
611
+ ICON_FILTER_TOP = 46,
612
+ ICON_FILTER = 47,
613
+ ICON_TARGET_POINT = 48,
614
+ ICON_TARGET_SMALL = 49,
615
+ ICON_TARGET_BIG = 50,
616
+ ICON_TARGET_MOVE = 51,
617
+ ICON_CURSOR_MOVE = 52,
618
+ ICON_CURSOR_SCALE = 53,
619
+ ICON_CURSOR_SCALE_RIGHT = 54,
620
+ ICON_CURSOR_SCALE_LEFT = 55,
621
+ ICON_UNDO = 56,
622
+ ICON_REDO = 57,
623
+ ICON_REREDO = 58,
624
+ ICON_MUTATE = 59,
625
+ ICON_ROTATE = 60,
626
+ ICON_REPEAT = 61,
627
+ ICON_SHUFFLE = 62,
628
+ ICON_EMPTYBOX = 63,
629
+ ICON_TARGET = 64,
630
+ ICON_TARGET_SMALL_FILL = 65,
631
+ ICON_TARGET_BIG_FILL = 66,
632
+ ICON_TARGET_MOVE_FILL = 67,
633
+ ICON_CURSOR_MOVE_FILL = 68,
634
+ ICON_CURSOR_SCALE_FILL = 69,
635
+ ICON_CURSOR_SCALE_RIGHT_FILL = 70,
636
+ ICON_CURSOR_SCALE_LEFT_FILL = 71,
637
+ ICON_UNDO_FILL = 72,
638
+ ICON_REDO_FILL = 73,
639
+ ICON_REREDO_FILL = 74,
640
+ ICON_MUTATE_FILL = 75,
641
+ ICON_ROTATE_FILL = 76,
642
+ ICON_REPEAT_FILL = 77,
643
+ ICON_SHUFFLE_FILL = 78,
644
+ ICON_EMPTYBOX_SMALL = 79,
645
+ ICON_BOX = 80,
646
+ ICON_BOX_TOP = 81,
647
+ ICON_BOX_TOP_RIGHT = 82,
648
+ ICON_BOX_RIGHT = 83,
649
+ ICON_BOX_BOTTOM_RIGHT = 84,
650
+ ICON_BOX_BOTTOM = 85,
651
+ ICON_BOX_BOTTOM_LEFT = 86,
652
+ ICON_BOX_LEFT = 87,
653
+ ICON_BOX_TOP_LEFT = 88,
654
+ ICON_BOX_CENTER = 89,
655
+ ICON_BOX_CIRCLE_MASK = 90,
656
+ ICON_POT = 91,
657
+ ICON_ALPHA_MULTIPLY = 92,
658
+ ICON_ALPHA_CLEAR = 93,
659
+ ICON_DITHERING = 94,
660
+ ICON_MIPMAPS = 95,
661
+ ICON_BOX_GRID = 96,
662
+ ICON_GRID = 97,
663
+ ICON_BOX_CORNERS_SMALL = 98,
664
+ ICON_BOX_CORNERS_BIG = 99,
665
+ ICON_FOUR_BOXES = 100,
666
+ ICON_GRID_FILL = 101,
667
+ ICON_BOX_MULTISIZE = 102,
668
+ ICON_ZOOM_SMALL = 103,
669
+ ICON_ZOOM_MEDIUM = 104,
670
+ ICON_ZOOM_BIG = 105,
671
+ ICON_ZOOM_ALL = 106,
672
+ ICON_ZOOM_CENTER = 107,
673
+ ICON_BOX_DOTS_SMALL = 108,
674
+ ICON_BOX_DOTS_BIG = 109,
675
+ ICON_BOX_CONCENTRIC = 110,
676
+ ICON_BOX_GRID_BIG = 111,
677
+ ICON_OK_TICK = 112,
678
+ ICON_CROSS = 113,
679
+ ICON_ARROW_LEFT = 114,
680
+ ICON_ARROW_RIGHT = 115,
681
+ ICON_ARROW_DOWN = 116,
682
+ ICON_ARROW_UP = 117,
683
+ ICON_ARROW_LEFT_FILL = 118,
684
+ ICON_ARROW_RIGHT_FILL = 119,
685
+ ICON_ARROW_DOWN_FILL = 120,
686
+ ICON_ARROW_UP_FILL = 121,
687
+ ICON_AUDIO = 122,
688
+ ICON_FX = 123,
689
+ ICON_WAVE = 124,
690
+ ICON_WAVE_SINUS = 125,
691
+ ICON_WAVE_SQUARE = 126,
692
+ ICON_WAVE_TRIANGULAR = 127,
693
+ ICON_CROSS_SMALL = 128,
694
+ ICON_PLAYER_PREVIOUS = 129,
695
+ ICON_PLAYER_PLAY_BACK = 130,
696
+ ICON_PLAYER_PLAY = 131,
697
+ ICON_PLAYER_PAUSE = 132,
698
+ ICON_PLAYER_STOP = 133,
699
+ ICON_PLAYER_NEXT = 134,
700
+ ICON_PLAYER_RECORD = 135,
701
+ ICON_MAGNET = 136,
702
+ ICON_LOCK_CLOSE = 137,
703
+ ICON_LOCK_OPEN = 138,
704
+ ICON_CLOCK = 139,
705
+ ICON_TOOLS = 140,
706
+ ICON_GEAR = 141,
707
+ ICON_GEAR_BIG = 142,
708
+ ICON_BIN = 143,
709
+ ICON_HAND_POINTER = 144,
710
+ ICON_LASER = 145,
711
+ ICON_COIN = 146,
712
+ ICON_EXPLOSION = 147,
713
+ ICON_1UP = 148,
714
+ ICON_PLAYER = 149,
715
+ ICON_PLAYER_JUMP = 150,
716
+ ICON_KEY = 151,
717
+ ICON_DEMON = 152,
718
+ ICON_TEXT_POPUP = 153,
719
+ ICON_GEAR_EX = 154,
720
+ ICON_CRACK = 155,
721
+ ICON_CRACK_POINTS = 156,
722
+ ICON_STAR = 157,
723
+ ICON_DOOR = 158,
724
+ ICON_EXIT = 159,
725
+ ICON_MODE_2D = 160,
726
+ ICON_MODE_3D = 161,
727
+ ICON_CUBE = 162,
728
+ ICON_CUBE_FACE_TOP = 163,
729
+ ICON_CUBE_FACE_LEFT = 164,
730
+ ICON_CUBE_FACE_FRONT = 165,
731
+ ICON_CUBE_FACE_BOTTOM = 166,
732
+ ICON_CUBE_FACE_RIGHT = 167,
733
+ ICON_CUBE_FACE_BACK = 168,
734
+ ICON_CAMERA = 169,
735
+ ICON_SPECIAL = 170,
736
+ ICON_LINK_NET = 171,
737
+ ICON_LINK_BOXES = 172,
738
+ ICON_LINK_MULTI = 173,
739
+ ICON_LINK = 174,
740
+ ICON_LINK_BROKE = 175,
741
+ ICON_TEXT_NOTES = 176,
742
+ ICON_NOTEBOOK = 177,
743
+ ICON_SUITCASE = 178,
744
+ ICON_SUITCASE_ZIP = 179,
745
+ ICON_MAILBOX = 180,
746
+ ICON_MONITOR = 181,
747
+ ICON_PRINTER = 182,
748
+ ICON_PHOTO_CAMERA = 183,
749
+ ICON_PHOTO_CAMERA_FLASH = 184,
750
+ ICON_HOUSE = 185,
751
+ ICON_HEART = 186,
752
+ ICON_CORNER = 187,
753
+ ICON_VERTICAL_BARS = 188,
754
+ ICON_VERTICAL_BARS_FILL = 189,
755
+ ICON_LIFE_BARS = 190,
756
+ ICON_INFO = 191,
757
+ ICON_CROSSLINE = 192,
758
+ ICON_HELP = 193,
759
+ ICON_FILETYPE_ALPHA = 194,
760
+ ICON_FILETYPE_HOME = 195,
761
+ ICON_LAYERS_VISIBLE = 196,
762
+ ICON_LAYERS = 197,
763
+ ICON_WINDOW = 198,
764
+ ICON_HIDPI = 199,
765
+ ICON_FILETYPE_BINARY = 200,
766
+ ICON_HEX = 201,
767
+ ICON_SHIELD = 202,
768
+ ICON_FILE_NEW = 203,
769
+ ICON_FOLDER_ADD = 204,
770
+ ICON_ALARM = 205,
771
+ ICON_206 = 206,
772
+ ICON_207 = 207,
773
+ ICON_208 = 208,
774
+ ICON_209 = 209,
775
+ ICON_210 = 210,
776
+ ICON_211 = 211,
777
+ ICON_212 = 212,
778
+ ICON_213 = 213,
779
+ ICON_214 = 214,
780
+ ICON_215 = 215,
781
+ ICON_216 = 216,
782
+ ICON_217 = 217,
783
+ ICON_218 = 218,
784
+ ICON_219 = 219,
785
+ ICON_220 = 220,
786
+ ICON_221 = 221,
787
+ ICON_222 = 222,
788
+ ICON_223 = 223,
789
+ ICON_224 = 224,
790
+ ICON_225 = 225,
791
+ ICON_226 = 226,
792
+ ICON_227 = 227,
793
+ ICON_228 = 228,
794
+ ICON_229 = 229,
795
+ ICON_230 = 230,
796
+ ICON_231 = 231,
797
+ ICON_232 = 232,
798
+ ICON_233 = 233,
799
+ ICON_234 = 234,
800
+ ICON_235 = 235,
801
+ ICON_236 = 236,
802
+ ICON_237 = 237,
803
+ ICON_238 = 238,
804
+ ICON_239 = 239,
805
+ ICON_240 = 240,
806
+ ICON_241 = 241,
807
+ ICON_242 = 242,
808
+ ICON_243 = 243,
809
+ ICON_244 = 244,
810
+ ICON_245 = 245,
811
+ ICON_246 = 246,
812
+ ICON_247 = 247,
813
+ ICON_248 = 248,
814
+ ICON_249 = 249,
815
+ ICON_250 = 250,
816
+ ICON_251 = 251,
817
+ ICON_252 = 252,
818
+ ICON_253 = 253,
819
+ ICON_254 = 254,
820
+ ICON_255 = 255,
821
+ } GuiIconName;
822
+ #endif
823
+
549
824
  #endif
550
825
 
551
826
  #if defined(__cplusplus)
@@ -574,286 +849,19 @@ RAYGUIAPI bool GuiCheckIconPixel(int iconId, int x, int y); // Check icon pi
574
849
  #define RAYGUI_CLITERAL(name) (name)
575
850
  #endif
576
851
 
577
- #if !defined(RAYGUI_NO_RICONS)
578
-
579
- #if defined(RAYGUI_CUSTOM_RICONS)
580
-
581
- #define RICONS_IMPLEMENTATION
582
- #include "ricons.h" // External icons data provided, it can be generated with rGuiIcons tool
852
+ #if !defined(RAYGUI_NO_ICONS) && !defined(RAYGUI_CUSTOM_ICONS)
583
853
 
584
- #else // Embedded raygui icons, no external file provided
585
-
586
- #define RICON_SIZE 16 // Size of icons (squared)
587
- #define RICON_MAX_ICONS 256 // Maximum number of icons
588
- #define RICON_MAX_NAME_LENGTH 32 // Maximum length of icon name id
854
+ // Embedded icons, no external file provided
855
+ #define RAYGUI_ICON_SIZE 16 // Size of icons in pixels (squared)
856
+ #define RAYGUI_ICON_MAX_ICONS 256 // Maximum number of icons
857
+ #define RAYGUI_ICON_MAX_NAME_LENGTH 32 // Maximum length of icon name id
589
858
 
590
859
  // Icons data is defined by bit array (every bit represents one pixel)
591
- // Those arrays are stored as unsigned int data arrays, so every array
592
- // element defines 32 pixels (bits) of information
593
- // Number of elemens depend on RICON_SIZE (by default 16x16 pixels)
594
- #define RICON_DATA_ELEMENTS (RICON_SIZE*RICON_SIZE/32)
595
-
596
- //----------------------------------------------------------------------------------
597
- // Icons enumeration
598
- //----------------------------------------------------------------------------------
599
- typedef enum {
600
- RICON_NONE = 0,
601
- RICON_FOLDER_FILE_OPEN = 1,
602
- RICON_FILE_SAVE_CLASSIC = 2,
603
- RICON_FOLDER_OPEN = 3,
604
- RICON_FOLDER_SAVE = 4,
605
- RICON_FILE_OPEN = 5,
606
- RICON_FILE_SAVE = 6,
607
- RICON_FILE_EXPORT = 7,
608
- RICON_FILE_NEW = 8,
609
- RICON_FILE_DELETE = 9,
610
- RICON_FILETYPE_TEXT = 10,
611
- RICON_FILETYPE_AUDIO = 11,
612
- RICON_FILETYPE_IMAGE = 12,
613
- RICON_FILETYPE_PLAY = 13,
614
- RICON_FILETYPE_VIDEO = 14,
615
- RICON_FILETYPE_INFO = 15,
616
- RICON_FILE_COPY = 16,
617
- RICON_FILE_CUT = 17,
618
- RICON_FILE_PASTE = 18,
619
- RICON_CURSOR_HAND = 19,
620
- RICON_CURSOR_POINTER = 20,
621
- RICON_CURSOR_CLASSIC = 21,
622
- RICON_PENCIL = 22,
623
- RICON_PENCIL_BIG = 23,
624
- RICON_BRUSH_CLASSIC = 24,
625
- RICON_BRUSH_PAINTER = 25,
626
- RICON_WATER_DROP = 26,
627
- RICON_COLOR_PICKER = 27,
628
- RICON_RUBBER = 28,
629
- RICON_COLOR_BUCKET = 29,
630
- RICON_TEXT_T = 30,
631
- RICON_TEXT_A = 31,
632
- RICON_SCALE = 32,
633
- RICON_RESIZE = 33,
634
- RICON_FILTER_POINT = 34,
635
- RICON_FILTER_BILINEAR = 35,
636
- RICON_CROP = 36,
637
- RICON_CROP_ALPHA = 37,
638
- RICON_SQUARE_TOGGLE = 38,
639
- RICON_SYMMETRY = 39,
640
- RICON_SYMMETRY_HORIZONTAL = 40,
641
- RICON_SYMMETRY_VERTICAL = 41,
642
- RICON_LENS = 42,
643
- RICON_LENS_BIG = 43,
644
- RICON_EYE_ON = 44,
645
- RICON_EYE_OFF = 45,
646
- RICON_FILTER_TOP = 46,
647
- RICON_FILTER = 47,
648
- RICON_TARGET_POINT = 48,
649
- RICON_TARGET_SMALL = 49,
650
- RICON_TARGET_BIG = 50,
651
- RICON_TARGET_MOVE = 51,
652
- RICON_CURSOR_MOVE = 52,
653
- RICON_CURSOR_SCALE = 53,
654
- RICON_CURSOR_SCALE_RIGHT = 54,
655
- RICON_CURSOR_SCALE_LEFT = 55,
656
- RICON_UNDO = 56,
657
- RICON_REDO = 57,
658
- RICON_REREDO = 58,
659
- RICON_MUTATE = 59,
660
- RICON_ROTATE = 60,
661
- RICON_REPEAT = 61,
662
- RICON_SHUFFLE = 62,
663
- RICON_EMPTYBOX = 63,
664
- RICON_TARGET = 64,
665
- RICON_TARGET_SMALL_FILL = 65,
666
- RICON_TARGET_BIG_FILL = 66,
667
- RICON_TARGET_MOVE_FILL = 67,
668
- RICON_CURSOR_MOVE_FILL = 68,
669
- RICON_CURSOR_SCALE_FILL = 69,
670
- RICON_CURSOR_SCALE_RIGHT_FILL = 70,
671
- RICON_CURSOR_SCALE_LEFT_FILL = 71,
672
- RICON_UNDO_FILL = 72,
673
- RICON_REDO_FILL = 73,
674
- RICON_REREDO_FILL = 74,
675
- RICON_MUTATE_FILL = 75,
676
- RICON_ROTATE_FILL = 76,
677
- RICON_REPEAT_FILL = 77,
678
- RICON_SHUFFLE_FILL = 78,
679
- RICON_EMPTYBOX_SMALL = 79,
680
- RICON_BOX = 80,
681
- RICON_BOX_TOP = 81,
682
- RICON_BOX_TOP_RIGHT = 82,
683
- RICON_BOX_RIGHT = 83,
684
- RICON_BOX_BOTTOM_RIGHT = 84,
685
- RICON_BOX_BOTTOM = 85,
686
- RICON_BOX_BOTTOM_LEFT = 86,
687
- RICON_BOX_LEFT = 87,
688
- RICON_BOX_TOP_LEFT = 88,
689
- RICON_BOX_CENTER = 89,
690
- RICON_BOX_CIRCLE_MASK = 90,
691
- RICON_POT = 91,
692
- RICON_ALPHA_MULTIPLY = 92,
693
- RICON_ALPHA_CLEAR = 93,
694
- RICON_DITHERING = 94,
695
- RICON_MIPMAPS = 95,
696
- RICON_BOX_GRID = 96,
697
- RICON_GRID = 97,
698
- RICON_BOX_CORNERS_SMALL = 98,
699
- RICON_BOX_CORNERS_BIG = 99,
700
- RICON_FOUR_BOXES = 100,
701
- RICON_GRID_FILL = 101,
702
- RICON_BOX_MULTISIZE = 102,
703
- RICON_ZOOM_SMALL = 103,
704
- RICON_ZOOM_MEDIUM = 104,
705
- RICON_ZOOM_BIG = 105,
706
- RICON_ZOOM_ALL = 106,
707
- RICON_ZOOM_CENTER = 107,
708
- RICON_BOX_DOTS_SMALL = 108,
709
- RICON_BOX_DOTS_BIG = 109,
710
- RICON_BOX_CONCENTRIC = 110,
711
- RICON_BOX_GRID_BIG = 111,
712
- RICON_OK_TICK = 112,
713
- RICON_CROSS = 113,
714
- RICON_ARROW_LEFT = 114,
715
- RICON_ARROW_RIGHT = 115,
716
- RICON_ARROW_DOWN = 116,
717
- RICON_ARROW_UP = 117,
718
- RICON_ARROW_LEFT_FILL = 118,
719
- RICON_ARROW_RIGHT_FILL = 119,
720
- RICON_ARROW_DOWN_FILL = 120,
721
- RICON_ARROW_UP_FILL = 121,
722
- RICON_AUDIO = 122,
723
- RICON_FX = 123,
724
- RICON_WAVE = 124,
725
- RICON_WAVE_SINUS = 125,
726
- RICON_WAVE_SQUARE = 126,
727
- RICON_WAVE_TRIANGULAR = 127,
728
- RICON_CROSS_SMALL = 128,
729
- RICON_PLAYER_PREVIOUS = 129,
730
- RICON_PLAYER_PLAY_BACK = 130,
731
- RICON_PLAYER_PLAY = 131,
732
- RICON_PLAYER_PAUSE = 132,
733
- RICON_PLAYER_STOP = 133,
734
- RICON_PLAYER_NEXT = 134,
735
- RICON_PLAYER_RECORD = 135,
736
- RICON_MAGNET = 136,
737
- RICON_LOCK_CLOSE = 137,
738
- RICON_LOCK_OPEN = 138,
739
- RICON_CLOCK = 139,
740
- RICON_TOOLS = 140,
741
- RICON_GEAR = 141,
742
- RICON_GEAR_BIG = 142,
743
- RICON_BIN = 143,
744
- RICON_HAND_POINTER = 144,
745
- RICON_LASER = 145,
746
- RICON_COIN = 146,
747
- RICON_EXPLOSION = 147,
748
- RICON_1UP = 148,
749
- RICON_PLAYER = 149,
750
- RICON_PLAYER_JUMP = 150,
751
- RICON_KEY = 151,
752
- RICON_DEMON = 152,
753
- RICON_TEXT_POPUP = 153,
754
- RICON_GEAR_EX = 154,
755
- RICON_CRACK = 155,
756
- RICON_CRACK_POINTS = 156,
757
- RICON_STAR = 157,
758
- RICON_DOOR = 158,
759
- RICON_EXIT = 159,
760
- RICON_MODE_2D = 160,
761
- RICON_MODE_3D = 161,
762
- RICON_CUBE = 162,
763
- RICON_CUBE_FACE_TOP = 163,
764
- RICON_CUBE_FACE_LEFT = 164,
765
- RICON_CUBE_FACE_FRONT = 165,
766
- RICON_CUBE_FACE_BOTTOM = 166,
767
- RICON_CUBE_FACE_RIGHT = 167,
768
- RICON_CUBE_FACE_BACK = 168,
769
- RICON_CAMERA = 169,
770
- RICON_SPECIAL = 170,
771
- RICON_LINK_NET = 171,
772
- RICON_LINK_BOXES = 172,
773
- RICON_LINK_MULTI = 173,
774
- RICON_LINK = 174,
775
- RICON_LINK_BROKE = 175,
776
- RICON_TEXT_NOTES = 176,
777
- RICON_NOTEBOOK = 177,
778
- RICON_SUITCASE = 178,
779
- RICON_SUITCASE_ZIP = 179,
780
- RICON_MAILBOX = 180,
781
- RICON_MONITOR = 181,
782
- RICON_PRINTER = 182,
783
- RICON_PHOTO_CAMERA = 183,
784
- RICON_PHOTO_CAMERA_FLASH = 184,
785
- RICON_HOUSE = 185,
786
- RICON_HEART = 186,
787
- RICON_CORNER = 187,
788
- RICON_VERTICAL_BARS = 188,
789
- RICON_VERTICAL_BARS_FILL = 189,
790
- RICON_LIFE_BARS = 190,
791
- RICON_INFO = 191,
792
- RICON_CROSSLINE = 192,
793
- RICON_HELP = 193,
794
- RICON_FILETYPE_ALPHA = 194,
795
- RICON_FILETYPE_HOME = 195,
796
- RICON_LAYERS_VISIBLE = 196,
797
- RICON_LAYERS = 197,
798
- RICON_WINDOW = 198,
799
- RICON_HIDPI = 199,
800
- RICON_200 = 200,
801
- RICON_201 = 201,
802
- RICON_202 = 202,
803
- RICON_203 = 203,
804
- RICON_204 = 204,
805
- RICON_205 = 205,
806
- RICON_206 = 206,
807
- RICON_207 = 207,
808
- RICON_208 = 208,
809
- RICON_209 = 209,
810
- RICON_210 = 210,
811
- RICON_211 = 211,
812
- RICON_212 = 212,
813
- RICON_213 = 213,
814
- RICON_214 = 214,
815
- RICON_215 = 215,
816
- RICON_216 = 216,
817
- RICON_217 = 217,
818
- RICON_218 = 218,
819
- RICON_219 = 219,
820
- RICON_220 = 220,
821
- RICON_221 = 221,
822
- RICON_222 = 222,
823
- RICON_223 = 223,
824
- RICON_224 = 224,
825
- RICON_225 = 225,
826
- RICON_226 = 226,
827
- RICON_227 = 227,
828
- RICON_228 = 228,
829
- RICON_229 = 229,
830
- RICON_230 = 230,
831
- RICON_231 = 231,
832
- RICON_232 = 232,
833
- RICON_233 = 233,
834
- RICON_234 = 234,
835
- RICON_235 = 235,
836
- RICON_236 = 236,
837
- RICON_237 = 237,
838
- RICON_238 = 238,
839
- RICON_239 = 239,
840
- RICON_240 = 240,
841
- RICON_241 = 241,
842
- RICON_242 = 242,
843
- RICON_243 = 243,
844
- RICON_244 = 244,
845
- RICON_245 = 245,
846
- RICON_246 = 246,
847
- RICON_247 = 247,
848
- RICON_248 = 248,
849
- RICON_249 = 249,
850
- RICON_250 = 250,
851
- RICON_251 = 251,
852
- RICON_252 = 252,
853
- RICON_253 = 253,
854
- RICON_254 = 254,
855
- RICON_255 = 255,
856
- } guiIconName;
860
+ // Those arrays are stored as unsigned int data arrays, so,
861
+ // every array element defines 32 pixels (bits) of information
862
+ // One icon is defined by 8 int, (8 int * 32 bit = 256 bit = 16*16 pixels)
863
+ // NOTE: Number of elemens depend on RAYGUI_ICON_SIZE (by default 16x16 pixels)
864
+ #define RAYGUI_ICON_DATA_ELEMENTS (RAYGUI_ICON_SIZE*RAYGUI_ICON_SIZE/32)
857
865
 
858
866
  //----------------------------------------------------------------------------------
859
867
  // Icons data for all gui possible icons (allocated on data segment by default)
@@ -861,276 +869,274 @@ typedef enum {
861
869
  // NOTE 1: Every icon is codified in binary form, using 1 bit per pixel, so,
862
870
  // every 16x16 icon requires 8 integers (16*16/32) to be stored
863
871
  //
864
- // NOTE 2: A new icon set could be loaded over this array using GuiLoadIcons(),
865
- // but loaded icons set must be same RICON_SIZE and no more than RICON_MAX_ICONS
872
+ // NOTE 2: A different icon set could be loaded over this array using GuiLoadIcons(),
873
+ // but loaded icons set must be same RAYGUI_ICON_SIZE and no more than RAYGUI_ICON_MAX_ICONS
866
874
  //
867
875
  // guiIcons size is by default: 256*(16*16/32) = 2048*4 = 8192 bytes = 8 KB
868
876
  //----------------------------------------------------------------------------------
869
- static unsigned int guiIcons[RICON_MAX_ICONS*RICON_DATA_ELEMENTS] = {
870
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_NONE
871
- 0x3ff80000, 0x2f082008, 0x2042207e, 0x40027fc2, 0x40024002, 0x40024002, 0x40024002, 0x00007ffe, // RICON_FOLDER_FILE_OPEN
872
- 0x3ffe0000, 0x44226422, 0x400247e2, 0x5ffa4002, 0x57ea500a, 0x500a500a, 0x40025ffa, 0x00007ffe, // RICON_FILE_SAVE_CLASSIC
873
- 0x00000000, 0x0042007e, 0x40027fc2, 0x40024002, 0x41024002, 0x44424282, 0x793e4102, 0x00000100, // RICON_FOLDER_OPEN
874
- 0x00000000, 0x0042007e, 0x40027fc2, 0x40024002, 0x41024102, 0x44424102, 0x793e4282, 0x00000000, // RICON_FOLDER_SAVE
875
- 0x3ff00000, 0x201c2010, 0x20042004, 0x21042004, 0x24442284, 0x21042104, 0x20042104, 0x00003ffc, // RICON_FILE_OPEN
876
- 0x3ff00000, 0x201c2010, 0x20042004, 0x21042004, 0x21042104, 0x22842444, 0x20042104, 0x00003ffc, // RICON_FILE_SAVE
877
- 0x3ff00000, 0x201c2010, 0x00042004, 0x20041004, 0x20844784, 0x00841384, 0x20042784, 0x00003ffc, // RICON_FILE_EXPORT
878
- 0x3ff00000, 0x201c2010, 0x20042004, 0x20042004, 0x22042204, 0x22042f84, 0x20042204, 0x00003ffc, // RICON_FILE_NEW
879
- 0x3ff00000, 0x201c2010, 0x20042004, 0x20042004, 0x25042884, 0x25042204, 0x20042884, 0x00003ffc, // RICON_FILE_DELETE
880
- 0x3ff00000, 0x201c2010, 0x20042004, 0x20042ff4, 0x20042ff4, 0x20042ff4, 0x20042004, 0x00003ffc, // RICON_FILETYPE_TEXT
881
- 0x3ff00000, 0x201c2010, 0x27042004, 0x244424c4, 0x26442444, 0x20642664, 0x20042004, 0x00003ffc, // RICON_FILETYPE_AUDIO
882
- 0x3ff00000, 0x201c2010, 0x26042604, 0x20042004, 0x35442884, 0x2414222c, 0x20042004, 0x00003ffc, // RICON_FILETYPE_IMAGE
883
- 0x3ff00000, 0x201c2010, 0x20c42004, 0x22442144, 0x22442444, 0x20c42144, 0x20042004, 0x00003ffc, // RICON_FILETYPE_PLAY
884
- 0x3ff00000, 0x3ffc2ff0, 0x3f3c2ff4, 0x3dbc2eb4, 0x3dbc2bb4, 0x3f3c2eb4, 0x3ffc2ff4, 0x00002ff4, // RICON_FILETYPE_VIDEO
885
- 0x3ff00000, 0x201c2010, 0x21842184, 0x21842004, 0x21842184, 0x21842184, 0x20042184, 0x00003ffc, // RICON_FILETYPE_INFO
886
- 0x0ff00000, 0x381c0810, 0x28042804, 0x28042804, 0x28042804, 0x28042804, 0x20102ffc, 0x00003ff0, // RICON_FILE_COPY
887
- 0x00000000, 0x701c0000, 0x079c1e14, 0x55a000f0, 0x079c00f0, 0x701c1e14, 0x00000000, 0x00000000, // RICON_FILE_CUT
888
- 0x01c00000, 0x13e41bec, 0x3f841004, 0x204420c4, 0x20442044, 0x20442044, 0x207c2044, 0x00003fc0, // RICON_FILE_PASTE
889
- 0x00000000, 0x3aa00fe0, 0x2abc2aa0, 0x2aa42aa4, 0x20042aa4, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_CURSOR_HAND
890
- 0x00000000, 0x003c000c, 0x030800c8, 0x30100c10, 0x10202020, 0x04400840, 0x01800280, 0x00000000, // RICON_CURSOR_POINTER
891
- 0x00000000, 0x00180000, 0x01f00078, 0x03e007f0, 0x07c003e0, 0x04000e40, 0x00000000, 0x00000000, // RICON_CURSOR_CLASSIC
892
- 0x00000000, 0x04000000, 0x11000a00, 0x04400a80, 0x01100220, 0x00580088, 0x00000038, 0x00000000, // RICON_PENCIL
893
- 0x04000000, 0x15000a00, 0x50402880, 0x14102820, 0x05040a08, 0x015c028c, 0x007c00bc, 0x00000000, // RICON_PENCIL_BIG
894
- 0x01c00000, 0x01400140, 0x01400140, 0x0ff80140, 0x0ff80808, 0x0aa80808, 0x0aa80aa8, 0x00000ff8, // RICON_BRUSH_CLASSIC
895
- 0x1ffc0000, 0x5ffc7ffe, 0x40004000, 0x00807f80, 0x01c001c0, 0x01c001c0, 0x01c001c0, 0x00000080, // RICON_BRUSH_PAINTER
896
- 0x00000000, 0x00800000, 0x01c00080, 0x03e001c0, 0x07f003e0, 0x036006f0, 0x000001c0, 0x00000000, // RICON_WATER_DROP
897
- 0x00000000, 0x3e003800, 0x1f803f80, 0x0c201e40, 0x02080c10, 0x00840104, 0x00380044, 0x00000000, // RICON_COLOR_PICKER
898
- 0x00000000, 0x07800300, 0x1fe00fc0, 0x3f883fd0, 0x0e021f04, 0x02040402, 0x00f00108, 0x00000000, // RICON_RUBBER
899
- 0x00c00000, 0x02800140, 0x08200440, 0x20081010, 0x2ffe3004, 0x03f807fc, 0x00e001f0, 0x00000040, // RICON_COLOR_BUCKET
900
- 0x00000000, 0x21843ffc, 0x01800180, 0x01800180, 0x01800180, 0x01800180, 0x03c00180, 0x00000000, // RICON_TEXT_T
901
- 0x00800000, 0x01400180, 0x06200340, 0x0c100620, 0x1ff80c10, 0x380c1808, 0x70067004, 0x0000f80f, // RICON_TEXT_A
902
- 0x78000000, 0x50004000, 0x00004800, 0x03c003c0, 0x03c003c0, 0x00100000, 0x0002000a, 0x0000000e, // RICON_SCALE
903
- 0x75560000, 0x5e004002, 0x54001002, 0x41001202, 0x408200fe, 0x40820082, 0x40820082, 0x00006afe, // RICON_RESIZE
904
- 0x00000000, 0x3f003f00, 0x3f003f00, 0x3f003f00, 0x00400080, 0x001c0020, 0x001c001c, 0x00000000, // RICON_FILTER_POINT
905
- 0x6d800000, 0x00004080, 0x40804080, 0x40800000, 0x00406d80, 0x001c0020, 0x001c001c, 0x00000000, // RICON_FILTER_BILINEAR
906
- 0x40080000, 0x1ffe2008, 0x14081008, 0x11081208, 0x10481088, 0x10081028, 0x10047ff8, 0x00001002, // RICON_CROP
907
- 0x00100000, 0x3ffc0010, 0x2ab03550, 0x22b02550, 0x20b02150, 0x20302050, 0x2000fff0, 0x00002000, // RICON_CROP_ALPHA
908
- 0x40000000, 0x1ff82000, 0x04082808, 0x01082208, 0x00482088, 0x00182028, 0x35542008, 0x00000002, // RICON_SQUARE_TOGGLE
909
- 0x00000000, 0x02800280, 0x06c006c0, 0x0ea00ee0, 0x1e901eb0, 0x3e883e98, 0x7efc7e8c, 0x00000000, // RICON_SIMMETRY
910
- 0x01000000, 0x05600100, 0x1d480d50, 0x7d423d44, 0x3d447d42, 0x0d501d48, 0x01000560, 0x00000100, // RICON_SIMMETRY_HORIZONTAL
911
- 0x01800000, 0x04200240, 0x10080810, 0x00001ff8, 0x00007ffe, 0x0ff01ff8, 0x03c007e0, 0x00000180, // RICON_SIMMETRY_VERTICAL
912
- 0x00000000, 0x010800f0, 0x02040204, 0x02040204, 0x07f00308, 0x1c000e00, 0x30003800, 0x00000000, // RICON_LENS
913
- 0x00000000, 0x061803f0, 0x08240c0c, 0x08040814, 0x0c0c0804, 0x23f01618, 0x18002400, 0x00000000, // RICON_LENS_BIG
914
- 0x00000000, 0x00000000, 0x1c7007c0, 0x638e3398, 0x1c703398, 0x000007c0, 0x00000000, 0x00000000, // RICON_EYE_ON
915
- 0x00000000, 0x10002000, 0x04700fc0, 0x610e3218, 0x1c703098, 0x001007a0, 0x00000008, 0x00000000, // RICON_EYE_OFF
916
- 0x00000000, 0x00007ffc, 0x40047ffc, 0x10102008, 0x04400820, 0x02800280, 0x02800280, 0x00000100, // RICON_FILTER_TOP
917
- 0x00000000, 0x40027ffe, 0x10082004, 0x04200810, 0x02400240, 0x02400240, 0x01400240, 0x000000c0, // RICON_FILTER
918
- 0x00800000, 0x00800080, 0x00000080, 0x3c9e0000, 0x00000000, 0x00800080, 0x00800080, 0x00000000, // RICON_TARGET_POINT
919
- 0x00800000, 0x00800080, 0x00800080, 0x3f7e01c0, 0x008001c0, 0x00800080, 0x00800080, 0x00000000, // RICON_TARGET_SMALL
920
- 0x00800000, 0x00800080, 0x03e00080, 0x3e3e0220, 0x03e00220, 0x00800080, 0x00800080, 0x00000000, // RICON_TARGET_BIG
921
- 0x01000000, 0x04400280, 0x01000100, 0x43842008, 0x43849ab2, 0x01002008, 0x04400100, 0x01000280, // RICON_TARGET_MOVE
922
- 0x01000000, 0x04400280, 0x01000100, 0x41042108, 0x41049ff2, 0x01002108, 0x04400100, 0x01000280, // RICON_CURSOR_MOVE
923
- 0x781e0000, 0x500a4002, 0x04204812, 0x00000240, 0x02400000, 0x48120420, 0x4002500a, 0x0000781e, // RICON_CURSOR_SCALE
924
- 0x00000000, 0x20003c00, 0x24002800, 0x01000200, 0x00400080, 0x00140024, 0x003c0004, 0x00000000, // RICON_CURSOR_SCALE_RIGHT
925
- 0x00000000, 0x0004003c, 0x00240014, 0x00800040, 0x02000100, 0x28002400, 0x3c002000, 0x00000000, // RICON_CURSOR_SCALE_LEFT
926
- 0x00000000, 0x00100020, 0x10101fc8, 0x10001020, 0x10001000, 0x10001000, 0x00001fc0, 0x00000000, // RICON_UNDO
927
- 0x00000000, 0x08000400, 0x080813f8, 0x00080408, 0x00080008, 0x00080008, 0x000003f8, 0x00000000, // RICON_REDO
928
- 0x00000000, 0x3ffc0000, 0x20042004, 0x20002000, 0x20402000, 0x3f902020, 0x00400020, 0x00000000, // RICON_REREDO
929
- 0x00000000, 0x3ffc0000, 0x20042004, 0x27fc2004, 0x20202000, 0x3fc82010, 0x00200010, 0x00000000, // RICON_MUTATE
930
- 0x00000000, 0x0ff00000, 0x10081818, 0x11801008, 0x10001180, 0x18101020, 0x00100fc8, 0x00000020, // RICON_ROTATE
931
- 0x00000000, 0x04000200, 0x240429fc, 0x20042204, 0x20442004, 0x3f942024, 0x00400020, 0x00000000, // RICON_REPEAT
932
- 0x00000000, 0x20001000, 0x22104c0e, 0x00801120, 0x11200040, 0x4c0e2210, 0x10002000, 0x00000000, // RICON_SHUFFLE
933
- 0x7ffe0000, 0x50024002, 0x44024802, 0x41024202, 0x40424082, 0x40124022, 0x4002400a, 0x00007ffe, // RICON_EMPTYBOX
934
- 0x00800000, 0x03e00080, 0x08080490, 0x3c9e0808, 0x08080808, 0x03e00490, 0x00800080, 0x00000000, // RICON_TARGET
935
- 0x00800000, 0x00800080, 0x00800080, 0x3ffe01c0, 0x008001c0, 0x00800080, 0x00800080, 0x00000000, // RICON_TARGET_SMALL_FILL
936
- 0x00800000, 0x00800080, 0x03e00080, 0x3ffe03e0, 0x03e003e0, 0x00800080, 0x00800080, 0x00000000, // RICON_TARGET_BIG_FILL
937
- 0x01000000, 0x07c00380, 0x01000100, 0x638c2008, 0x638cfbbe, 0x01002008, 0x07c00100, 0x01000380, // RICON_TARGET_MOVE_FILL
938
- 0x01000000, 0x07c00380, 0x01000100, 0x610c2108, 0x610cfffe, 0x01002108, 0x07c00100, 0x01000380, // RICON_CURSOR_MOVE_FILL
939
- 0x781e0000, 0x6006700e, 0x04204812, 0x00000240, 0x02400000, 0x48120420, 0x700e6006, 0x0000781e, // RICON_CURSOR_SCALE_FILL
940
- 0x00000000, 0x38003c00, 0x24003000, 0x01000200, 0x00400080, 0x000c0024, 0x003c001c, 0x00000000, // RICON_CURSOR_SCALE_RIGHT
941
- 0x00000000, 0x001c003c, 0x0024000c, 0x00800040, 0x02000100, 0x30002400, 0x3c003800, 0x00000000, // RICON_CURSOR_SCALE_LEFT
942
- 0x00000000, 0x00300020, 0x10301ff8, 0x10001020, 0x10001000, 0x10001000, 0x00001fc0, 0x00000000, // RICON_UNDO_FILL
943
- 0x00000000, 0x0c000400, 0x0c081ff8, 0x00080408, 0x00080008, 0x00080008, 0x000003f8, 0x00000000, // RICON_REDO_FILL
944
- 0x00000000, 0x3ffc0000, 0x20042004, 0x20002000, 0x20402000, 0x3ff02060, 0x00400060, 0x00000000, // RICON_REREDO_FILL
945
- 0x00000000, 0x3ffc0000, 0x20042004, 0x27fc2004, 0x20202000, 0x3ff82030, 0x00200030, 0x00000000, // RICON_MUTATE_FILL
946
- 0x00000000, 0x0ff00000, 0x10081818, 0x11801008, 0x10001180, 0x18301020, 0x00300ff8, 0x00000020, // RICON_ROTATE_FILL
947
- 0x00000000, 0x06000200, 0x26042ffc, 0x20042204, 0x20442004, 0x3ff42064, 0x00400060, 0x00000000, // RICON_REPEAT_FILL
948
- 0x00000000, 0x30001000, 0x32107c0e, 0x00801120, 0x11200040, 0x7c0e3210, 0x10003000, 0x00000000, // RICON_SHUFFLE_FILL
949
- 0x00000000, 0x30043ffc, 0x24042804, 0x21042204, 0x20442084, 0x20142024, 0x3ffc200c, 0x00000000, // RICON_EMPTYBOX_SMALL
950
- 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX
951
- 0x00000000, 0x23c43ffc, 0x23c423c4, 0x200423c4, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_TOP
952
- 0x00000000, 0x3e043ffc, 0x3e043e04, 0x20043e04, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_TOP_RIGHT
953
- 0x00000000, 0x20043ffc, 0x20042004, 0x3e043e04, 0x3e043e04, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_RIGHT
954
- 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x3e042004, 0x3e043e04, 0x3ffc3e04, 0x00000000, // RICON_BOX_BOTTOM_RIGHT
955
- 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x23c42004, 0x23c423c4, 0x3ffc23c4, 0x00000000, // RICON_BOX_BOTTOM
956
- 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x207c2004, 0x207c207c, 0x3ffc207c, 0x00000000, // RICON_BOX_BOTTOM_LEFT
957
- 0x00000000, 0x20043ffc, 0x20042004, 0x207c207c, 0x207c207c, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_LEFT
958
- 0x00000000, 0x207c3ffc, 0x207c207c, 0x2004207c, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_TOP_LEFT
959
- 0x00000000, 0x20043ffc, 0x20042004, 0x23c423c4, 0x23c423c4, 0x20042004, 0x3ffc2004, 0x00000000, // RICON_BOX_CIRCLE_MASK
960
- 0x7ffe0000, 0x40024002, 0x47e24182, 0x4ff247e2, 0x47e24ff2, 0x418247e2, 0x40024002, 0x00007ffe, // RICON_BOX_CENTER
961
- 0x7fff0000, 0x40014001, 0x40014001, 0x49555ddd, 0x4945495d, 0x400149c5, 0x40014001, 0x00007fff, // RICON_POT
962
- 0x7ffe0000, 0x53327332, 0x44ce4cce, 0x41324332, 0x404e40ce, 0x48125432, 0x4006540e, 0x00007ffe, // RICON_ALPHA_MULTIPLY
963
- 0x7ffe0000, 0x53327332, 0x44ce4cce, 0x41324332, 0x5c4e40ce, 0x44124432, 0x40065c0e, 0x00007ffe, // RICON_ALPHA_CLEAR
964
- 0x7ffe0000, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x00007ffe, // RICON_DITHERING
965
- 0x07fe0000, 0x1ffa0002, 0x7fea000a, 0x402a402a, 0x5b2a512a, 0x5128552a, 0x40205128, 0x00007fe0, // RICON_MIPMAPS
966
- 0x00000000, 0x1ff80000, 0x12481248, 0x12481ff8, 0x1ff81248, 0x12481248, 0x00001ff8, 0x00000000, // RICON_BOX_GRID
967
- 0x12480000, 0x7ffe1248, 0x12481248, 0x12487ffe, 0x7ffe1248, 0x12481248, 0x12487ffe, 0x00001248, // RICON_GRID
968
- 0x00000000, 0x1c380000, 0x1c3817e8, 0x08100810, 0x08100810, 0x17e81c38, 0x00001c38, 0x00000000, // RICON_BOX_CORNERS_SMALL
969
- 0x700e0000, 0x700e5ffa, 0x20042004, 0x20042004, 0x20042004, 0x20042004, 0x5ffa700e, 0x0000700e, // RICON_BOX_CORNERS_BIG
970
- 0x3f7e0000, 0x21422142, 0x21422142, 0x00003f7e, 0x21423f7e, 0x21422142, 0x3f7e2142, 0x00000000, // RICON_FOUR_BOXES
971
- 0x00000000, 0x3bb80000, 0x3bb83bb8, 0x3bb80000, 0x3bb83bb8, 0x3bb80000, 0x3bb83bb8, 0x00000000, // RICON_GRID_FILL
972
- 0x7ffe0000, 0x7ffe7ffe, 0x77fe7000, 0x77fe77fe, 0x777e7700, 0x777e777e, 0x777e777e, 0x0000777e, // RICON_BOX_MULTISIZE
973
- 0x781e0000, 0x40024002, 0x00004002, 0x01800000, 0x00000180, 0x40020000, 0x40024002, 0x0000781e, // RICON_ZOOM_SMALL
974
- 0x781e0000, 0x40024002, 0x00004002, 0x03c003c0, 0x03c003c0, 0x40020000, 0x40024002, 0x0000781e, // RICON_ZOOM_MEDIUM
975
- 0x781e0000, 0x40024002, 0x07e04002, 0x07e007e0, 0x07e007e0, 0x400207e0, 0x40024002, 0x0000781e, // RICON_ZOOM_BIG
976
- 0x781e0000, 0x5ffa4002, 0x1ff85ffa, 0x1ff81ff8, 0x1ff81ff8, 0x5ffa1ff8, 0x40025ffa, 0x0000781e, // RICON_ZOOM_ALL
977
- 0x00000000, 0x2004381c, 0x00002004, 0x00000000, 0x00000000, 0x20040000, 0x381c2004, 0x00000000, // RICON_ZOOM_CENTER
978
- 0x00000000, 0x1db80000, 0x10081008, 0x10080000, 0x00001008, 0x10081008, 0x00001db8, 0x00000000, // RICON_BOX_DOTS_SMALL
979
- 0x35560000, 0x00002002, 0x00002002, 0x00002002, 0x00002002, 0x00002002, 0x35562002, 0x00000000, // RICON_BOX_DOTS_BIG
980
- 0x7ffe0000, 0x40024002, 0x48124ff2, 0x49924812, 0x48124992, 0x4ff24812, 0x40024002, 0x00007ffe, // RICON_BOX_CONCENTRIC
981
- 0x00000000, 0x10841ffc, 0x10841084, 0x1ffc1084, 0x10841084, 0x10841084, 0x00001ffc, 0x00000000, // RICON_BOX_GRID_BIG
982
- 0x00000000, 0x00000000, 0x10000000, 0x04000800, 0x01040200, 0x00500088, 0x00000020, 0x00000000, // RICON_OK_TICK
983
- 0x00000000, 0x10080000, 0x04200810, 0x01800240, 0x02400180, 0x08100420, 0x00001008, 0x00000000, // RICON_CROSS
984
- 0x00000000, 0x02000000, 0x00800100, 0x00200040, 0x00200010, 0x00800040, 0x02000100, 0x00000000, // RICON_ARROW_LEFT
985
- 0x00000000, 0x00400000, 0x01000080, 0x04000200, 0x04000800, 0x01000200, 0x00400080, 0x00000000, // RICON_ARROW_RIGHT
986
- 0x00000000, 0x00000000, 0x00000000, 0x08081004, 0x02200410, 0x00800140, 0x00000000, 0x00000000, // RICON_ARROW_DOWN
987
- 0x00000000, 0x00000000, 0x01400080, 0x04100220, 0x10040808, 0x00000000, 0x00000000, 0x00000000, // RICON_ARROW_UP
988
- 0x00000000, 0x02000000, 0x03800300, 0x03e003c0, 0x03e003f0, 0x038003c0, 0x02000300, 0x00000000, // RICON_ARROW_LEFT_FILL
989
- 0x00000000, 0x00400000, 0x01c000c0, 0x07c003c0, 0x07c00fc0, 0x01c003c0, 0x004000c0, 0x00000000, // RICON_ARROW_RIGHT_FILL
990
- 0x00000000, 0x00000000, 0x00000000, 0x0ff81ffc, 0x03e007f0, 0x008001c0, 0x00000000, 0x00000000, // RICON_ARROW_DOWN_FILL
991
- 0x00000000, 0x00000000, 0x01c00080, 0x07f003e0, 0x1ffc0ff8, 0x00000000, 0x00000000, 0x00000000, // RICON_ARROW_UP_FILL
992
- 0x00000000, 0x18a008c0, 0x32881290, 0x24822686, 0x26862482, 0x12903288, 0x08c018a0, 0x00000000, // RICON_AUDIO
993
- 0x00000000, 0x04800780, 0x004000c0, 0x662000f0, 0x08103c30, 0x130a0e18, 0x0000318e, 0x00000000, // RICON_FX
994
- 0x00000000, 0x00800000, 0x08880888, 0x2aaa0a8a, 0x0a8a2aaa, 0x08880888, 0x00000080, 0x00000000, // RICON_WAVE
995
- 0x00000000, 0x00600000, 0x01080090, 0x02040108, 0x42044204, 0x24022402, 0x00001800, 0x00000000, // RICON_WAVE_SINUS
996
- 0x00000000, 0x07f80000, 0x04080408, 0x04080408, 0x04080408, 0x7c0e0408, 0x00000000, 0x00000000, // RICON_WAVE_SQUARE
997
- 0x00000000, 0x00000000, 0x00a00040, 0x22084110, 0x08021404, 0x00000000, 0x00000000, 0x00000000, // RICON_WAVE_TRIANGULAR
998
- 0x00000000, 0x00000000, 0x04200000, 0x01800240, 0x02400180, 0x00000420, 0x00000000, 0x00000000, // RICON_CROSS_SMALL
999
- 0x00000000, 0x18380000, 0x12281428, 0x10a81128, 0x112810a8, 0x14281228, 0x00001838, 0x00000000, // RICON_PLAYER_PREVIOUS
1000
- 0x00000000, 0x18000000, 0x11801600, 0x10181060, 0x10601018, 0x16001180, 0x00001800, 0x00000000, // RICON_PLAYER_PLAY_BACK
1001
- 0x00000000, 0x00180000, 0x01880068, 0x18080608, 0x06081808, 0x00680188, 0x00000018, 0x00000000, // RICON_PLAYER_PLAY
1002
- 0x00000000, 0x1e780000, 0x12481248, 0x12481248, 0x12481248, 0x12481248, 0x00001e78, 0x00000000, // RICON_PLAYER_PAUSE
1003
- 0x00000000, 0x1ff80000, 0x10081008, 0x10081008, 0x10081008, 0x10081008, 0x00001ff8, 0x00000000, // RICON_PLAYER_STOP
1004
- 0x00000000, 0x1c180000, 0x14481428, 0x15081488, 0x14881508, 0x14281448, 0x00001c18, 0x00000000, // RICON_PLAYER_NEXT
1005
- 0x00000000, 0x03c00000, 0x08100420, 0x10081008, 0x10081008, 0x04200810, 0x000003c0, 0x00000000, // RICON_PLAYER_RECORD
1006
- 0x00000000, 0x0c3007e0, 0x13c81818, 0x14281668, 0x14281428, 0x1c381c38, 0x08102244, 0x00000000, // RICON_MAGNET
1007
- 0x07c00000, 0x08200820, 0x3ff80820, 0x23882008, 0x21082388, 0x20082108, 0x1ff02008, 0x00000000, // RICON_LOCK_CLOSE
1008
- 0x07c00000, 0x08000800, 0x3ff80800, 0x23882008, 0x21082388, 0x20082108, 0x1ff02008, 0x00000000, // RICON_LOCK_OPEN
1009
- 0x01c00000, 0x0c180770, 0x3086188c, 0x60832082, 0x60034781, 0x30062002, 0x0c18180c, 0x01c00770, // RICON_CLOCK
1010
- 0x0a200000, 0x1b201b20, 0x04200e20, 0x04200420, 0x04700420, 0x0e700e70, 0x0e700e70, 0x04200e70, // RICON_TOOLS
1011
- 0x01800000, 0x3bdc318c, 0x0ff01ff8, 0x7c3e1e78, 0x1e787c3e, 0x1ff80ff0, 0x318c3bdc, 0x00000180, // RICON_GEAR
1012
- 0x01800000, 0x3ffc318c, 0x1c381ff8, 0x781e1818, 0x1818781e, 0x1ff81c38, 0x318c3ffc, 0x00000180, // RICON_GEAR_BIG
1013
- 0x00000000, 0x08080ff8, 0x08081ffc, 0x0aa80aa8, 0x0aa80aa8, 0x0aa80aa8, 0x08080aa8, 0x00000ff8, // RICON_BIN
1014
- 0x00000000, 0x00000000, 0x20043ffc, 0x08043f84, 0x04040f84, 0x04040784, 0x000007fc, 0x00000000, // RICON_HAND_POINTER
1015
- 0x00000000, 0x24400400, 0x00001480, 0x6efe0e00, 0x00000e00, 0x24401480, 0x00000400, 0x00000000, // RICON_LASER
1016
- 0x00000000, 0x03c00000, 0x08300460, 0x11181118, 0x11181118, 0x04600830, 0x000003c0, 0x00000000, // RICON_COIN
1017
- 0x00000000, 0x10880080, 0x06c00810, 0x366c07e0, 0x07e00240, 0x00001768, 0x04200240, 0x00000000, // RICON_EXPLOSION
1018
- 0x00000000, 0x3d280000, 0x2528252c, 0x3d282528, 0x05280528, 0x05e80528, 0x00000000, 0x00000000, // RICON_1UP
1019
- 0x01800000, 0x03c003c0, 0x018003c0, 0x0ff007e0, 0x0bd00bd0, 0x0a500bd0, 0x02400240, 0x02400240, // RICON_PLAYER
1020
- 0x01800000, 0x03c003c0, 0x118013c0, 0x03c81ff8, 0x07c003c8, 0x04400440, 0x0c080478, 0x00000000, // RICON_PLAYER_JUMP
1021
- 0x3ff80000, 0x30183ff8, 0x30183018, 0x3ff83ff8, 0x03000300, 0x03c003c0, 0x03e00300, 0x000003e0, // RICON_KEY
1022
- 0x3ff80000, 0x3ff83ff8, 0x33983ff8, 0x3ff83398, 0x3ff83ff8, 0x00000540, 0x0fe00aa0, 0x00000fe0, // RICON_DEMON
1023
- 0x00000000, 0x0ff00000, 0x20041008, 0x25442004, 0x10082004, 0x06000bf0, 0x00000300, 0x00000000, // RICON_TEXT_POPUP
1024
- 0x00000000, 0x11440000, 0x07f00be8, 0x1c1c0e38, 0x1c1c0c18, 0x07f00e38, 0x11440be8, 0x00000000, // RICON_GEAR_EX
1025
- 0x00000000, 0x20080000, 0x0c601010, 0x07c00fe0, 0x07c007c0, 0x0c600fe0, 0x20081010, 0x00000000, // RICON_CRACK
1026
- 0x00000000, 0x20080000, 0x0c601010, 0x04400fe0, 0x04405554, 0x0c600fe0, 0x20081010, 0x00000000, // RICON_CRACK_POINTS
1027
- 0x00000000, 0x00800080, 0x01c001c0, 0x1ffc3ffe, 0x03e007f0, 0x07f003e0, 0x0c180770, 0x00000808, // RICON_STAR
1028
- 0x0ff00000, 0x08180810, 0x08100818, 0x0a100810, 0x08180810, 0x08100818, 0x08100810, 0x00001ff8, // RICON_DOOR
1029
- 0x0ff00000, 0x08100810, 0x08100810, 0x10100010, 0x4f902010, 0x10102010, 0x08100010, 0x00000ff0, // RICON_EXIT
1030
- 0x00040000, 0x001f000e, 0x0ef40004, 0x12f41284, 0x0ef41214, 0x10040004, 0x7ffc3004, 0x10003000, // RICON_MODE_2D
1031
- 0x78040000, 0x501f600e, 0x0ef44004, 0x12f41284, 0x0ef41284, 0x10140004, 0x7ffc300c, 0x10003000, // RICON_MODE_3D
1032
- 0x7fe00000, 0x50286030, 0x47fe4804, 0x44224402, 0x44224422, 0x241275e2, 0x0c06140a, 0x000007fe, // RICON_CUBE
1033
- 0x7fe00000, 0x5ff87ff0, 0x47fe4ffc, 0x44224402, 0x44224422, 0x241275e2, 0x0c06140a, 0x000007fe, // RICON_CUBE_FACE_TOP
1034
- 0x7fe00000, 0x50386030, 0x47fe483c, 0x443e443e, 0x443e443e, 0x241e75fe, 0x0c06140e, 0x000007fe, // RICON_CUBE_FACE_LEFT
1035
- 0x7fe00000, 0x50286030, 0x47fe4804, 0x47fe47fe, 0x47fe47fe, 0x27fe77fe, 0x0ffe17fe, 0x000007fe, // RICON_CUBE_FACE_FRONT
1036
- 0x7fe00000, 0x50286030, 0x47fe4804, 0x44224402, 0x44224422, 0x3ff27fe2, 0x0ffe1ffa, 0x000007fe, // RICON_CUBE_FACE_BOTTOM
1037
- 0x7fe00000, 0x70286030, 0x7ffe7804, 0x7c227c02, 0x7c227c22, 0x3c127de2, 0x0c061c0a, 0x000007fe, // RICON_CUBE_FACE_RIGHT
1038
- 0x7fe00000, 0x7fe87ff0, 0x7ffe7fe4, 0x7fe27fe2, 0x7fe27fe2, 0x24127fe2, 0x0c06140a, 0x000007fe, // RICON_CUBE_FACE_BACK
1039
- 0x00000000, 0x2a0233fe, 0x22022602, 0x22022202, 0x2a022602, 0x00a033fe, 0x02080110, 0x00000000, // RICON_CAMERA
1040
- 0x00000000, 0x200c3ffc, 0x000c000c, 0x3ffc000c, 0x30003000, 0x30003000, 0x3ffc3004, 0x00000000, // RICON_SPECIAL
1041
- 0x00000000, 0x0022003e, 0x012201e2, 0x0100013e, 0x01000100, 0x79000100, 0x4f004900, 0x00007800, // RICON_LINK_NET
1042
- 0x00000000, 0x44007c00, 0x45004600, 0x00627cbe, 0x00620022, 0x45007cbe, 0x44004600, 0x00007c00, // RICON_LINK_BOXES
1043
- 0x00000000, 0x0044007c, 0x0010007c, 0x3f100010, 0x3f1021f0, 0x3f100010, 0x3f0021f0, 0x00000000, // RICON_LINK_MULTI
1044
- 0x00000000, 0x0044007c, 0x00440044, 0x0010007c, 0x00100010, 0x44107c10, 0x440047f0, 0x00007c00, // RICON_LINK
1045
- 0x00000000, 0x0044007c, 0x00440044, 0x0000007c, 0x00000010, 0x44007c10, 0x44004550, 0x00007c00, // RICON_LINK_BROKE
1046
- 0x02a00000, 0x22a43ffc, 0x20042004, 0x20042ff4, 0x20042ff4, 0x20042ff4, 0x20042004, 0x00003ffc, // RICON_TEXT_NOTES
1047
- 0x3ffc0000, 0x20042004, 0x245e27c4, 0x27c42444, 0x2004201e, 0x201e2004, 0x20042004, 0x00003ffc, // RICON_NOTEBOOK
1048
- 0x00000000, 0x07e00000, 0x04200420, 0x24243ffc, 0x24242424, 0x24242424, 0x3ffc2424, 0x00000000, // RICON_SUITCASE
1049
- 0x00000000, 0x0fe00000, 0x08200820, 0x40047ffc, 0x7ffc5554, 0x40045554, 0x7ffc4004, 0x00000000, // RICON_SUITCASE_ZIP
1050
- 0x00000000, 0x20043ffc, 0x3ffc2004, 0x13c81008, 0x100813c8, 0x10081008, 0x1ff81008, 0x00000000, // RICON_MAILBOX
1051
- 0x00000000, 0x40027ffe, 0x5ffa5ffa, 0x5ffa5ffa, 0x40025ffa, 0x03c07ffe, 0x1ff81ff8, 0x00000000, // RICON_MONITOR
1052
- 0x0ff00000, 0x6bfe7ffe, 0x7ffe7ffe, 0x68167ffe, 0x08106816, 0x08100810, 0x0ff00810, 0x00000000, // RICON_PRINTER
1053
- 0x3ff80000, 0xfffe2008, 0x870a8002, 0x904a888a, 0x904a904a, 0x870a888a, 0xfffe8002, 0x00000000, // RICON_PHOTO_CAMERA
1054
- 0x0fc00000, 0xfcfe0cd8, 0x8002fffe, 0x84428382, 0x84428442, 0x80028382, 0xfffe8002, 0x00000000, // RICON_PHOTO_CAMERA_FLASH
1055
- 0x00000000, 0x02400180, 0x08100420, 0x20041008, 0x23c42004, 0x22442244, 0x3ffc2244, 0x00000000, // RICON_HOUSE
1056
- 0x00000000, 0x1c700000, 0x3ff83ef8, 0x3ff83ff8, 0x0fe01ff0, 0x038007c0, 0x00000100, 0x00000000, // RICON_HEART
1057
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0xe000c000, // RICON_CORNER
1058
- 0x00000000, 0x14001c00, 0x15c01400, 0x15401540, 0x155c1540, 0x15541554, 0x1ddc1554, 0x00000000, // RICON_VERTICAL_BARS
1059
- 0x00000000, 0x03000300, 0x1b001b00, 0x1b601b60, 0x1b6c1b60, 0x1b6c1b6c, 0x1b6c1b6c, 0x00000000, // RICON_VERTICAL_BARS_FILL
1060
- 0x00000000, 0x00000000, 0x403e7ffe, 0x7ffe403e, 0x7ffe0000, 0x43fe43fe, 0x00007ffe, 0x00000000, // RICON_LIFE_BARS
1061
- 0x7ffc0000, 0x43844004, 0x43844284, 0x43844004, 0x42844284, 0x42844284, 0x40044384, 0x00007ffc, // RICON_INFO
1062
- 0x40008000, 0x10002000, 0x04000800, 0x01000200, 0x00400080, 0x00100020, 0x00040008, 0x00010002, // RICON_CROSSLINE
1063
- 0x00000000, 0x1ff01ff0, 0x18301830, 0x1f001830, 0x03001f00, 0x00000300, 0x03000300, 0x00000000, // RICON_HELP
1064
- 0x3ff00000, 0x2abc3550, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x00003ffc, // RICON_FILETYPE_ALPHA
1065
- 0x3ff00000, 0x201c2010, 0x22442184, 0x28142424, 0x29942814, 0x2ff42994, 0x20042004, 0x00003ffc, // RICON_FILETYPE_HOME
1066
- 0x07fe0000, 0x04020402, 0x7fe20402, 0x44224422, 0x44224422, 0x402047fe, 0x40204020, 0x00007fe0, // RICON_LAYERS_VISIBLE
1067
- 0x07fe0000, 0x04020402, 0x7c020402, 0x44024402, 0x44024402, 0x402047fe, 0x40204020, 0x00007fe0, // RICON_LAYERS
1068
- 0x00000000, 0x40027ffe, 0x7ffe4002, 0x40024002, 0x40024002, 0x40024002, 0x7ffe4002, 0x00000000, // RICON_WINDOW
1069
- 0x09100000, 0x09f00910, 0x09100910, 0x00000910, 0x24a2779e, 0x27a224a2, 0x709e20a2, 0x00000000, // RICON_HIDPI
1070
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_200
1071
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_201
1072
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_202
1073
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_203
1074
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_204
1075
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_205
1076
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_206
1077
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_207
1078
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_208
1079
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_209
1080
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_210
1081
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_211
1082
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_212
1083
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_213
1084
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_214
1085
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_215
1086
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_216
1087
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_217
1088
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_218
1089
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_219
1090
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_220
1091
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_221
1092
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_222
1093
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_223
1094
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_224
1095
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_225
1096
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_226
1097
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_227
1098
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_228
1099
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_229
1100
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_230
1101
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_231
1102
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_232
1103
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_233
1104
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_234
1105
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_235
1106
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_236
1107
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_237
1108
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_238
1109
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_239
1110
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_240
1111
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_241
1112
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_242
1113
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_243
1114
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_244
1115
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_245
1116
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_246
1117
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_247
1118
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_248
1119
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_249
1120
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_250
1121
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_251
1122
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_252
1123
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_253
1124
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_254
1125
- 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // RICON_255
877
+ static unsigned int guiIcons[RAYGUI_ICON_MAX_ICONS*RAYGUI_ICON_DATA_ELEMENTS] = {
878
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_NONE
879
+ 0x3ff80000, 0x2f082008, 0x2042207e, 0x40027fc2, 0x40024002, 0x40024002, 0x40024002, 0x00007ffe, // ICON_FOLDER_FILE_OPEN
880
+ 0x3ffe0000, 0x44226422, 0x400247e2, 0x5ffa4002, 0x57ea500a, 0x500a500a, 0x40025ffa, 0x00007ffe, // ICON_FILE_SAVE_CLASSIC
881
+ 0x00000000, 0x0042007e, 0x40027fc2, 0x40024002, 0x41024002, 0x44424282, 0x793e4102, 0x00000100, // ICON_FOLDER_OPEN
882
+ 0x00000000, 0x0042007e, 0x40027fc2, 0x40024002, 0x41024102, 0x44424102, 0x793e4282, 0x00000000, // ICON_FOLDER_SAVE
883
+ 0x3ff00000, 0x201c2010, 0x20042004, 0x21042004, 0x24442284, 0x21042104, 0x20042104, 0x00003ffc, // ICON_FILE_OPEN
884
+ 0x3ff00000, 0x201c2010, 0x20042004, 0x21042004, 0x21042104, 0x22842444, 0x20042104, 0x00003ffc, // ICON_FILE_SAVE
885
+ 0x3ff00000, 0x201c2010, 0x00042004, 0x20041004, 0x20844784, 0x00841384, 0x20042784, 0x00003ffc, // ICON_FILE_EXPORT
886
+ 0x3ff00000, 0x201c2010, 0x20042004, 0x20042004, 0x22042204, 0x22042f84, 0x20042204, 0x00003ffc, // ICON_FILE_ADD
887
+ 0x3ff00000, 0x201c2010, 0x20042004, 0x20042004, 0x25042884, 0x25042204, 0x20042884, 0x00003ffc, // ICON_FILE_DELETE
888
+ 0x3ff00000, 0x201c2010, 0x20042004, 0x20042ff4, 0x20042ff4, 0x20042ff4, 0x20042004, 0x00003ffc, // ICON_FILETYPE_TEXT
889
+ 0x3ff00000, 0x201c2010, 0x27042004, 0x244424c4, 0x26442444, 0x20642664, 0x20042004, 0x00003ffc, // ICON_FILETYPE_AUDIO
890
+ 0x3ff00000, 0x201c2010, 0x26042604, 0x20042004, 0x35442884, 0x2414222c, 0x20042004, 0x00003ffc, // ICON_FILETYPE_IMAGE
891
+ 0x3ff00000, 0x201c2010, 0x20c42004, 0x22442144, 0x22442444, 0x20c42144, 0x20042004, 0x00003ffc, // ICON_FILETYPE_PLAY
892
+ 0x3ff00000, 0x3ffc2ff0, 0x3f3c2ff4, 0x3dbc2eb4, 0x3dbc2bb4, 0x3f3c2eb4, 0x3ffc2ff4, 0x00002ff4, // ICON_FILETYPE_VIDEO
893
+ 0x3ff00000, 0x201c2010, 0x21842184, 0x21842004, 0x21842184, 0x21842184, 0x20042184, 0x00003ffc, // ICON_FILETYPE_INFO
894
+ 0x0ff00000, 0x381c0810, 0x28042804, 0x28042804, 0x28042804, 0x28042804, 0x20102ffc, 0x00003ff0, // ICON_FILE_COPY
895
+ 0x00000000, 0x701c0000, 0x079c1e14, 0x55a000f0, 0x079c00f0, 0x701c1e14, 0x00000000, 0x00000000, // ICON_FILE_CUT
896
+ 0x01c00000, 0x13e41bec, 0x3f841004, 0x204420c4, 0x20442044, 0x20442044, 0x207c2044, 0x00003fc0, // ICON_FILE_PASTE
897
+ 0x00000000, 0x3aa00fe0, 0x2abc2aa0, 0x2aa42aa4, 0x20042aa4, 0x20042004, 0x3ffc2004, 0x00000000, // ICON_CURSOR_HAND
898
+ 0x00000000, 0x003c000c, 0x030800c8, 0x30100c10, 0x10202020, 0x04400840, 0x01800280, 0x00000000, // ICON_CURSOR_POINTER
899
+ 0x00000000, 0x00180000, 0x01f00078, 0x03e007f0, 0x07c003e0, 0x04000e40, 0x00000000, 0x00000000, // ICON_CURSOR_CLASSIC
900
+ 0x00000000, 0x04000000, 0x11000a00, 0x04400a80, 0x01100220, 0x00580088, 0x00000038, 0x00000000, // ICON_PENCIL
901
+ 0x04000000, 0x15000a00, 0x50402880, 0x14102820, 0x05040a08, 0x015c028c, 0x007c00bc, 0x00000000, // ICON_PENCIL_BIG
902
+ 0x01c00000, 0x01400140, 0x01400140, 0x0ff80140, 0x0ff80808, 0x0aa80808, 0x0aa80aa8, 0x00000ff8, // ICON_BRUSH_CLASSIC
903
+ 0x1ffc0000, 0x5ffc7ffe, 0x40004000, 0x00807f80, 0x01c001c0, 0x01c001c0, 0x01c001c0, 0x00000080, // ICON_BRUSH_PAINTER
904
+ 0x00000000, 0x00800000, 0x01c00080, 0x03e001c0, 0x07f003e0, 0x036006f0, 0x000001c0, 0x00000000, // ICON_WATER_DROP
905
+ 0x00000000, 0x3e003800, 0x1f803f80, 0x0c201e40, 0x02080c10, 0x00840104, 0x00380044, 0x00000000, // ICON_COLOR_PICKER
906
+ 0x00000000, 0x07800300, 0x1fe00fc0, 0x3f883fd0, 0x0e021f04, 0x02040402, 0x00f00108, 0x00000000, // ICON_RUBBER
907
+ 0x00c00000, 0x02800140, 0x08200440, 0x20081010, 0x2ffe3004, 0x03f807fc, 0x00e001f0, 0x00000040, // ICON_COLOR_BUCKET
908
+ 0x00000000, 0x21843ffc, 0x01800180, 0x01800180, 0x01800180, 0x01800180, 0x03c00180, 0x00000000, // ICON_TEXT_T
909
+ 0x00800000, 0x01400180, 0x06200340, 0x0c100620, 0x1ff80c10, 0x380c1808, 0x70067004, 0x0000f80f, // ICON_TEXT_A
910
+ 0x78000000, 0x50004000, 0x00004800, 0x03c003c0, 0x03c003c0, 0x00100000, 0x0002000a, 0x0000000e, // ICON_SCALE
911
+ 0x75560000, 0x5e004002, 0x54001002, 0x41001202, 0x408200fe, 0x40820082, 0x40820082, 0x00006afe, // ICON_RESIZE
912
+ 0x00000000, 0x3f003f00, 0x3f003f00, 0x3f003f00, 0x00400080, 0x001c0020, 0x001c001c, 0x00000000, // ICON_FILTER_POINT
913
+ 0x6d800000, 0x00004080, 0x40804080, 0x40800000, 0x00406d80, 0x001c0020, 0x001c001c, 0x00000000, // ICON_FILTER_BILINEAR
914
+ 0x40080000, 0x1ffe2008, 0x14081008, 0x11081208, 0x10481088, 0x10081028, 0x10047ff8, 0x00001002, // ICON_CROP
915
+ 0x00100000, 0x3ffc0010, 0x2ab03550, 0x22b02550, 0x20b02150, 0x20302050, 0x2000fff0, 0x00002000, // ICON_CROP_ALPHA
916
+ 0x40000000, 0x1ff82000, 0x04082808, 0x01082208, 0x00482088, 0x00182028, 0x35542008, 0x00000002, // ICON_SQUARE_TOGGLE
917
+ 0x00000000, 0x02800280, 0x06c006c0, 0x0ea00ee0, 0x1e901eb0, 0x3e883e98, 0x7efc7e8c, 0x00000000, // ICON_SYMMETRY
918
+ 0x01000000, 0x05600100, 0x1d480d50, 0x7d423d44, 0x3d447d42, 0x0d501d48, 0x01000560, 0x00000100, // ICON_SYMMETRY_HORIZONTAL
919
+ 0x01800000, 0x04200240, 0x10080810, 0x00001ff8, 0x00007ffe, 0x0ff01ff8, 0x03c007e0, 0x00000180, // ICON_SYMMETRY_VERTICAL
920
+ 0x00000000, 0x010800f0, 0x02040204, 0x02040204, 0x07f00308, 0x1c000e00, 0x30003800, 0x00000000, // ICON_LENS
921
+ 0x00000000, 0x061803f0, 0x08240c0c, 0x08040814, 0x0c0c0804, 0x23f01618, 0x18002400, 0x00000000, // ICON_LENS_BIG
922
+ 0x00000000, 0x00000000, 0x1c7007c0, 0x638e3398, 0x1c703398, 0x000007c0, 0x00000000, 0x00000000, // ICON_EYE_ON
923
+ 0x00000000, 0x10002000, 0x04700fc0, 0x610e3218, 0x1c703098, 0x001007a0, 0x00000008, 0x00000000, // ICON_EYE_OFF
924
+ 0x00000000, 0x00007ffc, 0x40047ffc, 0x10102008, 0x04400820, 0x02800280, 0x02800280, 0x00000100, // ICON_FILTER_TOP
925
+ 0x00000000, 0x40027ffe, 0x10082004, 0x04200810, 0x02400240, 0x02400240, 0x01400240, 0x000000c0, // ICON_FILTER
926
+ 0x00800000, 0x00800080, 0x00000080, 0x3c9e0000, 0x00000000, 0x00800080, 0x00800080, 0x00000000, // ICON_TARGET_POINT
927
+ 0x00800000, 0x00800080, 0x00800080, 0x3f7e01c0, 0x008001c0, 0x00800080, 0x00800080, 0x00000000, // ICON_TARGET_SMALL
928
+ 0x00800000, 0x00800080, 0x03e00080, 0x3e3e0220, 0x03e00220, 0x00800080, 0x00800080, 0x00000000, // ICON_TARGET_BIG
929
+ 0x01000000, 0x04400280, 0x01000100, 0x43842008, 0x43849ab2, 0x01002008, 0x04400100, 0x01000280, // ICON_TARGET_MOVE
930
+ 0x01000000, 0x04400280, 0x01000100, 0x41042108, 0x41049ff2, 0x01002108, 0x04400100, 0x01000280, // ICON_CURSOR_MOVE
931
+ 0x781e0000, 0x500a4002, 0x04204812, 0x00000240, 0x02400000, 0x48120420, 0x4002500a, 0x0000781e, // ICON_CURSOR_SCALE
932
+ 0x00000000, 0x20003c00, 0x24002800, 0x01000200, 0x00400080, 0x00140024, 0x003c0004, 0x00000000, // ICON_CURSOR_SCALE_RIGHT
933
+ 0x00000000, 0x0004003c, 0x00240014, 0x00800040, 0x02000100, 0x28002400, 0x3c002000, 0x00000000, // ICON_CURSOR_SCALE_LEFT
934
+ 0x00000000, 0x00100020, 0x10101fc8, 0x10001020, 0x10001000, 0x10001000, 0x00001fc0, 0x00000000, // ICON_UNDO
935
+ 0x00000000, 0x08000400, 0x080813f8, 0x00080408, 0x00080008, 0x00080008, 0x000003f8, 0x00000000, // ICON_REDO
936
+ 0x00000000, 0x3ffc0000, 0x20042004, 0x20002000, 0x20402000, 0x3f902020, 0x00400020, 0x00000000, // ICON_REREDO
937
+ 0x00000000, 0x3ffc0000, 0x20042004, 0x27fc2004, 0x20202000, 0x3fc82010, 0x00200010, 0x00000000, // ICON_MUTATE
938
+ 0x00000000, 0x0ff00000, 0x10081818, 0x11801008, 0x10001180, 0x18101020, 0x00100fc8, 0x00000020, // ICON_ROTATE
939
+ 0x00000000, 0x04000200, 0x240429fc, 0x20042204, 0x20442004, 0x3f942024, 0x00400020, 0x00000000, // ICON_REPEAT
940
+ 0x00000000, 0x20001000, 0x22104c0e, 0x00801120, 0x11200040, 0x4c0e2210, 0x10002000, 0x00000000, // ICON_SHUFFLE
941
+ 0x7ffe0000, 0x50024002, 0x44024802, 0x41024202, 0x40424082, 0x40124022, 0x4002400a, 0x00007ffe, // ICON_EMPTYBOX
942
+ 0x00800000, 0x03e00080, 0x08080490, 0x3c9e0808, 0x08080808, 0x03e00490, 0x00800080, 0x00000000, // ICON_TARGET
943
+ 0x00800000, 0x00800080, 0x00800080, 0x3ffe01c0, 0x008001c0, 0x00800080, 0x00800080, 0x00000000, // ICON_TARGET_SMALL_FILL
944
+ 0x00800000, 0x00800080, 0x03e00080, 0x3ffe03e0, 0x03e003e0, 0x00800080, 0x00800080, 0x00000000, // ICON_TARGET_BIG_FILL
945
+ 0x01000000, 0x07c00380, 0x01000100, 0x638c2008, 0x638cfbbe, 0x01002008, 0x07c00100, 0x01000380, // ICON_TARGET_MOVE_FILL
946
+ 0x01000000, 0x07c00380, 0x01000100, 0x610c2108, 0x610cfffe, 0x01002108, 0x07c00100, 0x01000380, // ICON_CURSOR_MOVE_FILL
947
+ 0x781e0000, 0x6006700e, 0x04204812, 0x00000240, 0x02400000, 0x48120420, 0x700e6006, 0x0000781e, // ICON_CURSOR_SCALE_FILL
948
+ 0x00000000, 0x38003c00, 0x24003000, 0x01000200, 0x00400080, 0x000c0024, 0x003c001c, 0x00000000, // ICON_CURSOR_SCALE_RIGHT_FILL
949
+ 0x00000000, 0x001c003c, 0x0024000c, 0x00800040, 0x02000100, 0x30002400, 0x3c003800, 0x00000000, // ICON_CURSOR_SCALE_LEFT_FILL
950
+ 0x00000000, 0x00300020, 0x10301ff8, 0x10001020, 0x10001000, 0x10001000, 0x00001fc0, 0x00000000, // ICON_UNDO_FILL
951
+ 0x00000000, 0x0c000400, 0x0c081ff8, 0x00080408, 0x00080008, 0x00080008, 0x000003f8, 0x00000000, // ICON_REDO_FILL
952
+ 0x00000000, 0x3ffc0000, 0x20042004, 0x20002000, 0x20402000, 0x3ff02060, 0x00400060, 0x00000000, // ICON_REREDO_FILL
953
+ 0x00000000, 0x3ffc0000, 0x20042004, 0x27fc2004, 0x20202000, 0x3ff82030, 0x00200030, 0x00000000, // ICON_MUTATE_FILL
954
+ 0x00000000, 0x0ff00000, 0x10081818, 0x11801008, 0x10001180, 0x18301020, 0x00300ff8, 0x00000020, // ICON_ROTATE_FILL
955
+ 0x00000000, 0x06000200, 0x26042ffc, 0x20042204, 0x20442004, 0x3ff42064, 0x00400060, 0x00000000, // ICON_REPEAT_FILL
956
+ 0x00000000, 0x30001000, 0x32107c0e, 0x00801120, 0x11200040, 0x7c0e3210, 0x10003000, 0x00000000, // ICON_SHUFFLE_FILL
957
+ 0x00000000, 0x30043ffc, 0x24042804, 0x21042204, 0x20442084, 0x20142024, 0x3ffc200c, 0x00000000, // ICON_EMPTYBOX_SMALL
958
+ 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // ICON_BOX
959
+ 0x00000000, 0x23c43ffc, 0x23c423c4, 0x200423c4, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // ICON_BOX_TOP
960
+ 0x00000000, 0x3e043ffc, 0x3e043e04, 0x20043e04, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // ICON_BOX_TOP_RIGHT
961
+ 0x00000000, 0x20043ffc, 0x20042004, 0x3e043e04, 0x3e043e04, 0x20042004, 0x3ffc2004, 0x00000000, // ICON_BOX_RIGHT
962
+ 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x3e042004, 0x3e043e04, 0x3ffc3e04, 0x00000000, // ICON_BOX_BOTTOM_RIGHT
963
+ 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x23c42004, 0x23c423c4, 0x3ffc23c4, 0x00000000, // ICON_BOX_BOTTOM
964
+ 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x207c2004, 0x207c207c, 0x3ffc207c, 0x00000000, // ICON_BOX_BOTTOM_LEFT
965
+ 0x00000000, 0x20043ffc, 0x20042004, 0x207c207c, 0x207c207c, 0x20042004, 0x3ffc2004, 0x00000000, // ICON_BOX_LEFT
966
+ 0x00000000, 0x207c3ffc, 0x207c207c, 0x2004207c, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000, // ICON_BOX_TOP_LEFT
967
+ 0x00000000, 0x20043ffc, 0x20042004, 0x23c423c4, 0x23c423c4, 0x20042004, 0x3ffc2004, 0x00000000, // ICON_BOX_CENTER
968
+ 0x7ffe0000, 0x40024002, 0x47e24182, 0x4ff247e2, 0x47e24ff2, 0x418247e2, 0x40024002, 0x00007ffe, // ICON_BOX_CIRCLE_MASK
969
+ 0x7fff0000, 0x40014001, 0x40014001, 0x49555ddd, 0x4945495d, 0x400149c5, 0x40014001, 0x00007fff, // ICON_POT
970
+ 0x7ffe0000, 0x53327332, 0x44ce4cce, 0x41324332, 0x404e40ce, 0x48125432, 0x4006540e, 0x00007ffe, // ICON_ALPHA_MULTIPLY
971
+ 0x7ffe0000, 0x53327332, 0x44ce4cce, 0x41324332, 0x5c4e40ce, 0x44124432, 0x40065c0e, 0x00007ffe, // ICON_ALPHA_CLEAR
972
+ 0x7ffe0000, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x00007ffe, // ICON_DITHERING
973
+ 0x07fe0000, 0x1ffa0002, 0x7fea000a, 0x402a402a, 0x5b2a512a, 0x5128552a, 0x40205128, 0x00007fe0, // ICON_MIPMAPS
974
+ 0x00000000, 0x1ff80000, 0x12481248, 0x12481ff8, 0x1ff81248, 0x12481248, 0x00001ff8, 0x00000000, // ICON_BOX_GRID
975
+ 0x12480000, 0x7ffe1248, 0x12481248, 0x12487ffe, 0x7ffe1248, 0x12481248, 0x12487ffe, 0x00001248, // ICON_GRID
976
+ 0x00000000, 0x1c380000, 0x1c3817e8, 0x08100810, 0x08100810, 0x17e81c38, 0x00001c38, 0x00000000, // ICON_BOX_CORNERS_SMALL
977
+ 0x700e0000, 0x700e5ffa, 0x20042004, 0x20042004, 0x20042004, 0x20042004, 0x5ffa700e, 0x0000700e, // ICON_BOX_CORNERS_BIG
978
+ 0x3f7e0000, 0x21422142, 0x21422142, 0x00003f7e, 0x21423f7e, 0x21422142, 0x3f7e2142, 0x00000000, // ICON_FOUR_BOXES
979
+ 0x00000000, 0x3bb80000, 0x3bb83bb8, 0x3bb80000, 0x3bb83bb8, 0x3bb80000, 0x3bb83bb8, 0x00000000, // ICON_GRID_FILL
980
+ 0x7ffe0000, 0x7ffe7ffe, 0x77fe7000, 0x77fe77fe, 0x777e7700, 0x777e777e, 0x777e777e, 0x0000777e, // ICON_BOX_MULTISIZE
981
+ 0x781e0000, 0x40024002, 0x00004002, 0x01800000, 0x00000180, 0x40020000, 0x40024002, 0x0000781e, // ICON_ZOOM_SMALL
982
+ 0x781e0000, 0x40024002, 0x00004002, 0x03c003c0, 0x03c003c0, 0x40020000, 0x40024002, 0x0000781e, // ICON_ZOOM_MEDIUM
983
+ 0x781e0000, 0x40024002, 0x07e04002, 0x07e007e0, 0x07e007e0, 0x400207e0, 0x40024002, 0x0000781e, // ICON_ZOOM_BIG
984
+ 0x781e0000, 0x5ffa4002, 0x1ff85ffa, 0x1ff81ff8, 0x1ff81ff8, 0x5ffa1ff8, 0x40025ffa, 0x0000781e, // ICON_ZOOM_ALL
985
+ 0x00000000, 0x2004381c, 0x00002004, 0x00000000, 0x00000000, 0x20040000, 0x381c2004, 0x00000000, // ICON_ZOOM_CENTER
986
+ 0x00000000, 0x1db80000, 0x10081008, 0x10080000, 0x00001008, 0x10081008, 0x00001db8, 0x00000000, // ICON_BOX_DOTS_SMALL
987
+ 0x35560000, 0x00002002, 0x00002002, 0x00002002, 0x00002002, 0x00002002, 0x35562002, 0x00000000, // ICON_BOX_DOTS_BIG
988
+ 0x7ffe0000, 0x40024002, 0x48124ff2, 0x49924812, 0x48124992, 0x4ff24812, 0x40024002, 0x00007ffe, // ICON_BOX_CONCENTRIC
989
+ 0x00000000, 0x10841ffc, 0x10841084, 0x1ffc1084, 0x10841084, 0x10841084, 0x00001ffc, 0x00000000, // ICON_BOX_GRID_BIG
990
+ 0x00000000, 0x00000000, 0x10000000, 0x04000800, 0x01040200, 0x00500088, 0x00000020, 0x00000000, // ICON_OK_TICK
991
+ 0x00000000, 0x10080000, 0x04200810, 0x01800240, 0x02400180, 0x08100420, 0x00001008, 0x00000000, // ICON_CROSS
992
+ 0x00000000, 0x02000000, 0x00800100, 0x00200040, 0x00200010, 0x00800040, 0x02000100, 0x00000000, // ICON_ARROW_LEFT
993
+ 0x00000000, 0x00400000, 0x01000080, 0x04000200, 0x04000800, 0x01000200, 0x00400080, 0x00000000, // ICON_ARROW_RIGHT
994
+ 0x00000000, 0x00000000, 0x00000000, 0x08081004, 0x02200410, 0x00800140, 0x00000000, 0x00000000, // ICON_ARROW_DOWN
995
+ 0x00000000, 0x00000000, 0x01400080, 0x04100220, 0x10040808, 0x00000000, 0x00000000, 0x00000000, // ICON_ARROW_UP
996
+ 0x00000000, 0x02000000, 0x03800300, 0x03e003c0, 0x03e003f0, 0x038003c0, 0x02000300, 0x00000000, // ICON_ARROW_LEFT_FILL
997
+ 0x00000000, 0x00400000, 0x01c000c0, 0x07c003c0, 0x07c00fc0, 0x01c003c0, 0x004000c0, 0x00000000, // ICON_ARROW_RIGHT_FILL
998
+ 0x00000000, 0x00000000, 0x00000000, 0x0ff81ffc, 0x03e007f0, 0x008001c0, 0x00000000, 0x00000000, // ICON_ARROW_DOWN_FILL
999
+ 0x00000000, 0x00000000, 0x01c00080, 0x07f003e0, 0x1ffc0ff8, 0x00000000, 0x00000000, 0x00000000, // ICON_ARROW_UP_FILL
1000
+ 0x00000000, 0x18a008c0, 0x32881290, 0x24822686, 0x26862482, 0x12903288, 0x08c018a0, 0x00000000, // ICON_AUDIO
1001
+ 0x00000000, 0x04800780, 0x004000c0, 0x662000f0, 0x08103c30, 0x130a0e18, 0x0000318e, 0x00000000, // ICON_FX
1002
+ 0x00000000, 0x00800000, 0x08880888, 0x2aaa0a8a, 0x0a8a2aaa, 0x08880888, 0x00000080, 0x00000000, // ICON_WAVE
1003
+ 0x00000000, 0x00600000, 0x01080090, 0x02040108, 0x42044204, 0x24022402, 0x00001800, 0x00000000, // ICON_WAVE_SINUS
1004
+ 0x00000000, 0x07f80000, 0x04080408, 0x04080408, 0x04080408, 0x7c0e0408, 0x00000000, 0x00000000, // ICON_WAVE_SQUARE
1005
+ 0x00000000, 0x00000000, 0x00a00040, 0x22084110, 0x08021404, 0x00000000, 0x00000000, 0x00000000, // ICON_WAVE_TRIANGULAR
1006
+ 0x00000000, 0x00000000, 0x04200000, 0x01800240, 0x02400180, 0x00000420, 0x00000000, 0x00000000, // ICON_CROSS_SMALL
1007
+ 0x00000000, 0x18380000, 0x12281428, 0x10a81128, 0x112810a8, 0x14281228, 0x00001838, 0x00000000, // ICON_PLAYER_PREVIOUS
1008
+ 0x00000000, 0x18000000, 0x11801600, 0x10181060, 0x10601018, 0x16001180, 0x00001800, 0x00000000, // ICON_PLAYER_PLAY_BACK
1009
+ 0x00000000, 0x00180000, 0x01880068, 0x18080608, 0x06081808, 0x00680188, 0x00000018, 0x00000000, // ICON_PLAYER_PLAY
1010
+ 0x00000000, 0x1e780000, 0x12481248, 0x12481248, 0x12481248, 0x12481248, 0x00001e78, 0x00000000, // ICON_PLAYER_PAUSE
1011
+ 0x00000000, 0x1ff80000, 0x10081008, 0x10081008, 0x10081008, 0x10081008, 0x00001ff8, 0x00000000, // ICON_PLAYER_STOP
1012
+ 0x00000000, 0x1c180000, 0x14481428, 0x15081488, 0x14881508, 0x14281448, 0x00001c18, 0x00000000, // ICON_PLAYER_NEXT
1013
+ 0x00000000, 0x03c00000, 0x08100420, 0x10081008, 0x10081008, 0x04200810, 0x000003c0, 0x00000000, // ICON_PLAYER_RECORD
1014
+ 0x00000000, 0x0c3007e0, 0x13c81818, 0x14281668, 0x14281428, 0x1c381c38, 0x08102244, 0x00000000, // ICON_MAGNET
1015
+ 0x07c00000, 0x08200820, 0x3ff80820, 0x23882008, 0x21082388, 0x20082108, 0x1ff02008, 0x00000000, // ICON_LOCK_CLOSE
1016
+ 0x07c00000, 0x08000800, 0x3ff80800, 0x23882008, 0x21082388, 0x20082108, 0x1ff02008, 0x00000000, // ICON_LOCK_OPEN
1017
+ 0x01c00000, 0x0c180770, 0x3086188c, 0x60832082, 0x60034781, 0x30062002, 0x0c18180c, 0x01c00770, // ICON_CLOCK
1018
+ 0x0a200000, 0x1b201b20, 0x04200e20, 0x04200420, 0x04700420, 0x0e700e70, 0x0e700e70, 0x04200e70, // ICON_TOOLS
1019
+ 0x01800000, 0x3bdc318c, 0x0ff01ff8, 0x7c3e1e78, 0x1e787c3e, 0x1ff80ff0, 0x318c3bdc, 0x00000180, // ICON_GEAR
1020
+ 0x01800000, 0x3ffc318c, 0x1c381ff8, 0x781e1818, 0x1818781e, 0x1ff81c38, 0x318c3ffc, 0x00000180, // ICON_GEAR_BIG
1021
+ 0x00000000, 0x08080ff8, 0x08081ffc, 0x0aa80aa8, 0x0aa80aa8, 0x0aa80aa8, 0x08080aa8, 0x00000ff8, // ICON_BIN
1022
+ 0x00000000, 0x00000000, 0x20043ffc, 0x08043f84, 0x04040f84, 0x04040784, 0x000007fc, 0x00000000, // ICON_HAND_POINTER
1023
+ 0x00000000, 0x24400400, 0x00001480, 0x6efe0e00, 0x00000e00, 0x24401480, 0x00000400, 0x00000000, // ICON_LASER
1024
+ 0x00000000, 0x03c00000, 0x08300460, 0x11181118, 0x11181118, 0x04600830, 0x000003c0, 0x00000000, // ICON_COIN
1025
+ 0x00000000, 0x10880080, 0x06c00810, 0x366c07e0, 0x07e00240, 0x00001768, 0x04200240, 0x00000000, // ICON_EXPLOSION
1026
+ 0x00000000, 0x3d280000, 0x2528252c, 0x3d282528, 0x05280528, 0x05e80528, 0x00000000, 0x00000000, // ICON_1UP
1027
+ 0x01800000, 0x03c003c0, 0x018003c0, 0x0ff007e0, 0x0bd00bd0, 0x0a500bd0, 0x02400240, 0x02400240, // ICON_PLAYER
1028
+ 0x01800000, 0x03c003c0, 0x118013c0, 0x03c81ff8, 0x07c003c8, 0x04400440, 0x0c080478, 0x00000000, // ICON_PLAYER_JUMP
1029
+ 0x3ff80000, 0x30183ff8, 0x30183018, 0x3ff83ff8, 0x03000300, 0x03c003c0, 0x03e00300, 0x000003e0, // ICON_KEY
1030
+ 0x3ff80000, 0x3ff83ff8, 0x33983ff8, 0x3ff83398, 0x3ff83ff8, 0x00000540, 0x0fe00aa0, 0x00000fe0, // ICON_DEMON
1031
+ 0x00000000, 0x0ff00000, 0x20041008, 0x25442004, 0x10082004, 0x06000bf0, 0x00000300, 0x00000000, // ICON_TEXT_POPUP
1032
+ 0x00000000, 0x11440000, 0x07f00be8, 0x1c1c0e38, 0x1c1c0c18, 0x07f00e38, 0x11440be8, 0x00000000, // ICON_GEAR_EX
1033
+ 0x00000000, 0x20080000, 0x0c601010, 0x07c00fe0, 0x07c007c0, 0x0c600fe0, 0x20081010, 0x00000000, // ICON_CRACK
1034
+ 0x00000000, 0x20080000, 0x0c601010, 0x04400fe0, 0x04405554, 0x0c600fe0, 0x20081010, 0x00000000, // ICON_CRACK_POINTS
1035
+ 0x00000000, 0x00800080, 0x01c001c0, 0x1ffc3ffe, 0x03e007f0, 0x07f003e0, 0x0c180770, 0x00000808, // ICON_STAR
1036
+ 0x0ff00000, 0x08180810, 0x08100818, 0x0a100810, 0x08180810, 0x08100818, 0x08100810, 0x00001ff8, // ICON_DOOR
1037
+ 0x0ff00000, 0x08100810, 0x08100810, 0x10100010, 0x4f902010, 0x10102010, 0x08100010, 0x00000ff0, // ICON_EXIT
1038
+ 0x00040000, 0x001f000e, 0x0ef40004, 0x12f41284, 0x0ef41214, 0x10040004, 0x7ffc3004, 0x10003000, // ICON_MODE_2D
1039
+ 0x78040000, 0x501f600e, 0x0ef44004, 0x12f41284, 0x0ef41284, 0x10140004, 0x7ffc300c, 0x10003000, // ICON_MODE_3D
1040
+ 0x7fe00000, 0x50286030, 0x47fe4804, 0x44224402, 0x44224422, 0x241275e2, 0x0c06140a, 0x000007fe, // ICON_CUBE
1041
+ 0x7fe00000, 0x5ff87ff0, 0x47fe4ffc, 0x44224402, 0x44224422, 0x241275e2, 0x0c06140a, 0x000007fe, // ICON_CUBE_FACE_TOP
1042
+ 0x7fe00000, 0x50386030, 0x47fe483c, 0x443e443e, 0x443e443e, 0x241e75fe, 0x0c06140e, 0x000007fe, // ICON_CUBE_FACE_LEFT
1043
+ 0x7fe00000, 0x50286030, 0x47fe4804, 0x47fe47fe, 0x47fe47fe, 0x27fe77fe, 0x0ffe17fe, 0x000007fe, // ICON_CUBE_FACE_FRONT
1044
+ 0x7fe00000, 0x50286030, 0x47fe4804, 0x44224402, 0x44224422, 0x3ff27fe2, 0x0ffe1ffa, 0x000007fe, // ICON_CUBE_FACE_BOTTOM
1045
+ 0x7fe00000, 0x70286030, 0x7ffe7804, 0x7c227c02, 0x7c227c22, 0x3c127de2, 0x0c061c0a, 0x000007fe, // ICON_CUBE_FACE_RIGHT
1046
+ 0x7fe00000, 0x7fe87ff0, 0x7ffe7fe4, 0x7fe27fe2, 0x7fe27fe2, 0x24127fe2, 0x0c06140a, 0x000007fe, // ICON_CUBE_FACE_BACK
1047
+ 0x00000000, 0x2a0233fe, 0x22022602, 0x22022202, 0x2a022602, 0x00a033fe, 0x02080110, 0x00000000, // ICON_CAMERA
1048
+ 0x00000000, 0x200c3ffc, 0x000c000c, 0x3ffc000c, 0x30003000, 0x30003000, 0x3ffc3004, 0x00000000, // ICON_SPECIAL
1049
+ 0x00000000, 0x0022003e, 0x012201e2, 0x0100013e, 0x01000100, 0x79000100, 0x4f004900, 0x00007800, // ICON_LINK_NET
1050
+ 0x00000000, 0x44007c00, 0x45004600, 0x00627cbe, 0x00620022, 0x45007cbe, 0x44004600, 0x00007c00, // ICON_LINK_BOXES
1051
+ 0x00000000, 0x0044007c, 0x0010007c, 0x3f100010, 0x3f1021f0, 0x3f100010, 0x3f0021f0, 0x00000000, // ICON_LINK_MULTI
1052
+ 0x00000000, 0x0044007c, 0x00440044, 0x0010007c, 0x00100010, 0x44107c10, 0x440047f0, 0x00007c00, // ICON_LINK
1053
+ 0x00000000, 0x0044007c, 0x00440044, 0x0000007c, 0x00000010, 0x44007c10, 0x44004550, 0x00007c00, // ICON_LINK_BROKE
1054
+ 0x02a00000, 0x22a43ffc, 0x20042004, 0x20042ff4, 0x20042ff4, 0x20042ff4, 0x20042004, 0x00003ffc, // ICON_TEXT_NOTES
1055
+ 0x3ffc0000, 0x20042004, 0x245e27c4, 0x27c42444, 0x2004201e, 0x201e2004, 0x20042004, 0x00003ffc, // ICON_NOTEBOOK
1056
+ 0x00000000, 0x07e00000, 0x04200420, 0x24243ffc, 0x24242424, 0x24242424, 0x3ffc2424, 0x00000000, // ICON_SUITCASE
1057
+ 0x00000000, 0x0fe00000, 0x08200820, 0x40047ffc, 0x7ffc5554, 0x40045554, 0x7ffc4004, 0x00000000, // ICON_SUITCASE_ZIP
1058
+ 0x00000000, 0x20043ffc, 0x3ffc2004, 0x13c81008, 0x100813c8, 0x10081008, 0x1ff81008, 0x00000000, // ICON_MAILBOX
1059
+ 0x00000000, 0x40027ffe, 0x5ffa5ffa, 0x5ffa5ffa, 0x40025ffa, 0x03c07ffe, 0x1ff81ff8, 0x00000000, // ICON_MONITOR
1060
+ 0x0ff00000, 0x6bfe7ffe, 0x7ffe7ffe, 0x68167ffe, 0x08106816, 0x08100810, 0x0ff00810, 0x00000000, // ICON_PRINTER
1061
+ 0x3ff80000, 0xfffe2008, 0x870a8002, 0x904a888a, 0x904a904a, 0x870a888a, 0xfffe8002, 0x00000000, // ICON_PHOTO_CAMERA
1062
+ 0x0fc00000, 0xfcfe0cd8, 0x8002fffe, 0x84428382, 0x84428442, 0x80028382, 0xfffe8002, 0x00000000, // ICON_PHOTO_CAMERA_FLASH
1063
+ 0x00000000, 0x02400180, 0x08100420, 0x20041008, 0x23c42004, 0x22442244, 0x3ffc2244, 0x00000000, // ICON_HOUSE
1064
+ 0x00000000, 0x1c700000, 0x3ff83ef8, 0x3ff83ff8, 0x0fe01ff0, 0x038007c0, 0x00000100, 0x00000000, // ICON_HEART
1065
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0xe000c000, // ICON_CORNER
1066
+ 0x00000000, 0x14001c00, 0x15c01400, 0x15401540, 0x155c1540, 0x15541554, 0x1ddc1554, 0x00000000, // ICON_VERTICAL_BARS
1067
+ 0x00000000, 0x03000300, 0x1b001b00, 0x1b601b60, 0x1b6c1b60, 0x1b6c1b6c, 0x1b6c1b6c, 0x00000000, // ICON_VERTICAL_BARS_FILL
1068
+ 0x00000000, 0x00000000, 0x403e7ffe, 0x7ffe403e, 0x7ffe0000, 0x43fe43fe, 0x00007ffe, 0x00000000, // ICON_LIFE_BARS
1069
+ 0x7ffc0000, 0x43844004, 0x43844284, 0x43844004, 0x42844284, 0x42844284, 0x40044384, 0x00007ffc, // ICON_INFO
1070
+ 0x40008000, 0x10002000, 0x04000800, 0x01000200, 0x00400080, 0x00100020, 0x00040008, 0x00010002, // ICON_CROSSLINE
1071
+ 0x00000000, 0x1ff01ff0, 0x18301830, 0x1f001830, 0x03001f00, 0x00000300, 0x03000300, 0x00000000, // ICON_HELP
1072
+ 0x3ff00000, 0x2abc3550, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x00003ffc, // ICON_FILETYPE_ALPHA
1073
+ 0x3ff00000, 0x201c2010, 0x22442184, 0x28142424, 0x29942814, 0x2ff42994, 0x20042004, 0x00003ffc, // ICON_FILETYPE_HOME
1074
+ 0x07fe0000, 0x04020402, 0x7fe20402, 0x44224422, 0x44224422, 0x402047fe, 0x40204020, 0x00007fe0, // ICON_LAYERS_VISIBLE
1075
+ 0x07fe0000, 0x04020402, 0x7c020402, 0x44024402, 0x44024402, 0x402047fe, 0x40204020, 0x00007fe0, // ICON_LAYERS
1076
+ 0x00000000, 0x40027ffe, 0x7ffe4002, 0x40024002, 0x40024002, 0x40024002, 0x7ffe4002, 0x00000000, // ICON_WINDOW
1077
+ 0x09100000, 0x09f00910, 0x09100910, 0x00000910, 0x24a2779e, 0x27a224a2, 0x709e20a2, 0x00000000, // ICON_HIDPI
1078
+ 0x3ff00000, 0x201c2010, 0x2a842e84, 0x2e842a84, 0x2ba42004, 0x2aa42aa4, 0x20042ba4, 0x00003ffc, // ICON_FILETYPE_BINARY
1079
+ 0x00000000, 0x00000000, 0x00120012, 0x4a5e4bd2, 0x485233d2, 0x00004bd2, 0x00000000, 0x00000000, // ICON_HEX
1080
+ 0x01800000, 0x381c0660, 0x23c42004, 0x23c42044, 0x13c82204, 0x08101008, 0x02400420, 0x00000180, // ICON_SHIELD
1081
+ 0x007e0000, 0x20023fc2, 0x40227fe2, 0x400a403a, 0x400a400a, 0x400a400a, 0x4008400e, 0x00007ff8, // ICON_FILE_NEW
1082
+ 0x00000000, 0x0042007e, 0x40027fc2, 0x44024002, 0x5f024402, 0x44024402, 0x7ffe4002, 0x00000000, // ICON_FOLDER_ADD
1083
+ 0x44220000, 0x12482244, 0xf3cf0000, 0x14280420, 0x48122424, 0x08100810, 0x1ff81008, 0x03c00420, // ICON_ALARM
1084
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_206
1085
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_207
1086
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_208
1087
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_209
1088
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_210
1089
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_211
1090
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_212
1091
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_213
1092
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_214
1093
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_215
1094
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_216
1095
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_217
1096
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_218
1097
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_219
1098
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_220
1099
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_221
1100
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_222
1101
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_223
1102
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_224
1103
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_225
1104
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_226
1105
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_227
1106
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_228
1107
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_229
1108
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_230
1109
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_231
1110
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_232
1111
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_233
1112
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_234
1113
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_235
1114
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_236
1115
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_237
1116
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_238
1117
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_239
1118
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_240
1119
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_241
1120
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_242
1121
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_243
1122
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_244
1123
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_245
1124
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_246
1125
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_247
1126
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_248
1127
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_249
1128
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_250
1129
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_251
1130
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_252
1131
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_253
1132
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_254
1133
+ 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, // ICON_255
1126
1134
  };
1127
1135
 
1128
- #endif // RAYGUI_CUSTOM_RICONS
1129
-
1130
- #endif // !RAYGUI_NO_RICONS
1136
+ #endif // !RAYGUI_NO_ICONS && !RAYGUI_CUSTOM_ICONS
1131
1137
 
1132
- #ifndef RICON_SIZE
1133
- #define RICON_SIZE 0
1138
+ #ifndef RAYGUI_ICON_SIZE
1139
+ #define RAYGUI_ICON_SIZE 0
1134
1140
  #endif
1135
1141
 
1136
1142
  #define RAYGUI_MAX_CONTROLS 16 // Maximum number of standard controls
@@ -1146,11 +1152,13 @@ typedef enum { BORDER = 0, BASE, TEXT, OTHER } GuiPropertyElement;
1146
1152
  //----------------------------------------------------------------------------------
1147
1153
  // Global Variables Definition
1148
1154
  //----------------------------------------------------------------------------------
1149
- static GuiControlState guiState = GUI_STATE_NORMAL;
1155
+ static GuiState guiState = STATE_NORMAL; // Gui global state, if !STATE_NORMAL, forces defined state
1156
+
1157
+ static Font guiFont = { 0 }; // Gui current font (WARNING: highly coupled to raylib)
1158
+ static bool guiLocked = false; // Gui lock state (no inputs processed)
1159
+ static float guiAlpha = 1.0f; // Gui element transpacency on drawing
1150
1160
 
1151
- static Font guiFont = { 0 }; // Gui current font (WARNING: highly coupled to raylib)
1152
- static bool guiLocked = false; // Gui lock state (no inputs processed)
1153
- static float guiAlpha = 1.0f; // Gui element transpacency on drawing
1161
+ static unsigned int guiIconScale = 1; // Gui icon default scale (if icons enabled)
1154
1162
 
1155
1163
  //----------------------------------------------------------------------------------
1156
1164
  // Style data array for all gui style properties (allocated on data segment by default)
@@ -1166,7 +1174,7 @@ static float guiAlpha = 1.0f; // Gui element transpacency on drawing
1166
1174
  //----------------------------------------------------------------------------------
1167
1175
  static unsigned int guiStyle[RAYGUI_MAX_CONTROLS*(RAYGUI_MAX_PROPS_BASE + RAYGUI_MAX_PROPS_EXTENDED)] = { 0 };
1168
1176
 
1169
- static bool guiStyleLoaded = false; // Style loaded flag for lazy style initialization
1177
+ static bool guiStyleLoaded = false; // Style loaded flag for lazy style initialization
1170
1178
 
1171
1179
  //----------------------------------------------------------------------------------
1172
1180
  // Standalone Mode Functions Declaration
@@ -1245,18 +1253,22 @@ static const char *GetTextIcon(const char *text, int *iconId); // Get text icon
1245
1253
  static void GuiDrawText(const char *text, Rectangle bounds, int alignment, Color tint); // Gui draw text using default font
1246
1254
  static void GuiDrawRectangle(Rectangle rec, int borderWidth, Color borderColor, Color color); // Gui draw rectangle using default raygui style
1247
1255
 
1248
- static const char **GuiTextSplit(const char *text, int *count, int *textRow); // Split controls text into multiple strings
1256
+ static const char **GuiTextSplit(const char *text, int *count, int *textRow); // Split controls text into multiple strings
1249
1257
  static Vector3 ConvertHSVtoRGB(Vector3 hsv); // Convert color data from HSV to RGB
1250
1258
  static Vector3 ConvertRGBtoHSV(Vector3 rgb); // Convert color data from RGB to HSV
1251
1259
 
1260
+ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue); // Scroll bar control, used by GuiScrollPanel()
1261
+
1252
1262
  //----------------------------------------------------------------------------------
1253
1263
  // Gui Setup Functions Definition
1254
1264
  //----------------------------------------------------------------------------------
1255
1265
  // Enable gui global state
1256
- void GuiEnable(void) { guiState = GUI_STATE_NORMAL; }
1266
+ // NOTE: We check for STATE_DISABLED to avoid messing custom global state setups
1267
+ void GuiEnable(void) { if (guiState == STATE_DISABLED) guiState = STATE_NORMAL; }
1257
1268
 
1258
1269
  // Disable gui global state
1259
- void GuiDisable(void) { guiState = GUI_STATE_DISABLED; }
1270
+ // NOTE: We check for STATE_NORMAL to avoid messing custom global state setups
1271
+ void GuiDisable(void) { if (guiState == STATE_NORMAL) guiState = STATE_DISABLED; }
1260
1272
 
1261
1273
  // Lock gui global state
1262
1274
  void GuiLock(void) { guiLocked = true; }
@@ -1277,7 +1289,7 @@ void GuiFade(float alpha)
1277
1289
  }
1278
1290
 
1279
1291
  // Set gui state (global state)
1280
- void GuiSetState(int state) { guiState = (GuiControlState)state; }
1292
+ void GuiSetState(int state) { guiState = (GuiState)state; }
1281
1293
 
1282
1294
  // Get gui state (global state)
1283
1295
  int GuiGetState(void) { return guiState; }
@@ -1331,19 +1343,21 @@ int GuiGetStyle(int control, int property)
1331
1343
  // Window Box control
1332
1344
  bool GuiWindowBox(Rectangle bounds, const char *title)
1333
1345
  {
1346
+ // Window title bar height (including borders)
1334
1347
  // NOTE: This define is also used by GuiMessageBox() and GuiTextInputBox()
1335
- #define WINDOW_STATUSBAR_HEIGHT 22
1348
+ #if !defined(RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT)
1349
+ #define RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT 24
1350
+ #endif
1336
1351
 
1337
- //GuiControlState state = guiState;
1352
+ //GuiState state = guiState;
1338
1353
  bool clicked = false;
1339
1354
 
1340
- int statusBarHeight = WINDOW_STATUSBAR_HEIGHT + 2*GuiGetStyle(STATUSBAR, BORDER_WIDTH);
1341
- statusBarHeight += (statusBarHeight%2);
1355
+ int statusBarHeight = RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT;
1342
1356
 
1343
1357
  Rectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)statusBarHeight };
1344
1358
  if (bounds.height < statusBarHeight*2.0f) bounds.height = statusBarHeight*2.0f;
1345
1359
 
1346
- Rectangle windowPanel = { bounds.x, bounds.y + (float)statusBarHeight - 1, bounds.width, bounds.height - (float)statusBarHeight };
1360
+ Rectangle windowPanel = { bounds.x, bounds.y + (float)statusBarHeight - 1, bounds.width, bounds.height - (float)statusBarHeight + 1 };
1347
1361
  Rectangle closeButtonRec = { statusBar.x + statusBar.width - GuiGetStyle(STATUSBAR, BORDER_WIDTH) - 20,
1348
1362
  statusBar.y + statusBarHeight/2.0f - 18.0f/2.0f, 18, 18 };
1349
1363
 
@@ -1355,17 +1369,17 @@ bool GuiWindowBox(Rectangle bounds, const char *title)
1355
1369
  // Draw control
1356
1370
  //--------------------------------------------------------------------
1357
1371
  GuiStatusBar(statusBar, title); // Draw window header as status bar
1358
- GuiPanel(windowPanel); // Draw window base
1372
+ GuiPanel(windowPanel, NULL); // Draw window base
1359
1373
 
1360
1374
  // Draw window close button
1361
1375
  int tempBorderWidth = GuiGetStyle(BUTTON, BORDER_WIDTH);
1362
1376
  int tempTextAlignment = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
1363
1377
  GuiSetStyle(BUTTON, BORDER_WIDTH, 1);
1364
- GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
1365
- #if defined(RAYGUI_NO_RICONS)
1378
+ GuiSetStyle(BUTTON, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
1379
+ #if defined(RAYGUI_NO_ICONS)
1366
1380
  clicked = GuiButton(closeButtonRec, "x");
1367
1381
  #else
1368
- clicked = GuiButton(closeButtonRec, GuiIconText(RICON_CROSS_SMALL, NULL));
1382
+ clicked = GuiButton(closeButtonRec, GuiIconText(ICON_CROSS_SMALL, NULL));
1369
1383
  #endif
1370
1384
  GuiSetStyle(BUTTON, BORDER_WIDTH, tempBorderWidth);
1371
1385
  GuiSetStyle(BUTTON, TEXT_ALIGNMENT, tempTextAlignment);
@@ -1377,29 +1391,35 @@ bool GuiWindowBox(Rectangle bounds, const char *title)
1377
1391
  // Group Box control with text name
1378
1392
  void GuiGroupBox(Rectangle bounds, const char *text)
1379
1393
  {
1380
- #define GROUPBOX_LINE_THICK 1
1381
- #define GROUPBOX_TEXT_PADDING 10
1394
+ #if !defined(RAYGUI_GROUPBOX_LINE_THICK)
1395
+ #define RAYGUI_GROUPBOX_LINE_THICK 1
1396
+ #endif
1382
1397
 
1383
- GuiControlState state = guiState;
1398
+ GuiState state = guiState;
1384
1399
 
1385
1400
  // Draw control
1386
1401
  //--------------------------------------------------------------------
1387
- GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y, GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, Fade(GetColor(GuiGetStyle(DEFAULT, (state == GUI_STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha));
1388
- GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + bounds.height - 1, bounds.width, GROUPBOX_LINE_THICK }, 0, BLANK, Fade(GetColor(GuiGetStyle(DEFAULT, (state == GUI_STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha));
1389
- GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - 1, bounds.y, GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, Fade(GetColor(GuiGetStyle(DEFAULT, (state == GUI_STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha));
1402
+ GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y, RAYGUI_GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, Fade(GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha));
1403
+ GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + bounds.height - 1, bounds.width, RAYGUI_GROUPBOX_LINE_THICK }, 0, BLANK, Fade(GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha));
1404
+ GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - 1, bounds.y, RAYGUI_GROUPBOX_LINE_THICK, bounds.height }, 0, BLANK, Fade(GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha));
1390
1405
 
1391
- GuiLine(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y, bounds.width, 1 }, text);
1406
+ GuiLine(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y - GuiGetStyle(DEFAULT, TEXT_SIZE)/2, bounds.width, (float)GuiGetStyle(DEFAULT, TEXT_SIZE) }, text);
1392
1407
  //--------------------------------------------------------------------
1393
1408
  }
1394
1409
 
1395
1410
  // Line control
1396
1411
  void GuiLine(Rectangle bounds, const char *text)
1397
1412
  {
1398
- #define LINE_TEXT_PADDING 10
1413
+ #if !defined(RAYGUI_LINE_ORIGIN_SIZE)
1414
+ #define RAYGUI_LINE_MARGIN_TEXT 12
1415
+ #endif
1416
+ #if !defined(RAYGUI_LINE_TEXT_PADDING)
1417
+ #define RAYGUI_LINE_TEXT_PADDING 4
1418
+ #endif
1399
1419
 
1400
- GuiControlState state = guiState;
1420
+ GuiState state = guiState;
1401
1421
 
1402
- Color color = Fade(GetColor(GuiGetStyle(DEFAULT, (state == GUI_STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha);
1422
+ Color color = Fade(GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED : LINE_COLOR)), guiAlpha);
1403
1423
 
1404
1424
  // Draw control
1405
1425
  //--------------------------------------------------------------------
@@ -1408,40 +1428,66 @@ void GuiLine(Rectangle bounds, const char *text)
1408
1428
  {
1409
1429
  Rectangle textBounds = { 0 };
1410
1430
  textBounds.width = (float)GetTextWidth(text);
1411
- textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
1412
- textBounds.x = bounds.x + LINE_TEXT_PADDING;
1413
- textBounds.y = bounds.y - (float)GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
1431
+ textBounds.height = bounds.height;
1432
+ textBounds.x = bounds.x + RAYGUI_LINE_MARGIN_TEXT;
1433
+ textBounds.y = bounds.y;
1414
1434
 
1415
1435
  // Draw line with embedded text label: "--- text --------------"
1416
- GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y, LINE_TEXT_PADDING - 2, 1 }, 0, BLANK, color);
1417
- GuiLabel(textBounds, text);
1418
- GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + LINE_TEXT_PADDING + textBounds.width + 4, bounds.y, bounds.width - textBounds.width - LINE_TEXT_PADDING - 4, 1 }, 0, BLANK, color);
1436
+ GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x, bounds.y + bounds.height/2, RAYGUI_LINE_MARGIN_TEXT - RAYGUI_LINE_TEXT_PADDING, 1 }, 0, BLANK, color);
1437
+ GuiDrawText(text, textBounds, TEXT_ALIGN_LEFT, color);
1438
+ GuiDrawRectangle(RAYGUI_CLITERAL(Rectangle){ bounds.x + 12 + textBounds.width + 4, bounds.y + bounds.height/2, bounds.width - textBounds.width - RAYGUI_LINE_MARGIN_TEXT - RAYGUI_LINE_TEXT_PADDING, 1 }, 0, BLANK, color);
1419
1439
  }
1420
1440
  //--------------------------------------------------------------------
1421
1441
  }
1422
1442
 
1423
1443
  // Panel control
1424
- void GuiPanel(Rectangle bounds)
1444
+ void GuiPanel(Rectangle bounds, const char *text)
1425
1445
  {
1426
- #define PANEL_BORDER_WIDTH 1
1446
+ #if !defined(RAYGUI_PANEL_BORDER_WIDTH)
1447
+ #define RAYGUI_PANEL_BORDER_WIDTH 1
1448
+ #endif
1427
1449
 
1428
- GuiControlState state = guiState;
1450
+ GuiState state = guiState;
1451
+
1452
+ // Text will be drawn as a header bar (if provided)
1453
+ Rectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT };
1454
+ if ((text != NULL) && (bounds.height < RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f)) bounds.height = RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f;
1455
+
1456
+ if (text != NULL)
1457
+ {
1458
+ // Move panel bounds after the header bar
1459
+ bounds.y += (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT - 1;
1460
+ bounds.height -= (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT + 1;
1461
+ }
1429
1462
 
1430
1463
  // Draw control
1431
1464
  //--------------------------------------------------------------------
1432
- GuiDrawRectangle(bounds, PANEL_BORDER_WIDTH, Fade(GetColor(GuiGetStyle(DEFAULT, (state == GUI_STATE_DISABLED)? BORDER_COLOR_DISABLED: LINE_COLOR)), guiAlpha),
1433
- Fade(GetColor(GuiGetStyle(DEFAULT, (state == GUI_STATE_DISABLED)? BASE_COLOR_DISABLED : BACKGROUND_COLOR)), guiAlpha));
1465
+ if (text != NULL) GuiStatusBar(statusBar, text); // Draw panel header as status bar
1466
+
1467
+ GuiDrawRectangle(bounds, RAYGUI_PANEL_BORDER_WIDTH, Fade(GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BORDER_COLOR_DISABLED: LINE_COLOR)), guiAlpha),
1468
+ Fade(GetColor(GuiGetStyle(DEFAULT, (state == STATE_DISABLED)? BASE_COLOR_DISABLED : BACKGROUND_COLOR)), guiAlpha));
1434
1469
  //--------------------------------------------------------------------
1435
1470
  }
1436
1471
 
1437
1472
  // Scroll Panel control
1438
- Rectangle GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 *scroll)
1473
+ Rectangle GuiScrollPanel(Rectangle bounds, const char *text, Rectangle content, Vector2 *scroll)
1439
1474
  {
1440
- GuiControlState state = guiState;
1475
+ GuiState state = guiState;
1441
1476
 
1442
1477
  Vector2 scrollPos = { 0.0f, 0.0f };
1443
1478
  if (scroll != NULL) scrollPos = *scroll;
1444
1479
 
1480
+ // Text will be drawn as a header bar (if provided)
1481
+ Rectangle statusBar = { bounds.x, bounds.y, bounds.width, (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT };
1482
+ if (bounds.height < RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f) bounds.height = RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT*2.0f;
1483
+
1484
+ if (text != NULL)
1485
+ {
1486
+ // Move panel bounds after the header bar
1487
+ bounds.y += (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT - 1;
1488
+ bounds.height -= (float)RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT + 1;
1489
+ }
1490
+
1445
1491
  bool hasHorizontalScrollBar = (content.width > bounds.width - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH))? true : false;
1446
1492
  bool hasVerticalScrollBar = (content.height > bounds.height - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH))? true : false;
1447
1493
 
@@ -1449,10 +1495,10 @@ Rectangle GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 *scroll)
1449
1495
  if (!hasHorizontalScrollBar) hasHorizontalScrollBar = (hasVerticalScrollBar && (content.width > (bounds.width - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH))))? true : false;
1450
1496
  if (!hasVerticalScrollBar) hasVerticalScrollBar = (hasHorizontalScrollBar && (content.height > (bounds.height - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH))))? true : false;
1451
1497
 
1452
- const int horizontalScrollBarWidth = hasHorizontalScrollBar? GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH) : 0;
1453
- const int verticalScrollBarWidth = hasVerticalScrollBar? GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH) : 0;
1454
- const Rectangle horizontalScrollBar = { (float)((GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)bounds.x + verticalScrollBarWidth : (float)bounds.x) + GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)bounds.y + bounds.height - horizontalScrollBarWidth - GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)bounds.width - verticalScrollBarWidth - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)horizontalScrollBarWidth };
1455
- const Rectangle verticalScrollBar = { (float)((GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)bounds.x + GuiGetStyle(DEFAULT, BORDER_WIDTH) : (float)bounds.x + bounds.width - verticalScrollBarWidth - GuiGetStyle(DEFAULT, BORDER_WIDTH)), (float)bounds.y + GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)verticalScrollBarWidth, (float)bounds.height - horizontalScrollBarWidth - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) };
1498
+ int horizontalScrollBarWidth = hasHorizontalScrollBar? GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH) : 0;
1499
+ int verticalScrollBarWidth = hasVerticalScrollBar? GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH) : 0;
1500
+ Rectangle horizontalScrollBar = { (float)((GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)bounds.x + verticalScrollBarWidth : (float)bounds.x) + GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)bounds.y + bounds.height - horizontalScrollBarWidth - GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)bounds.width - verticalScrollBarWidth - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)horizontalScrollBarWidth };
1501
+ Rectangle verticalScrollBar = { (float)((GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)bounds.x + GuiGetStyle(DEFAULT, BORDER_WIDTH) : (float)bounds.x + bounds.width - verticalScrollBarWidth - GuiGetStyle(DEFAULT, BORDER_WIDTH)), (float)bounds.y + GuiGetStyle(DEFAULT, BORDER_WIDTH), (float)verticalScrollBarWidth, (float)bounds.height - horizontalScrollBarWidth - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) };
1456
1502
 
1457
1503
  // Calculate view area (area without the scrollbars)
1458
1504
  Rectangle view = (GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)?
@@ -1463,23 +1509,24 @@ Rectangle GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 *scroll)
1463
1509
  if (view.width > content.width) view.width = content.width;
1464
1510
  if (view.height > content.height) view.height = content.height;
1465
1511
 
1466
- const float horizontalMin = hasHorizontalScrollBar? ((GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)-verticalScrollBarWidth : 0) - (float)GuiGetStyle(DEFAULT, BORDER_WIDTH) : (((float)GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)-verticalScrollBarWidth : 0) - (float)GuiGetStyle(DEFAULT, BORDER_WIDTH);
1467
- const float horizontalMax = hasHorizontalScrollBar? content.width - bounds.width + (float)verticalScrollBarWidth + GuiGetStyle(DEFAULT, BORDER_WIDTH) - (((float)GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)verticalScrollBarWidth : 0) : (float)-GuiGetStyle(DEFAULT, BORDER_WIDTH);
1468
- const float verticalMin = hasVerticalScrollBar? (float)-GuiGetStyle(DEFAULT, BORDER_WIDTH) : (float)-GuiGetStyle(DEFAULT, BORDER_WIDTH);
1469
- const float verticalMax = hasVerticalScrollBar? content.height - bounds.height + (float)horizontalScrollBarWidth + (float)GuiGetStyle(DEFAULT, BORDER_WIDTH) : (float)-GuiGetStyle(DEFAULT, BORDER_WIDTH);
1512
+ float horizontalMin = hasHorizontalScrollBar? ((GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)-verticalScrollBarWidth : 0) - (float)GuiGetStyle(DEFAULT, BORDER_WIDTH) : (((float)GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)-verticalScrollBarWidth : 0) - (float)GuiGetStyle(DEFAULT, BORDER_WIDTH);
1513
+ float horizontalMax = hasHorizontalScrollBar? content.width - bounds.width + (float)verticalScrollBarWidth + GuiGetStyle(DEFAULT, BORDER_WIDTH) - (((float)GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (float)verticalScrollBarWidth : 0) : (float)-GuiGetStyle(DEFAULT, BORDER_WIDTH);
1514
+ float verticalMin = hasVerticalScrollBar? 0 : -1;
1515
+ float verticalMax = hasVerticalScrollBar? content.height - bounds.height + (float)horizontalScrollBarWidth + (float)GuiGetStyle(DEFAULT, BORDER_WIDTH) : (float)-GuiGetStyle(DEFAULT, BORDER_WIDTH);
1470
1516
 
1471
1517
  // Update control
1472
1518
  //--------------------------------------------------------------------
1473
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
1519
+ if ((state != STATE_DISABLED) && !guiLocked)
1474
1520
  {
1475
1521
  Vector2 mousePoint = GetMousePosition();
1476
1522
 
1477
1523
  // Check button state
1478
1524
  if (CheckCollisionPointRec(mousePoint, bounds))
1479
1525
  {
1480
- if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
1481
- else state = GUI_STATE_FOCUSED;
1526
+ if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = STATE_PRESSED;
1527
+ else state = STATE_FOCUSED;
1482
1528
 
1529
+ #if defined(SUPPORT_SCROLLBAR_KEY_INPUT)
1483
1530
  if (hasHorizontalScrollBar)
1484
1531
  {
1485
1532
  if (IsKeyDown(KEY_RIGHT)) scrollPos.x -= GuiGetStyle(SCROLLBAR, SCROLL_SPEED);
@@ -1491,11 +1538,11 @@ Rectangle GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 *scroll)
1491
1538
  if (IsKeyDown(KEY_DOWN)) scrollPos.y -= GuiGetStyle(SCROLLBAR, SCROLL_SPEED);
1492
1539
  if (IsKeyDown(KEY_UP)) scrollPos.y += GuiGetStyle(SCROLLBAR, SCROLL_SPEED);
1493
1540
  }
1494
-
1541
+ #endif
1495
1542
  float wheelMove = GetMouseWheelMove();
1496
1543
 
1497
1544
  // Horizontal scroll (Shift + Mouse wheel)
1498
- if (hasHorizontalScrollBar && (IsKeyDown(KEY_LEFT_SHIFT) || IsKeyDown(KEY_RIGHT_SHIFT))) scrollPos.x += wheelMove*20;
1545
+ if (hasHorizontalScrollBar && (IsKeyDown(KEY_LEFT_CONTROL) || IsKeyDown(KEY_RIGHT_SHIFT))) scrollPos.x += wheelMove*20;
1499
1546
  else scrollPos.y += wheelMove*20; // Vertical scroll
1500
1547
  }
1501
1548
  }
@@ -1509,6 +1556,8 @@ Rectangle GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 *scroll)
1509
1556
 
1510
1557
  // Draw control
1511
1558
  //--------------------------------------------------------------------
1559
+ if (text != NULL) GuiStatusBar(statusBar, text); // Draw panel header as status bar
1560
+
1512
1561
  GuiDrawRectangle(bounds, 0, BLANK, GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR))); // Draw background
1513
1562
 
1514
1563
  // Save size of the scrollbar slider
@@ -1521,6 +1570,7 @@ Rectangle GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 *scroll)
1521
1570
  GuiSetStyle(SCROLLBAR, SCROLL_SLIDER_SIZE, (int)(((bounds.width - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - verticalScrollBarWidth)/(int)content.width)*((int)bounds.width - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - verticalScrollBarWidth)));
1522
1571
  scrollPos.x = (float)-GuiScrollBar(horizontalScrollBar, (int)-scrollPos.x, (int)horizontalMin, (int)horizontalMax);
1523
1572
  }
1573
+ else scrollPos.x = 0.0f;
1524
1574
 
1525
1575
  // Draw vertical scrollbar if visible
1526
1576
  if (hasVerticalScrollBar)
@@ -1529,11 +1579,12 @@ Rectangle GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 *scroll)
1529
1579
  GuiSetStyle(SCROLLBAR, SCROLL_SLIDER_SIZE, (int)(((bounds.height - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - horizontalScrollBarWidth)/(int)content.height)*((int)bounds.height - 2*GuiGetStyle(DEFAULT, BORDER_WIDTH) - horizontalScrollBarWidth)));
1530
1580
  scrollPos.y = (float)-GuiScrollBar(verticalScrollBar, (int)-scrollPos.y, (int)verticalMin, (int)verticalMax);
1531
1581
  }
1582
+ else scrollPos.y = 0.0f;
1532
1583
 
1533
1584
  // Draw detail corner rectangle if both scroll bars are visible
1534
1585
  if (hasHorizontalScrollBar && hasVerticalScrollBar)
1535
1586
  {
1536
- Rectangle corner = { (GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE) ? (bounds.x + GuiGetStyle(DEFAULT, BORDER_WIDTH) + 2) : (horizontalScrollBar.x + horizontalScrollBar.width + 2), verticalScrollBar.y + verticalScrollBar.height + 2, (float)horizontalScrollBarWidth - 4, (float)verticalScrollBarWidth - 4 };
1587
+ Rectangle corner = { (GuiGetStyle(LISTVIEW, SCROLLBAR_SIDE) == SCROLLBAR_LEFT_SIDE)? (bounds.x + GuiGetStyle(DEFAULT, BORDER_WIDTH) + 2) : (horizontalScrollBar.x + horizontalScrollBar.width + 2), verticalScrollBar.y + verticalScrollBar.height + 2, (float)horizontalScrollBarWidth - 4, (float)verticalScrollBarWidth - 4 };
1537
1588
  GuiDrawRectangle(corner, 0, BLANK, Fade(GetColor(GuiGetStyle(LISTVIEW, TEXT + (state*3))), guiAlpha));
1538
1589
  }
1539
1590
 
@@ -1552,7 +1603,7 @@ Rectangle GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 *scroll)
1552
1603
  // Label control
1553
1604
  void GuiLabel(Rectangle bounds, const char *text)
1554
1605
  {
1555
- GuiControlState state = guiState;
1606
+ GuiState state = guiState;
1556
1607
 
1557
1608
  // Update control
1558
1609
  //--------------------------------------------------------------------
@@ -1561,27 +1612,27 @@ void GuiLabel(Rectangle bounds, const char *text)
1561
1612
 
1562
1613
  // Draw control
1563
1614
  //--------------------------------------------------------------------
1564
- GuiDrawText(text, GetTextBounds(LABEL, bounds), GuiGetStyle(LABEL, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(LABEL, (state == GUI_STATE_DISABLED)? TEXT_COLOR_DISABLED : TEXT_COLOR_NORMAL)), guiAlpha));
1615
+ GuiDrawText(text, GetTextBounds(LABEL, bounds), GuiGetStyle(LABEL, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(LABEL, TEXT + (state*3))), guiAlpha));
1565
1616
  //--------------------------------------------------------------------
1566
1617
  }
1567
1618
 
1568
1619
  // Button control, returns true when clicked
1569
1620
  bool GuiButton(Rectangle bounds, const char *text)
1570
1621
  {
1571
- GuiControlState state = guiState;
1622
+ GuiState state = guiState;
1572
1623
  bool pressed = false;
1573
1624
 
1574
1625
  // Update control
1575
1626
  //--------------------------------------------------------------------
1576
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
1627
+ if ((state != STATE_DISABLED) && !guiLocked)
1577
1628
  {
1578
1629
  Vector2 mousePoint = GetMousePosition();
1579
1630
 
1580
1631
  // Check button state
1581
1632
  if (CheckCollisionPointRec(mousePoint, bounds))
1582
1633
  {
1583
- if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
1584
- else state = GUI_STATE_FOCUSED;
1634
+ if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = STATE_PRESSED;
1635
+ else state = STATE_FOCUSED;
1585
1636
 
1586
1637
  if (IsMouseButtonReleased(MOUSE_LEFT_BUTTON)) pressed = true;
1587
1638
  }
@@ -1600,7 +1651,7 @@ bool GuiButton(Rectangle bounds, const char *text)
1600
1651
  // Label button control
1601
1652
  bool GuiLabelButton(Rectangle bounds, const char *text)
1602
1653
  {
1603
- GuiControlState state = guiState;
1654
+ GuiState state = guiState;
1604
1655
  bool pressed = false;
1605
1656
 
1606
1657
  // NOTE: We force bounds.width to be all text
@@ -1609,15 +1660,15 @@ bool GuiLabelButton(Rectangle bounds, const char *text)
1609
1660
 
1610
1661
  // Update control
1611
1662
  //--------------------------------------------------------------------
1612
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
1663
+ if ((state != STATE_DISABLED) && !guiLocked)
1613
1664
  {
1614
1665
  Vector2 mousePoint = GetMousePosition();
1615
1666
 
1616
1667
  // Check checkbox state
1617
1668
  if (CheckCollisionPointRec(mousePoint, bounds))
1618
1669
  {
1619
- if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
1620
- else state = GUI_STATE_FOCUSED;
1670
+ if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = STATE_PRESSED;
1671
+ else state = STATE_FOCUSED;
1621
1672
 
1622
1673
  if (IsMouseButtonReleased(MOUSE_LEFT_BUTTON)) pressed = true;
1623
1674
  }
@@ -1635,31 +1686,31 @@ bool GuiLabelButton(Rectangle bounds, const char *text)
1635
1686
  // Toggle Button control, returns true when active
1636
1687
  bool GuiToggle(Rectangle bounds, const char *text, bool active)
1637
1688
  {
1638
- GuiControlState state = guiState;
1689
+ GuiState state = guiState;
1639
1690
 
1640
1691
  // Update control
1641
1692
  //--------------------------------------------------------------------
1642
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
1693
+ if ((state != STATE_DISABLED) && !guiLocked)
1643
1694
  {
1644
1695
  Vector2 mousePoint = GetMousePosition();
1645
1696
 
1646
1697
  // Check toggle button state
1647
1698
  if (CheckCollisionPointRec(mousePoint, bounds))
1648
1699
  {
1649
- if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
1700
+ if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = STATE_PRESSED;
1650
1701
  else if (IsMouseButtonReleased(MOUSE_LEFT_BUTTON))
1651
1702
  {
1652
- state = GUI_STATE_NORMAL;
1703
+ state = STATE_NORMAL;
1653
1704
  active = !active;
1654
1705
  }
1655
- else state = GUI_STATE_FOCUSED;
1706
+ else state = STATE_FOCUSED;
1656
1707
  }
1657
1708
  }
1658
1709
  //--------------------------------------------------------------------
1659
1710
 
1660
1711
  // Draw control
1661
1712
  //--------------------------------------------------------------------
1662
- if (state == GUI_STATE_NORMAL)
1713
+ if (state == STATE_NORMAL)
1663
1714
  {
1664
1715
  GuiDrawRectangle(bounds, GuiGetStyle(TOGGLE, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TOGGLE, (active? BORDER_COLOR_PRESSED : (BORDER + state*3)))), guiAlpha), Fade(GetColor(GuiGetStyle(TOGGLE, (active? BASE_COLOR_PRESSED : (BASE + state*3)))), guiAlpha));
1665
1716
  GuiDrawText(text, GetTextBounds(TOGGLE, bounds), GuiGetStyle(TOGGLE, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(TOGGLE, (active? TEXT_COLOR_PRESSED : (TEXT + state*3)))), guiAlpha));
@@ -1677,14 +1728,14 @@ bool GuiToggle(Rectangle bounds, const char *text, bool active)
1677
1728
  // Toggle Group control, returns toggled button index
1678
1729
  int GuiToggleGroup(Rectangle bounds, const char *text, int active)
1679
1730
  {
1680
- #if !defined(TOGGLEGROUP_MAX_ELEMENTS)
1681
- #define TOGGLEGROUP_MAX_ELEMENTS 32
1731
+ #if !defined(RAYGUI_TOGGLEGROUP_MAX_ITEMS)
1732
+ #define RAYGUI_TOGGLEGROUP_MAX_ITEMS 32
1682
1733
  #endif
1683
1734
 
1684
1735
  float initBoundsX = bounds.x;
1685
1736
 
1686
1737
  // Get substrings items from text (items pointers)
1687
- int rows[TOGGLEGROUP_MAX_ELEMENTS] = { 0 };
1738
+ int rows[RAYGUI_TOGGLEGROUP_MAX_ITEMS] = { 0 };
1688
1739
  int itemCount = 0;
1689
1740
  const char **items = GuiTextSplit(text, &itemCount, rows);
1690
1741
 
@@ -1711,7 +1762,7 @@ int GuiToggleGroup(Rectangle bounds, const char *text, int active)
1711
1762
  // Check Box control, returns true when active
1712
1763
  bool GuiCheckBox(Rectangle bounds, const char *text, bool checked)
1713
1764
  {
1714
- GuiControlState state = guiState;
1765
+ GuiState state = guiState;
1715
1766
 
1716
1767
  Rectangle textBounds = { 0 };
1717
1768
 
@@ -1721,17 +1772,17 @@ bool GuiCheckBox(Rectangle bounds, const char *text, bool checked)
1721
1772
  textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
1722
1773
  textBounds.x = bounds.x + bounds.width + GuiGetStyle(CHECKBOX, TEXT_PADDING);
1723
1774
  textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
1724
- if (GuiGetStyle(CHECKBOX, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_LEFT) textBounds.x = bounds.x - textBounds.width - GuiGetStyle(CHECKBOX, TEXT_PADDING);
1775
+ if (GuiGetStyle(CHECKBOX, TEXT_ALIGNMENT) == TEXT_ALIGN_LEFT) textBounds.x = bounds.x - textBounds.width - GuiGetStyle(CHECKBOX, TEXT_PADDING);
1725
1776
  }
1726
1777
 
1727
1778
  // Update control
1728
1779
  //--------------------------------------------------------------------
1729
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
1780
+ if ((state != STATE_DISABLED) && !guiLocked)
1730
1781
  {
1731
1782
  Vector2 mousePoint = GetMousePosition();
1732
1783
 
1733
1784
  Rectangle totalBounds = {
1734
- (GuiGetStyle(CHECKBOX, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_LEFT)? textBounds.x : bounds.x,
1785
+ (GuiGetStyle(CHECKBOX, TEXT_ALIGNMENT) == TEXT_ALIGN_LEFT)? textBounds.x : bounds.x,
1735
1786
  bounds.y,
1736
1787
  bounds.width + textBounds.width + GuiGetStyle(CHECKBOX, TEXT_PADDING),
1737
1788
  bounds.height,
@@ -1740,8 +1791,8 @@ bool GuiCheckBox(Rectangle bounds, const char *text, bool checked)
1740
1791
  // Check checkbox state
1741
1792
  if (CheckCollisionPointRec(mousePoint, totalBounds))
1742
1793
  {
1743
- if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
1744
- else state = GUI_STATE_FOCUSED;
1794
+ if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = STATE_PRESSED;
1795
+ else state = STATE_FOCUSED;
1745
1796
 
1746
1797
  if (IsMouseButtonReleased(MOUSE_LEFT_BUTTON)) checked = !checked;
1747
1798
  }
@@ -1761,7 +1812,7 @@ bool GuiCheckBox(Rectangle bounds, const char *text, bool checked)
1761
1812
  GuiDrawRectangle(check, 0, BLANK, Fade(GetColor(GuiGetStyle(CHECKBOX, TEXT + state*3)), guiAlpha));
1762
1813
  }
1763
1814
 
1764
- GuiDrawText(text, textBounds, (GuiGetStyle(CHECKBOX, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_RIGHT)? GUI_TEXT_ALIGN_LEFT : GUI_TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(LABEL, TEXT + (state*3))), guiAlpha));
1815
+ GuiDrawText(text, textBounds, (GuiGetStyle(CHECKBOX, TEXT_ALIGNMENT) == TEXT_ALIGN_RIGHT)? TEXT_ALIGN_LEFT : TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(LABEL, TEXT + (state*3))), guiAlpha));
1765
1816
  //--------------------------------------------------------------------
1766
1817
 
1767
1818
  return checked;
@@ -1770,11 +1821,11 @@ bool GuiCheckBox(Rectangle bounds, const char *text, bool checked)
1770
1821
  // Combo Box control, returns selected item index
1771
1822
  int GuiComboBox(Rectangle bounds, const char *text, int active)
1772
1823
  {
1773
- GuiControlState state = guiState;
1824
+ GuiState state = guiState;
1774
1825
 
1775
- bounds.width -= (GuiGetStyle(COMBOBOX, COMBO_BUTTON_WIDTH) + GuiGetStyle(COMBOBOX, COMBO_BUTTON_PADDING));
1826
+ bounds.width -= (GuiGetStyle(COMBOBOX, COMBO_BUTTON_WIDTH) + GuiGetStyle(COMBOBOX, COMBO_BUTTON_SPACING));
1776
1827
 
1777
- Rectangle selector = { (float)bounds.x + bounds.width + GuiGetStyle(COMBOBOX, COMBO_BUTTON_PADDING),
1828
+ Rectangle selector = { (float)bounds.x + bounds.width + GuiGetStyle(COMBOBOX, COMBO_BUTTON_SPACING),
1778
1829
  (float)bounds.y, (float)GuiGetStyle(COMBOBOX, COMBO_BUTTON_WIDTH), (float)bounds.height };
1779
1830
 
1780
1831
  // Get substrings items from text (items pointers, lengths and count)
@@ -1786,7 +1837,7 @@ int GuiComboBox(Rectangle bounds, const char *text, int active)
1786
1837
 
1787
1838
  // Update control
1788
1839
  //--------------------------------------------------------------------
1789
- if ((state != GUI_STATE_DISABLED) && !guiLocked && (itemCount > 1))
1840
+ if ((state != STATE_DISABLED) && !guiLocked && (itemCount > 1))
1790
1841
  {
1791
1842
  Vector2 mousePoint = GetMousePosition();
1792
1843
 
@@ -1799,8 +1850,8 @@ int GuiComboBox(Rectangle bounds, const char *text, int active)
1799
1850
  if (active >= itemCount) active = 0;
1800
1851
  }
1801
1852
 
1802
- if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
1803
- else state = GUI_STATE_FOCUSED;
1853
+ if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = STATE_PRESSED;
1854
+ else state = STATE_FOCUSED;
1804
1855
  }
1805
1856
  }
1806
1857
  //--------------------------------------------------------------------
@@ -1816,7 +1867,7 @@ int GuiComboBox(Rectangle bounds, const char *text, int active)
1816
1867
  int tempBorderWidth = GuiGetStyle(BUTTON, BORDER_WIDTH);
1817
1868
  int tempTextAlign = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
1818
1869
  GuiSetStyle(BUTTON, BORDER_WIDTH, 1);
1819
- GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
1870
+ GuiSetStyle(BUTTON, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
1820
1871
 
1821
1872
  GuiButton(selector, TextFormat("%i/%i", active + 1, itemCount));
1822
1873
 
@@ -1831,7 +1882,7 @@ int GuiComboBox(Rectangle bounds, const char *text, int active)
1831
1882
  // NOTE: Returns mouse click
1832
1883
  bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode)
1833
1884
  {
1834
- GuiControlState state = guiState;
1885
+ GuiState state = guiState;
1835
1886
  int itemSelected = *active;
1836
1887
  int itemFocused = -1;
1837
1888
 
@@ -1840,7 +1891,7 @@ bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMo
1840
1891
  const char **items = GuiTextSplit(text, &itemCount, NULL);
1841
1892
 
1842
1893
  Rectangle boundsOpen = bounds;
1843
- boundsOpen.height = (itemCount + 1)*(bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_PADDING));
1894
+ boundsOpen.height = (itemCount + 1)*(bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_SPACING));
1844
1895
 
1845
1896
  Rectangle itemBounds = bounds;
1846
1897
 
@@ -1848,13 +1899,13 @@ bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMo
1848
1899
 
1849
1900
  // Update control
1850
1901
  //--------------------------------------------------------------------
1851
- if ((state != GUI_STATE_DISABLED) && (editMode || !guiLocked) && (itemCount > 1))
1902
+ if ((state != STATE_DISABLED) && (editMode || !guiLocked) && (itemCount > 1))
1852
1903
  {
1853
1904
  Vector2 mousePoint = GetMousePosition();
1854
1905
 
1855
1906
  if (editMode)
1856
1907
  {
1857
- state = GUI_STATE_PRESSED;
1908
+ state = STATE_PRESSED;
1858
1909
 
1859
1910
  // Check if mouse has been pressed or released outside limits
1860
1911
  if (!CheckCollisionPointRec(mousePoint, boundsOpen))
@@ -1869,7 +1920,7 @@ bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMo
1869
1920
  for (int i = 0; i < itemCount; i++)
1870
1921
  {
1871
1922
  // Update item rectangle y position for next item
1872
- itemBounds.y += (bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_PADDING));
1923
+ itemBounds.y += (bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_SPACING));
1873
1924
 
1874
1925
  if (CheckCollisionPointRec(mousePoint, itemBounds))
1875
1926
  {
@@ -1892,9 +1943,9 @@ bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMo
1892
1943
  if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
1893
1944
  {
1894
1945
  pressed = true;
1895
- state = GUI_STATE_PRESSED;
1946
+ state = STATE_PRESSED;
1896
1947
  }
1897
- else state = GUI_STATE_FOCUSED;
1948
+ else state = STATE_FOCUSED;
1898
1949
  }
1899
1950
  }
1900
1951
  }
@@ -1902,7 +1953,7 @@ bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMo
1902
1953
 
1903
1954
  // Draw control
1904
1955
  //--------------------------------------------------------------------
1905
- if (editMode) GuiPanel(boundsOpen);
1956
+ if (editMode) GuiPanel(boundsOpen, NULL);
1906
1957
 
1907
1958
  GuiDrawRectangle(bounds, GuiGetStyle(DROPDOWNBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, BORDER + state*3)), guiAlpha), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, BASE + state*3)), guiAlpha));
1908
1959
  GuiDrawText(items[itemSelected], GetTextBounds(DEFAULT, bounds), GuiGetStyle(DROPDOWNBOX, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + state*3)), guiAlpha));
@@ -1913,7 +1964,7 @@ bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMo
1913
1964
  for (int i = 0; i < itemCount; i++)
1914
1965
  {
1915
1966
  // Update item rectangle y position for next item
1916
- itemBounds.y += (bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_PADDING));
1967
+ itemBounds.y += (bounds.height + GuiGetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_SPACING));
1917
1968
 
1918
1969
  if (i == itemSelected)
1919
1970
  {
@@ -1930,12 +1981,12 @@ bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMo
1930
1981
  }
1931
1982
 
1932
1983
  // Draw arrows (using icon if available)
1933
- #if defined(RAYGUI_NO_RICONS)
1984
+ #if defined(RAYGUI_NO_ICONS)
1934
1985
  GuiDrawText("v", RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - GuiGetStyle(DROPDOWNBOX, ARROW_PADDING), bounds.y + bounds.height/2 - 2, 10, 10 },
1935
- GUI_TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha));
1986
+ TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha));
1936
1987
  #else
1937
1988
  GuiDrawText("#120#", RAYGUI_CLITERAL(Rectangle){ bounds.x + bounds.width - GuiGetStyle(DROPDOWNBOX, ARROW_PADDING), bounds.y + bounds.height/2 - 6, 10, 10 },
1938
- GUI_TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha)); // RICON_ARROW_DOWN_FILL
1989
+ TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha)); // ICON_ARROW_DOWN_FILL
1939
1990
  #endif
1940
1991
  //--------------------------------------------------------------------
1941
1992
 
@@ -1947,7 +1998,7 @@ bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMo
1947
1998
  // NOTE 2: Returns if KEY_ENTER pressed (useful for data validation)
1948
1999
  bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
1949
2000
  {
1950
- GuiControlState state = guiState;
2001
+ GuiState state = guiState;
1951
2002
  bool pressed = false;
1952
2003
 
1953
2004
  Rectangle cursor = {
@@ -1957,31 +2008,31 @@ bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
1957
2008
  (float)GuiGetStyle(DEFAULT, TEXT_SIZE)*2
1958
2009
  };
1959
2010
 
1960
- if (cursor.height > bounds.height) cursor.height = bounds.height - GuiGetStyle(TEXTBOX, BORDER_WIDTH)*2;
2011
+ if (cursor.height >= bounds.height) cursor.height = bounds.height - GuiGetStyle(TEXTBOX, BORDER_WIDTH)*2;
2012
+ if (cursor.y < (bounds.y + GuiGetStyle(TEXTBOX, BORDER_WIDTH))) cursor.y = bounds.y + GuiGetStyle(TEXTBOX, BORDER_WIDTH);
1961
2013
 
1962
2014
  // Update control
1963
2015
  //--------------------------------------------------------------------
1964
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
2016
+ if ((state != STATE_DISABLED) && !guiLocked)
1965
2017
  {
1966
2018
  Vector2 mousePoint = GetMousePosition();
1967
2019
 
1968
2020
  if (editMode)
1969
2021
  {
1970
- state = GUI_STATE_PRESSED;
2022
+ state = STATE_PRESSED;
1971
2023
 
1972
2024
  int key = GetCharPressed(); // Returns codepoint as Unicode
1973
2025
  int keyCount = (int)strlen(text);
2026
+ int byteSize = 0;
2027
+ const char *textUTF8 = CodepointToUTF8(key, &byteSize);
1974
2028
 
1975
2029
  // Only allow keys in range [32..125]
1976
- if (keyCount < (textSize - 1))
2030
+ if ((keyCount + byteSize) < textSize)
1977
2031
  {
1978
2032
  float maxWidth = (bounds.width - (GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING)*2));
1979
2033
 
1980
2034
  if ((GetTextWidth(text) < (maxWidth - GuiGetStyle(DEFAULT, TEXT_SIZE))) && (key >= 32))
1981
2035
  {
1982
- int byteSize = 0;
1983
- const char *textUTF8 = CodepointToUTF8(key, &byteSize);
1984
-
1985
2036
  for (int i = 0; i < byteSize; i++)
1986
2037
  {
1987
2038
  text[keyCount] = textUTF8[i];
@@ -1997,9 +2048,8 @@ bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
1997
2048
  {
1998
2049
  if (IsKeyPressed(KEY_BACKSPACE))
1999
2050
  {
2000
- keyCount--;
2051
+ while ((keyCount > 0) && ((text[--keyCount] & 0xc0) == 0x80));
2001
2052
  text[keyCount] = '\0';
2002
- if (keyCount < 0) keyCount = 0;
2003
2053
  }
2004
2054
  }
2005
2055
 
@@ -2007,14 +2057,14 @@ bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
2007
2057
 
2008
2058
  // Check text alignment to position cursor properly
2009
2059
  int textAlignment = GuiGetStyle(TEXTBOX, TEXT_ALIGNMENT);
2010
- if (textAlignment == GUI_TEXT_ALIGN_CENTER) cursor.x = bounds.x + GetTextWidth(text)/2 + bounds.width/2 + 1;
2011
- else if (textAlignment == GUI_TEXT_ALIGN_RIGHT) cursor.x = bounds.x + bounds.width - GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING);
2060
+ if (textAlignment == TEXT_ALIGN_CENTER) cursor.x = bounds.x + GetTextWidth(text)/2 + bounds.width/2 + 1;
2061
+ else if (textAlignment == TEXT_ALIGN_RIGHT) cursor.x = bounds.x + bounds.width - GuiGetStyle(TEXTBOX, TEXT_INNER_PADDING);
2012
2062
  }
2013
2063
  else
2014
2064
  {
2015
2065
  if (CheckCollisionPointRec(mousePoint, bounds))
2016
2066
  {
2017
- state = GUI_STATE_FOCUSED;
2067
+ state = STATE_FOCUSED;
2018
2068
  if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) pressed = true;
2019
2069
  }
2020
2070
  }
@@ -2023,11 +2073,11 @@ bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
2023
2073
 
2024
2074
  // Draw control
2025
2075
  //--------------------------------------------------------------------
2026
- if (state == GUI_STATE_PRESSED)
2076
+ if (state == STATE_PRESSED)
2027
2077
  {
2028
2078
  GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_PRESSED)), guiAlpha));
2029
2079
  }
2030
- else if (state == GUI_STATE_DISABLED)
2080
+ else if (state == STATE_DISABLED)
2031
2081
  {
2032
2082
  GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_DISABLED)), guiAlpha));
2033
2083
  }
@@ -2045,13 +2095,13 @@ bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
2045
2095
  // Spinner control, returns selected value
2046
2096
  bool GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode)
2047
2097
  {
2048
- GuiControlState state = guiState;
2098
+ GuiState state = guiState;
2049
2099
 
2050
2100
  bool pressed = false;
2051
2101
  int tempValue = *value;
2052
2102
 
2053
- Rectangle spinner = { bounds.x + GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH) + GuiGetStyle(SPINNER, SPIN_BUTTON_PADDING), bounds.y,
2054
- bounds.width - 2*(GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH) + GuiGetStyle(SPINNER, SPIN_BUTTON_PADDING)), bounds.height };
2103
+ Rectangle spinner = { bounds.x + GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH) + GuiGetStyle(SPINNER, SPIN_BUTTON_SPACING), bounds.y,
2104
+ bounds.width - 2*(GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH) + GuiGetStyle(SPINNER, SPIN_BUTTON_SPACING)), bounds.height };
2055
2105
  Rectangle leftButtonBound = { (float)bounds.x, (float)bounds.y, (float)GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.height };
2056
2106
  Rectangle rightButtonBound = { (float)bounds.x + bounds.width - GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.y, (float)GuiGetStyle(SPINNER, SPIN_BUTTON_WIDTH), (float)bounds.height };
2057
2107
 
@@ -2062,23 +2112,31 @@ bool GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, in
2062
2112
  textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
2063
2113
  textBounds.x = bounds.x + bounds.width + GuiGetStyle(SPINNER, TEXT_PADDING);
2064
2114
  textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
2065
- if (GuiGetStyle(SPINNER, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_LEFT) textBounds.x = bounds.x - textBounds.width - GuiGetStyle(SPINNER, TEXT_PADDING);
2115
+ if (GuiGetStyle(SPINNER, TEXT_ALIGNMENT) == TEXT_ALIGN_LEFT) textBounds.x = bounds.x - textBounds.width - GuiGetStyle(SPINNER, TEXT_PADDING);
2066
2116
  }
2067
2117
 
2068
2118
  // Update control
2069
2119
  //--------------------------------------------------------------------
2070
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
2120
+ if ((state != STATE_DISABLED) && !guiLocked)
2071
2121
  {
2072
2122
  Vector2 mousePoint = GetMousePosition();
2073
2123
 
2074
2124
  // Check spinner state
2075
2125
  if (CheckCollisionPointRec(mousePoint, bounds))
2076
2126
  {
2077
- if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
2078
- else state = GUI_STATE_FOCUSED;
2127
+ if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = STATE_PRESSED;
2128
+ else state = STATE_FOCUSED;
2079
2129
  }
2080
2130
  }
2081
2131
 
2132
+ #if defined(RAYGUI_NO_ICONS)
2133
+ if (GuiButton(leftButtonBound, "<")) tempValue--;
2134
+ if (GuiButton(rightButtonBound, ">")) tempValue++;
2135
+ #else
2136
+ if (GuiButton(leftButtonBound, GuiIconText(ICON_ARROW_LEFT_FILL, NULL))) tempValue--;
2137
+ if (GuiButton(rightButtonBound, GuiIconText(ICON_ARROW_RIGHT_FILL, NULL))) tempValue++;
2138
+ #endif
2139
+
2082
2140
  if (!editMode)
2083
2141
  {
2084
2142
  if (tempValue < minValue) tempValue = minValue;
@@ -2096,21 +2154,13 @@ bool GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, in
2096
2154
  int tempBorderWidth = GuiGetStyle(BUTTON, BORDER_WIDTH);
2097
2155
  int tempTextAlign = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
2098
2156
  GuiSetStyle(BUTTON, BORDER_WIDTH, GuiGetStyle(SPINNER, BORDER_WIDTH));
2099
- GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
2100
-
2101
- #if defined(RAYGUI_NO_RICONS)
2102
- if (GuiButton(leftButtonBound, "<")) tempValue--;
2103
- if (GuiButton(rightButtonBound, ">")) tempValue++;
2104
- #else
2105
- if (GuiButton(leftButtonBound, GuiIconText(RICON_ARROW_LEFT_FILL, NULL))) tempValue--;
2106
- if (GuiButton(rightButtonBound, GuiIconText(RICON_ARROW_RIGHT_FILL, NULL))) tempValue++;
2107
- #endif
2157
+ GuiSetStyle(BUTTON, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
2108
2158
 
2109
2159
  GuiSetStyle(BUTTON, TEXT_ALIGNMENT, tempTextAlign);
2110
2160
  GuiSetStyle(BUTTON, BORDER_WIDTH, tempBorderWidth);
2111
2161
 
2112
2162
  // Draw text label if provided
2113
- GuiDrawText(text, textBounds, (GuiGetStyle(SPINNER, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_RIGHT)? GUI_TEXT_ALIGN_LEFT : GUI_TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(LABEL, TEXT + (state*3))), guiAlpha));
2163
+ GuiDrawText(text, textBounds, (GuiGetStyle(SPINNER, TEXT_ALIGNMENT) == TEXT_ALIGN_RIGHT)? TEXT_ALIGN_LEFT : TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(LABEL, TEXT + (state*3))), guiAlpha));
2114
2164
  //--------------------------------------------------------------------
2115
2165
 
2116
2166
  *value = tempValue;
@@ -2121,14 +2171,14 @@ bool GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, in
2121
2171
  // NOTE: Requires static variables: frameCounter
2122
2172
  bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode)
2123
2173
  {
2124
- #if !defined(VALUEBOX_MAX_CHARS)
2125
- #define VALUEBOX_MAX_CHARS 32
2174
+ #if !defined(RAYGUI_VALUEBOX_MAX_CHARS)
2175
+ #define RAYGUI_VALUEBOX_MAX_CHARS 32
2126
2176
  #endif
2127
2177
 
2128
- GuiControlState state = guiState;
2178
+ GuiState state = guiState;
2129
2179
  bool pressed = false;
2130
2180
 
2131
- char textValue[VALUEBOX_MAX_CHARS + 1] = "\0";
2181
+ char textValue[RAYGUI_VALUEBOX_MAX_CHARS + 1] = "\0";
2132
2182
  sprintf(textValue, "%i", *value);
2133
2183
 
2134
2184
  Rectangle textBounds = { 0 };
@@ -2138,12 +2188,12 @@ bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, i
2138
2188
  textBounds.height = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
2139
2189
  textBounds.x = bounds.x + bounds.width + GuiGetStyle(VALUEBOX, TEXT_PADDING);
2140
2190
  textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
2141
- if (GuiGetStyle(VALUEBOX, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_LEFT) textBounds.x = bounds.x - textBounds.width - GuiGetStyle(VALUEBOX, TEXT_PADDING);
2191
+ if (GuiGetStyle(VALUEBOX, TEXT_ALIGNMENT) == TEXT_ALIGN_LEFT) textBounds.x = bounds.x - textBounds.width - GuiGetStyle(VALUEBOX, TEXT_PADDING);
2142
2192
  }
2143
2193
 
2144
2194
  // Update control
2145
2195
  //--------------------------------------------------------------------
2146
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
2196
+ if ((state != STATE_DISABLED) && !guiLocked)
2147
2197
  {
2148
2198
  Vector2 mousePoint = GetMousePosition();
2149
2199
 
@@ -2151,12 +2201,12 @@ bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, i
2151
2201
 
2152
2202
  if (editMode)
2153
2203
  {
2154
- state = GUI_STATE_PRESSED;
2204
+ state = STATE_PRESSED;
2155
2205
 
2156
2206
  int keyCount = (int)strlen(textValue);
2157
2207
 
2158
2208
  // Only allow keys in range [48..57]
2159
- if (keyCount < VALUEBOX_MAX_CHARS)
2209
+ if (keyCount < RAYGUI_VALUEBOX_MAX_CHARS)
2160
2210
  {
2161
2211
  if (GetTextWidth(textValue) < bounds.width)
2162
2212
  {
@@ -2177,13 +2227,16 @@ bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, i
2177
2227
  {
2178
2228
  keyCount--;
2179
2229
  textValue[keyCount] = '\0';
2180
- if (keyCount < 0) keyCount = 0;
2181
2230
  valueHasChanged = true;
2182
2231
  }
2183
2232
  }
2184
2233
 
2185
2234
  if (valueHasChanged) *value = TextToInteger(textValue);
2186
2235
 
2236
+ // NOTE: We are not clamp values until user input finishes
2237
+ //if (*value > maxValue) *value = maxValue;
2238
+ //else if (*value < minValue) *value = minValue;
2239
+
2187
2240
  if (IsKeyPressed(KEY_ENTER) || (!CheckCollisionPointRec(mousePoint, bounds) && IsMouseButtonPressed(MOUSE_LEFT_BUTTON))) pressed = true;
2188
2241
  }
2189
2242
  else
@@ -2193,7 +2246,7 @@ bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, i
2193
2246
 
2194
2247
  if (CheckCollisionPointRec(mousePoint, bounds))
2195
2248
  {
2196
- state = GUI_STATE_FOCUSED;
2249
+ state = STATE_FOCUSED;
2197
2250
  if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) pressed = true;
2198
2251
  }
2199
2252
  }
@@ -2203,12 +2256,12 @@ bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, i
2203
2256
  // Draw control
2204
2257
  //--------------------------------------------------------------------
2205
2258
  Color baseColor = BLANK;
2206
- if (state == GUI_STATE_PRESSED) baseColor = GetColor(GuiGetStyle(VALUEBOX, BASE_COLOR_PRESSED));
2207
- else if (state == GUI_STATE_DISABLED) baseColor = GetColor(GuiGetStyle(VALUEBOX, BASE_COLOR_DISABLED));
2259
+ if (state == STATE_PRESSED) baseColor = GetColor(GuiGetStyle(VALUEBOX, BASE_COLOR_PRESSED));
2260
+ else if (state == STATE_DISABLED) baseColor = GetColor(GuiGetStyle(VALUEBOX, BASE_COLOR_DISABLED));
2208
2261
 
2209
2262
  // WARNING: BLANK color does not work properly with Fade()
2210
2263
  GuiDrawRectangle(bounds, GuiGetStyle(VALUEBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(VALUEBOX, BORDER + (state*3))), guiAlpha), baseColor);
2211
- GuiDrawText(textValue, GetTextBounds(VALUEBOX, bounds), GUI_TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(VALUEBOX, TEXT + (state*3))), guiAlpha));
2264
+ GuiDrawText(textValue, GetTextBounds(VALUEBOX, bounds), TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(VALUEBOX, TEXT + (state*3))), guiAlpha));
2212
2265
 
2213
2266
  // Draw cursor
2214
2267
  if (editMode)
@@ -2219,7 +2272,7 @@ bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, i
2219
2272
  }
2220
2273
 
2221
2274
  // Draw text label if provided
2222
- GuiDrawText(text, textBounds, (GuiGetStyle(VALUEBOX, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_RIGHT)? GUI_TEXT_ALIGN_LEFT : GUI_TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(LABEL, TEXT + (state*3))), guiAlpha));
2275
+ GuiDrawText(text, textBounds, (GuiGetStyle(VALUEBOX, TEXT_ALIGNMENT) == TEXT_ALIGN_RIGHT)? TEXT_ALIGN_LEFT : TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(LABEL, TEXT + (state*3))), guiAlpha));
2223
2276
  //--------------------------------------------------------------------
2224
2277
 
2225
2278
  return pressed;
@@ -2228,7 +2281,7 @@ bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, i
2228
2281
  // Text Box control with multiple lines
2229
2282
  bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
2230
2283
  {
2231
- GuiControlState state = guiState;
2284
+ GuiState state = guiState;
2232
2285
  bool pressed = false;
2233
2286
 
2234
2287
  Rectangle textAreaBounds = {
@@ -2245,13 +2298,13 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
2245
2298
 
2246
2299
  // Update control
2247
2300
  //--------------------------------------------------------------------
2248
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
2301
+ if ((state != STATE_DISABLED) && !guiLocked)
2249
2302
  {
2250
2303
  Vector2 mousePoint = GetMousePosition();
2251
2304
 
2252
2305
  if (editMode)
2253
2306
  {
2254
- state = GUI_STATE_PRESSED;
2307
+ state = STATE_PRESSED;
2255
2308
 
2256
2309
  // We get an Unicode codepoint
2257
2310
  int codepoint = GetCharPressed();
@@ -2305,7 +2358,7 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
2305
2358
  {
2306
2359
  if (CheckCollisionPointRec(mousePoint, bounds))
2307
2360
  {
2308
- state = GUI_STATE_FOCUSED;
2361
+ state = STATE_FOCUSED;
2309
2362
  if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) pressed = true;
2310
2363
  }
2311
2364
  }
@@ -2314,11 +2367,11 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
2314
2367
 
2315
2368
  // Draw control
2316
2369
  //--------------------------------------------------------------------
2317
- if (state == GUI_STATE_PRESSED)
2370
+ if (state == STATE_PRESSED)
2318
2371
  {
2319
2372
  GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_PRESSED)), guiAlpha));
2320
2373
  }
2321
- else if (state == GUI_STATE_DISABLED)
2374
+ else if (state == STATE_DISABLED)
2322
2375
  {
2323
2376
  GuiDrawRectangle(bounds, GuiGetStyle(TEXTBOX, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(TEXTBOX, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(TEXTBOX, BASE_COLOR_DISABLED)), guiAlpha));
2324
2377
  }
@@ -2340,7 +2393,7 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
2340
2393
 
2341
2394
  if ((codepointLength == 1) && (codepoint == '\n'))
2342
2395
  {
2343
- cursorPos.y += (guiFont.baseSize*scaleFactor + GuiGetStyle(TEXTBOX, TEXT_LINES_PADDING)); // Line feed
2396
+ cursorPos.y += (guiFont.baseSize*scaleFactor + GuiGetStyle(TEXTBOX, TEXT_LINES_SPACING)); // Line feed
2344
2397
  cursorPos.x = textAreaBounds.x; // Carriage return
2345
2398
  }
2346
2399
  else
@@ -2349,12 +2402,12 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
2349
2402
  {
2350
2403
  int glyphWidth = 0;
2351
2404
  if (glyphInfo.advanceX != 0) glyphWidth += glyphInfo.advanceX;
2352
- else glyphWidth += (atlasRec.width + glyphInfo.offsetX);
2405
+ else glyphWidth += (int)(atlasRec.width + glyphInfo.offsetX);
2353
2406
 
2354
2407
  // Jump line if the end of the text box area has been reached
2355
2408
  if ((cursorPos.x + (glyphWidth*scaleFactor)) > (textAreaBounds.x + textAreaBounds.width))
2356
2409
  {
2357
- cursorPos.y += (guiFont.baseSize*scaleFactor + GuiGetStyle(TEXTBOX, TEXT_LINES_PADDING)); // Line feed
2410
+ cursorPos.y += (guiFont.baseSize*scaleFactor + GuiGetStyle(TEXTBOX, TEXT_LINES_SPACING)); // Line feed
2358
2411
  cursorPos.x = textAreaBounds.x; // Carriage return
2359
2412
  }
2360
2413
  }
@@ -2382,7 +2435,7 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
2382
2435
 
2383
2436
  int glyphWidth = 0;
2384
2437
  if (glyphInfo.advanceX != 0) glyphWidth += glyphInfo.advanceX;
2385
- else glyphWidth += (atlasRec.width + glyphInfo.offsetX);
2438
+ else glyphWidth += (int)(atlasRec.width + glyphInfo.offsetX);
2386
2439
 
2387
2440
  cursorPos.x += (glyphWidth*scaleFactor + (float)GuiGetStyle(DEFAULT, TEXT_SPACING));
2388
2441
  //if (i > lastSpacePos) lastSpaceWidth += (atlasRec.width + (float)GuiGetStyle(DEFAULT, TEXT_SPACING));
@@ -2403,7 +2456,7 @@ bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
2403
2456
  // NOTE: Other GuiSlider*() controls use this one
2404
2457
  float GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue, int sliderWidth)
2405
2458
  {
2406
- GuiControlState state = guiState;
2459
+ GuiState state = guiState;
2407
2460
 
2408
2461
  int sliderValue = (int)(((value - minValue)/(maxValue - minValue))*(bounds.width - 2*GuiGetStyle(SLIDER, BORDER_WIDTH)));
2409
2462
 
@@ -2423,7 +2476,7 @@ float GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight
2423
2476
 
2424
2477
  // Update control
2425
2478
  //--------------------------------------------------------------------
2426
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
2479
+ if ((state != STATE_DISABLED) && !guiLocked)
2427
2480
  {
2428
2481
  Vector2 mousePoint = GetMousePosition();
2429
2482
 
@@ -2431,7 +2484,7 @@ float GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight
2431
2484
  {
2432
2485
  if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
2433
2486
  {
2434
- state = GUI_STATE_PRESSED;
2487
+ state = STATE_PRESSED;
2435
2488
 
2436
2489
  // Get equivalent value and slider position from mousePoint.x
2437
2490
  value = ((maxValue - minValue)*(mousePoint.x - (float)(bounds.x + sliderWidth/2)))/(float)(bounds.width - sliderWidth) + minValue;
@@ -2439,7 +2492,7 @@ float GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight
2439
2492
  if (sliderWidth > 0) slider.x = mousePoint.x - slider.width/2; // Slider
2440
2493
  else if (sliderWidth == 0) slider.width = (float)sliderValue; // SliderBar
2441
2494
  }
2442
- else state = GUI_STATE_FOCUSED;
2495
+ else state = STATE_FOCUSED;
2443
2496
  }
2444
2497
 
2445
2498
  if (value > maxValue) value = maxValue;
@@ -2460,11 +2513,11 @@ float GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight
2460
2513
 
2461
2514
  // Draw control
2462
2515
  //--------------------------------------------------------------------
2463
- GuiDrawRectangle(bounds, GuiGetStyle(SLIDER, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(SLIDER, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(SLIDER, (state != GUI_STATE_DISABLED)? BASE_COLOR_NORMAL : BASE_COLOR_DISABLED)), guiAlpha));
2516
+ GuiDrawRectangle(bounds, GuiGetStyle(SLIDER, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(SLIDER, BORDER + (state*3))), guiAlpha), Fade(GetColor(GuiGetStyle(SLIDER, (state != STATE_DISABLED)? BASE_COLOR_NORMAL : BASE_COLOR_DISABLED)), guiAlpha));
2464
2517
 
2465
2518
  // Draw slider internal bar (depends on state)
2466
- if ((state == GUI_STATE_NORMAL) || (state == GUI_STATE_PRESSED)) GuiDrawRectangle(slider, 0, BLANK, Fade(GetColor(GuiGetStyle(SLIDER, BASE_COLOR_PRESSED)), guiAlpha));
2467
- else if (state == GUI_STATE_FOCUSED) GuiDrawRectangle(slider, 0, BLANK, Fade(GetColor(GuiGetStyle(SLIDER, TEXT_COLOR_FOCUSED)), guiAlpha));
2519
+ if ((state == STATE_NORMAL) || (state == STATE_PRESSED)) GuiDrawRectangle(slider, 0, BLANK, Fade(GetColor(GuiGetStyle(SLIDER, BASE_COLOR_PRESSED)), guiAlpha));
2520
+ else if (state == STATE_FOCUSED) GuiDrawRectangle(slider, 0, BLANK, Fade(GetColor(GuiGetStyle(SLIDER, TEXT_COLOR_FOCUSED)), guiAlpha));
2468
2521
 
2469
2522
  // Draw left/right text if provided
2470
2523
  if (textLeft != NULL)
@@ -2475,7 +2528,7 @@ float GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight
2475
2528
  textBounds.x = bounds.x - textBounds.width - GuiGetStyle(SLIDER, TEXT_PADDING);
2476
2529
  textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
2477
2530
 
2478
- GuiDrawText(textLeft, textBounds, GUI_TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(SLIDER, TEXT + (state*3))), guiAlpha));
2531
+ GuiDrawText(textLeft, textBounds, TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(SLIDER, TEXT + (state*3))), guiAlpha));
2479
2532
  }
2480
2533
 
2481
2534
  if (textRight != NULL)
@@ -2486,7 +2539,7 @@ float GuiSliderPro(Rectangle bounds, const char *textLeft, const char *textRight
2486
2539
  textBounds.x = bounds.x + bounds.width + GuiGetStyle(SLIDER, TEXT_PADDING);
2487
2540
  textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
2488
2541
 
2489
- GuiDrawText(textRight, textBounds, GUI_TEXT_ALIGN_LEFT, Fade(GetColor(GuiGetStyle(SLIDER, TEXT + (state*3))), guiAlpha));
2542
+ GuiDrawText(textRight, textBounds, TEXT_ALIGN_LEFT, Fade(GetColor(GuiGetStyle(SLIDER, TEXT + (state*3))), guiAlpha));
2490
2543
  }
2491
2544
  //--------------------------------------------------------------------
2492
2545
 
@@ -2508,7 +2561,7 @@ float GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight
2508
2561
  // Progress Bar control extended, shows current progress value
2509
2562
  float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue)
2510
2563
  {
2511
- GuiControlState state = guiState;
2564
+ GuiState state = guiState;
2512
2565
 
2513
2566
  Rectangle progress = { bounds.x + GuiGetStyle(PROGRESSBAR, BORDER_WIDTH),
2514
2567
  bounds.y + GuiGetStyle(PROGRESSBAR, BORDER_WIDTH) + GuiGetStyle(PROGRESSBAR, PROGRESS_PADDING), 0,
@@ -2516,7 +2569,9 @@ float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRig
2516
2569
 
2517
2570
  // Update control
2518
2571
  //--------------------------------------------------------------------
2519
- if (state != GUI_STATE_DISABLED) progress.width = ((float)(value/(maxValue - minValue))*(float)(bounds.width - 2*GuiGetStyle(PROGRESSBAR, BORDER_WIDTH)));
2572
+ if (value > maxValue) value = maxValue;
2573
+
2574
+ if (state != STATE_DISABLED) progress.width = ((float)(value/(maxValue - minValue))*(float)(bounds.width - 2*GuiGetStyle(PROGRESSBAR, BORDER_WIDTH)));
2520
2575
  //--------------------------------------------------------------------
2521
2576
 
2522
2577
  // Draw control
@@ -2524,8 +2579,8 @@ float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRig
2524
2579
  GuiDrawRectangle(bounds, GuiGetStyle(PROGRESSBAR, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(PROGRESSBAR, BORDER + (state*3))), guiAlpha), BLANK);
2525
2580
 
2526
2581
  // Draw slider internal progress bar (depends on state)
2527
- if ((state == GUI_STATE_NORMAL) || (state == GUI_STATE_PRESSED)) GuiDrawRectangle(progress, 0, BLANK, Fade(GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)), guiAlpha));
2528
- else if (state == GUI_STATE_FOCUSED) GuiDrawRectangle(progress, 0, BLANK, Fade(GetColor(GuiGetStyle(PROGRESSBAR, TEXT_COLOR_FOCUSED)), guiAlpha));
2582
+ if ((state == STATE_NORMAL) || (state == STATE_PRESSED)) GuiDrawRectangle(progress, 0, BLANK, Fade(GetColor(GuiGetStyle(PROGRESSBAR, BASE_COLOR_PRESSED)), guiAlpha));
2583
+ else if (state == STATE_FOCUSED) GuiDrawRectangle(progress, 0, BLANK, Fade(GetColor(GuiGetStyle(PROGRESSBAR, TEXT_COLOR_FOCUSED)), guiAlpha));
2529
2584
 
2530
2585
  // Draw left/right text if provided
2531
2586
  if (textLeft != NULL)
@@ -2536,7 +2591,7 @@ float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRig
2536
2591
  textBounds.x = bounds.x - textBounds.width - GuiGetStyle(PROGRESSBAR, TEXT_PADDING);
2537
2592
  textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
2538
2593
 
2539
- GuiDrawText(textLeft, textBounds, GUI_TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(PROGRESSBAR, TEXT + (state*3))), guiAlpha));
2594
+ GuiDrawText(textLeft, textBounds, TEXT_ALIGN_RIGHT, Fade(GetColor(GuiGetStyle(PROGRESSBAR, TEXT + (state*3))), guiAlpha));
2540
2595
  }
2541
2596
 
2542
2597
  if (textRight != NULL)
@@ -2547,7 +2602,7 @@ float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRig
2547
2602
  textBounds.x = bounds.x + bounds.width + GuiGetStyle(PROGRESSBAR, TEXT_PADDING);
2548
2603
  textBounds.y = bounds.y + bounds.height/2 - GuiGetStyle(DEFAULT, TEXT_SIZE)/2;
2549
2604
 
2550
- GuiDrawText(textRight, textBounds, GUI_TEXT_ALIGN_LEFT, Fade(GetColor(GuiGetStyle(PROGRESSBAR, TEXT + (state*3))), guiAlpha));
2605
+ GuiDrawText(textRight, textBounds, TEXT_ALIGN_LEFT, Fade(GetColor(GuiGetStyle(PROGRESSBAR, TEXT + (state*3))), guiAlpha));
2551
2606
  }
2552
2607
  //--------------------------------------------------------------------
2553
2608
 
@@ -2557,158 +2612,43 @@ float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRig
2557
2612
  // Status Bar control
2558
2613
  void GuiStatusBar(Rectangle bounds, const char *text)
2559
2614
  {
2560
- GuiControlState state = guiState;
2615
+ GuiState state = guiState;
2561
2616
 
2562
2617
  // Draw control
2563
2618
  //--------------------------------------------------------------------
2564
- GuiDrawRectangle(bounds, GuiGetStyle(STATUSBAR, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(STATUSBAR, (state != GUI_STATE_DISABLED)? BORDER_COLOR_NORMAL : BORDER_COLOR_DISABLED)), guiAlpha),
2565
- Fade(GetColor(GuiGetStyle(STATUSBAR, (state != GUI_STATE_DISABLED)? BASE_COLOR_NORMAL : BASE_COLOR_DISABLED)), guiAlpha));
2566
- GuiDrawText(text, GetTextBounds(STATUSBAR, bounds), GuiGetStyle(STATUSBAR, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(STATUSBAR, (state != GUI_STATE_DISABLED)? TEXT_COLOR_NORMAL : TEXT_COLOR_DISABLED)), guiAlpha));
2619
+ GuiDrawRectangle(bounds, GuiGetStyle(STATUSBAR, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(STATUSBAR, (state != STATE_DISABLED)? BORDER_COLOR_NORMAL : BORDER_COLOR_DISABLED)), guiAlpha),
2620
+ Fade(GetColor(GuiGetStyle(STATUSBAR, (state != STATE_DISABLED)? BASE_COLOR_NORMAL : BASE_COLOR_DISABLED)), guiAlpha));
2621
+ GuiDrawText(text, GetTextBounds(STATUSBAR, bounds), GuiGetStyle(STATUSBAR, TEXT_ALIGNMENT), Fade(GetColor(GuiGetStyle(STATUSBAR, (state != STATE_DISABLED)? TEXT_COLOR_NORMAL : TEXT_COLOR_DISABLED)), guiAlpha));
2567
2622
  //--------------------------------------------------------------------
2568
2623
  }
2569
2624
 
2570
2625
  // Dummy rectangle control, intended for placeholding
2571
2626
  void GuiDummyRec(Rectangle bounds, const char *text)
2572
2627
  {
2573
- GuiControlState state = guiState;
2628
+ GuiState state = guiState;
2574
2629
 
2575
2630
  // Update control
2576
2631
  //--------------------------------------------------------------------
2577
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
2632
+ if ((state != STATE_DISABLED) && !guiLocked)
2578
2633
  {
2579
2634
  Vector2 mousePoint = GetMousePosition();
2580
2635
 
2581
2636
  // Check button state
2582
2637
  if (CheckCollisionPointRec(mousePoint, bounds))
2583
2638
  {
2584
- if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = GUI_STATE_PRESSED;
2585
- else state = GUI_STATE_FOCUSED;
2639
+ if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) state = STATE_PRESSED;
2640
+ else state = STATE_FOCUSED;
2586
2641
  }
2587
2642
  }
2588
2643
  //--------------------------------------------------------------------
2589
2644
 
2590
2645
  // Draw control
2591
2646
  //--------------------------------------------------------------------
2592
- GuiDrawRectangle(bounds, 0, BLANK, Fade(GetColor(GuiGetStyle(DEFAULT, (state != GUI_STATE_DISABLED)? BASE_COLOR_NORMAL : BASE_COLOR_DISABLED)), guiAlpha));
2593
- GuiDrawText(text, GetTextBounds(DEFAULT, bounds), GUI_TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(BUTTON, (state != GUI_STATE_DISABLED)? TEXT_COLOR_NORMAL : TEXT_COLOR_DISABLED)), guiAlpha));
2647
+ GuiDrawRectangle(bounds, 0, BLANK, Fade(GetColor(GuiGetStyle(DEFAULT, (state != STATE_DISABLED)? BASE_COLOR_NORMAL : BASE_COLOR_DISABLED)), guiAlpha));
2648
+ GuiDrawText(text, GetTextBounds(DEFAULT, bounds), TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(BUTTON, (state != STATE_DISABLED)? TEXT_COLOR_NORMAL : TEXT_COLOR_DISABLED)), guiAlpha));
2594
2649
  //------------------------------------------------------------------
2595
2650
  }
2596
2651
 
2597
- // Scroll Bar control
2598
- int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue)
2599
- {
2600
- GuiControlState state = guiState;
2601
-
2602
- // Is the scrollbar horizontal or vertical?
2603
- bool isVertical = (bounds.width > bounds.height)? false : true;
2604
-
2605
- // The size (width or height depending on scrollbar type) of the spinner buttons
2606
- const int spinnerSize = GuiGetStyle(SCROLLBAR, ARROWS_VISIBLE)? (isVertical? (int)bounds.width - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH) : (int)bounds.height - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH)) : 0;
2607
-
2608
- // Arrow buttons [<] [>] [∧] [∨]
2609
- Rectangle arrowUpLeft = { 0 };
2610
- Rectangle arrowDownRight = { 0 };
2611
-
2612
- // Actual area of the scrollbar excluding the arrow buttons
2613
- Rectangle scrollbar = { 0 };
2614
-
2615
- // Slider bar that moves --[///]-----
2616
- Rectangle slider = { 0 };
2617
-
2618
- // Normalize value
2619
- if (value > maxValue) value = maxValue;
2620
- if (value < minValue) value = minValue;
2621
-
2622
- const int range = maxValue - minValue;
2623
- int sliderSize = GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_SIZE);
2624
-
2625
- // Calculate rectangles for all of the components
2626
- arrowUpLeft = RAYGUI_CLITERAL(Rectangle){ (float)bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)spinnerSize, (float)spinnerSize };
2627
-
2628
- if (isVertical)
2629
- {
2630
- arrowDownRight = RAYGUI_CLITERAL(Rectangle){ (float)bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)bounds.y + bounds.height - spinnerSize - GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)spinnerSize, (float)spinnerSize};
2631
- scrollbar = RAYGUI_CLITERAL(Rectangle){ bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING), arrowUpLeft.y + arrowUpLeft.height, bounds.width - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING)), bounds.height - arrowUpLeft.height - arrowDownRight.height - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH) };
2632
- sliderSize = (sliderSize >= scrollbar.height)? ((int)scrollbar.height - 2) : sliderSize; // Make sure the slider won't get outside of the scrollbar
2633
- slider = RAYGUI_CLITERAL(Rectangle){ (float)bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING), (float)scrollbar.y + (int)(((float)(value - minValue)/range)*(scrollbar.height - sliderSize)), (float)bounds.width - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING)), (float)sliderSize };
2634
- }
2635
- else
2636
- {
2637
- arrowDownRight = RAYGUI_CLITERAL(Rectangle){ (float)bounds.x + bounds.width - spinnerSize - GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)spinnerSize, (float)spinnerSize};
2638
- scrollbar = RAYGUI_CLITERAL(Rectangle){ arrowUpLeft.x + arrowUpLeft.width, bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING), bounds.width - arrowUpLeft.width - arrowDownRight.width - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH), bounds.height - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING))};
2639
- sliderSize = (sliderSize >= scrollbar.width)? ((int)scrollbar.width - 2) : sliderSize; // Make sure the slider won't get outside of the scrollbar
2640
- slider = RAYGUI_CLITERAL(Rectangle){ (float)scrollbar.x + (int)(((float)(value - minValue)/range)*(scrollbar.width - sliderSize)), (float)bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING), (float)sliderSize, (float)bounds.height - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING)) };
2641
- }
2642
-
2643
- // Update control
2644
- //--------------------------------------------------------------------
2645
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
2646
- {
2647
- Vector2 mousePoint = GetMousePosition();
2648
-
2649
- if (CheckCollisionPointRec(mousePoint, bounds))
2650
- {
2651
- state = GUI_STATE_FOCUSED;
2652
-
2653
- // Handle mouse wheel
2654
- int wheel = (int)GetMouseWheelMove();
2655
- if (wheel != 0) value += wheel;
2656
-
2657
- if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
2658
- {
2659
- if (CheckCollisionPointRec(mousePoint, arrowUpLeft)) value -= range/GuiGetStyle(SCROLLBAR, SCROLL_SPEED);
2660
- else if (CheckCollisionPointRec(mousePoint, arrowDownRight)) value += range/GuiGetStyle(SCROLLBAR, SCROLL_SPEED);
2661
-
2662
- state = GUI_STATE_PRESSED;
2663
- }
2664
- else if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
2665
- {
2666
- if (!isVertical)
2667
- {
2668
- Rectangle scrollArea = { arrowUpLeft.x + arrowUpLeft.width, arrowUpLeft.y, scrollbar.width, bounds.height - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH)};
2669
- if (CheckCollisionPointRec(mousePoint, scrollArea)) value = (int)(((float)(mousePoint.x - scrollArea.x - slider.width/2)*range)/(scrollArea.width - slider.width) + minValue);
2670
- }
2671
- else
2672
- {
2673
- Rectangle scrollArea = { arrowUpLeft.x, arrowUpLeft.y+arrowUpLeft.height, bounds.width - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH), scrollbar.height};
2674
- if (CheckCollisionPointRec(mousePoint, scrollArea)) value = (int)(((float)(mousePoint.y - scrollArea.y - slider.height/2)*range)/(scrollArea.height - slider.height) + minValue);
2675
- }
2676
- }
2677
- }
2678
-
2679
- // Normalize value
2680
- if (value > maxValue) value = maxValue;
2681
- if (value < minValue) value = minValue;
2682
- }
2683
- //--------------------------------------------------------------------
2684
-
2685
- // Draw control
2686
- //--------------------------------------------------------------------
2687
- GuiDrawRectangle(bounds, GuiGetStyle(SCROLLBAR, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(LISTVIEW, BORDER + state*3)), guiAlpha), Fade(GetColor(GuiGetStyle(DEFAULT, BORDER_COLOR_DISABLED)), guiAlpha)); // Draw the background
2688
-
2689
- GuiDrawRectangle(scrollbar, 0, BLANK, Fade(GetColor(GuiGetStyle(BUTTON, BASE_COLOR_NORMAL)), guiAlpha)); // Draw the scrollbar active area background
2690
- GuiDrawRectangle(slider, 0, BLANK, Fade(GetColor(GuiGetStyle(SLIDER, BORDER + state*3)), guiAlpha)); // Draw the slider bar
2691
-
2692
- // Draw arrows (using icon if available)
2693
- if (GuiGetStyle(SCROLLBAR, ARROWS_VISIBLE))
2694
- {
2695
- #if defined(RAYGUI_NO_RICONS)
2696
- GuiDrawText(isVertical? "^" : "<", RAYGUI_CLITERAL(Rectangle){ arrowUpLeft.x, arrowUpLeft.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height },
2697
- GUI_TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha));
2698
- GuiDrawText(isVertical? "v" : ">", RAYGUI_CLITERAL(Rectangle){ arrowDownRight.x, arrowDownRight.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height },
2699
- GUI_TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha));
2700
- #else
2701
- GuiDrawText(isVertical? "#121#" : "#118#", RAYGUI_CLITERAL(Rectangle){ arrowUpLeft.x, arrowUpLeft.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height },
2702
- GUI_TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(SCROLLBAR, TEXT + state*3)), guiAlpha)); // RICON_ARROW_UP_FILL / RICON_ARROW_LEFT_FILL
2703
- GuiDrawText(isVertical? "#120#" : "#119#", RAYGUI_CLITERAL(Rectangle){ arrowDownRight.x, arrowDownRight.y, isVertical? bounds.width : bounds.height, isVertical? bounds.width : bounds.height },
2704
- GUI_TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(SCROLLBAR, TEXT + state*3)), guiAlpha)); // RICON_ARROW_DOWN_FILL / RICON_ARROW_RIGHT_FILL
2705
- #endif
2706
- }
2707
- //--------------------------------------------------------------------
2708
-
2709
- return value;
2710
- }
2711
-
2712
2652
  // List View control
2713
2653
  int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int active)
2714
2654
  {
@@ -2723,24 +2663,24 @@ int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int active
2723
2663
  // List View control with extended parameters
2724
2664
  int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, int *scrollIndex, int active)
2725
2665
  {
2726
- GuiControlState state = guiState;
2666
+ GuiState state = guiState;
2727
2667
  int itemFocused = (focus == NULL)? -1 : *focus;
2728
2668
  int itemSelected = active;
2729
2669
 
2730
2670
  // Check if we need a scroll bar
2731
2671
  bool useScrollBar = false;
2732
- if ((GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT) + GuiGetStyle(LISTVIEW, LIST_ITEMS_PADDING))*count > bounds.height) useScrollBar = true;
2672
+ if ((GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT) + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING))*count > bounds.height) useScrollBar = true;
2733
2673
 
2734
2674
  // Define base item rectangle [0]
2735
2675
  Rectangle itemBounds = { 0 };
2736
- itemBounds.x = bounds.x + GuiGetStyle(LISTVIEW, LIST_ITEMS_PADDING);
2737
- itemBounds.y = bounds.y + GuiGetStyle(LISTVIEW, LIST_ITEMS_PADDING) + GuiGetStyle(DEFAULT, BORDER_WIDTH);
2738
- itemBounds.width = bounds.width - 2*GuiGetStyle(LISTVIEW, LIST_ITEMS_PADDING) - GuiGetStyle(DEFAULT, BORDER_WIDTH);
2676
+ itemBounds.x = bounds.x + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING);
2677
+ itemBounds.y = bounds.y + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING) + GuiGetStyle(DEFAULT, BORDER_WIDTH);
2678
+ itemBounds.width = bounds.width - 2*GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING) - GuiGetStyle(DEFAULT, BORDER_WIDTH);
2739
2679
  itemBounds.height = (float)GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT);
2740
2680
  if (useScrollBar) itemBounds.width -= GuiGetStyle(LISTVIEW, SCROLLBAR_WIDTH);
2741
2681
 
2742
2682
  // Get items on the list
2743
- int visibleItems = (int)bounds.height/(GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT) + GuiGetStyle(LISTVIEW, LIST_ITEMS_PADDING));
2683
+ int visibleItems = (int)bounds.height/(GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT) + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING));
2744
2684
  if (visibleItems > count) visibleItems = count;
2745
2685
 
2746
2686
  int startIndex = (scrollIndex == NULL)? 0 : *scrollIndex;
@@ -2749,14 +2689,14 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, in
2749
2689
 
2750
2690
  // Update control
2751
2691
  //--------------------------------------------------------------------
2752
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
2692
+ if ((state != STATE_DISABLED) && !guiLocked)
2753
2693
  {
2754
2694
  Vector2 mousePoint = GetMousePosition();
2755
2695
 
2756
2696
  // Check mouse inside list view
2757
2697
  if (CheckCollisionPointRec(mousePoint, bounds))
2758
2698
  {
2759
- state = GUI_STATE_FOCUSED;
2699
+ state = STATE_FOCUSED;
2760
2700
 
2761
2701
  // Check focused and selected item
2762
2702
  for (int i = 0; i < visibleItems; i++)
@@ -2773,7 +2713,7 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, in
2773
2713
  }
2774
2714
 
2775
2715
  // Update item rectangle y position for next item
2776
- itemBounds.y += (GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT) + GuiGetStyle(LISTVIEW, LIST_ITEMS_PADDING));
2716
+ itemBounds.y += (GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT) + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING));
2777
2717
  }
2778
2718
 
2779
2719
  if (useScrollBar)
@@ -2791,7 +2731,7 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, in
2791
2731
  else itemFocused = -1;
2792
2732
 
2793
2733
  // Reset item rectangle y to [0]
2794
- itemBounds.y = bounds.y + GuiGetStyle(LISTVIEW, LIST_ITEMS_PADDING) + GuiGetStyle(DEFAULT, BORDER_WIDTH);
2734
+ itemBounds.y = bounds.y + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING) + GuiGetStyle(DEFAULT, BORDER_WIDTH);
2795
2735
  }
2796
2736
  //--------------------------------------------------------------------
2797
2737
 
@@ -2802,7 +2742,7 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, in
2802
2742
  // Draw visible items
2803
2743
  for (int i = 0; ((i < visibleItems) && (text != NULL)); i++)
2804
2744
  {
2805
- if (state == GUI_STATE_DISABLED)
2745
+ if (state == STATE_DISABLED)
2806
2746
  {
2807
2747
  if ((startIndex + i) == itemSelected) GuiDrawRectangle(itemBounds, GuiGetStyle(LISTVIEW, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(LISTVIEW, BORDER_COLOR_DISABLED)), guiAlpha), Fade(GetColor(GuiGetStyle(LISTVIEW, BASE_COLOR_DISABLED)), guiAlpha));
2808
2748
 
@@ -2830,7 +2770,7 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, in
2830
2770
  }
2831
2771
 
2832
2772
  // Update item rectangle y position for next item
2833
- itemBounds.y += (GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT) + GuiGetStyle(LISTVIEW, LIST_ITEMS_PADDING));
2773
+ itemBounds.y += (GuiGetStyle(LISTVIEW, LIST_ITEMS_HEIGHT) + GuiGetStyle(LISTVIEW, LIST_ITEMS_SPACING));
2834
2774
  }
2835
2775
 
2836
2776
  if (useScrollBar)
@@ -2864,12 +2804,12 @@ int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, in
2864
2804
  }
2865
2805
 
2866
2806
  // Color Panel control
2867
- Color GuiColorPanel(Rectangle bounds, Color color)
2807
+ Color GuiColorPanel(Rectangle bounds, const char *text, Color color)
2868
2808
  {
2869
2809
  const Color colWhite = { 255, 255, 255, 255 };
2870
2810
  const Color colBlack = { 0, 0, 0, 255 };
2871
2811
 
2872
- GuiControlState state = guiState;
2812
+ GuiState state = guiState;
2873
2813
  Vector2 pickerSelector = { 0 };
2874
2814
 
2875
2815
  Vector3 vcolor = { (float)color.r/255.0f, (float)color.g/255.0f, (float)color.b/255.0f };
@@ -2887,7 +2827,7 @@ Color GuiColorPanel(Rectangle bounds, Color color)
2887
2827
 
2888
2828
  // Update control
2889
2829
  //--------------------------------------------------------------------
2890
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
2830
+ if ((state != STATE_DISABLED) && !guiLocked)
2891
2831
  {
2892
2832
  Vector2 mousePoint = GetMousePosition();
2893
2833
 
@@ -2895,7 +2835,7 @@ Color GuiColorPanel(Rectangle bounds, Color color)
2895
2835
  {
2896
2836
  if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
2897
2837
  {
2898
- state = GUI_STATE_PRESSED;
2838
+ state = STATE_PRESSED;
2899
2839
  pickerSelector = mousePoint;
2900
2840
 
2901
2841
  // Calculate color from picker
@@ -2916,14 +2856,14 @@ Color GuiColorPanel(Rectangle bounds, Color color)
2916
2856
  (unsigned char)(255.0f*(float)color.a/255.0f) };
2917
2857
 
2918
2858
  }
2919
- else state = GUI_STATE_FOCUSED;
2859
+ else state = STATE_FOCUSED;
2920
2860
  }
2921
2861
  }
2922
2862
  //--------------------------------------------------------------------
2923
2863
 
2924
2864
  // Draw control
2925
2865
  //--------------------------------------------------------------------
2926
- if (state != GUI_STATE_DISABLED)
2866
+ if (state != STATE_DISABLED)
2927
2867
  {
2928
2868
  DrawRectangleGradientEx(bounds, Fade(colWhite, guiAlpha), Fade(colWhite, guiAlpha), Fade(maxHueCol, guiAlpha), Fade(maxHueCol, guiAlpha));
2929
2869
  DrawRectangleGradientEx(bounds, Fade(colBlack, 0), Fade(colBlack, guiAlpha), Fade(colBlack, guiAlpha), Fade(colBlack, 0));
@@ -2945,16 +2885,18 @@ Color GuiColorPanel(Rectangle bounds, Color color)
2945
2885
 
2946
2886
  // Color Bar Alpha control
2947
2887
  // NOTE: Returns alpha value normalized [0..1]
2948
- float GuiColorBarAlpha(Rectangle bounds, float alpha)
2888
+ float GuiColorBarAlpha(Rectangle bounds, const char *text, float alpha)
2949
2889
  {
2950
- #define COLORBARALPHA_CHECKED_SIZE 10
2890
+ #if !defined(RAYGUI_COLORBARALPHA_CHECKED_SIZE)
2891
+ #define RAYGUI_COLORBARALPHA_CHECKED_SIZE 10
2892
+ #endif
2951
2893
 
2952
- GuiControlState state = guiState;
2894
+ GuiState state = guiState;
2953
2895
  Rectangle selector = { (float)bounds.x + alpha*bounds.width - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT)/2, (float)bounds.y - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW), (float)GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT), (float)bounds.height + GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW)*2 };
2954
2896
 
2955
2897
  // Update control
2956
2898
  //--------------------------------------------------------------------
2957
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
2899
+ if ((state != STATE_DISABLED) && !guiLocked)
2958
2900
  {
2959
2901
  Vector2 mousePoint = GetMousePosition();
2960
2902
 
@@ -2963,14 +2905,14 @@ float GuiColorBarAlpha(Rectangle bounds, float alpha)
2963
2905
  {
2964
2906
  if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
2965
2907
  {
2966
- state = GUI_STATE_PRESSED;
2908
+ state = STATE_PRESSED;
2967
2909
 
2968
2910
  alpha = (mousePoint.x - bounds.x)/bounds.width;
2969
2911
  if (alpha <= 0.0f) alpha = 0.0f;
2970
2912
  if (alpha >= 1.0f) alpha = 1.0f;
2971
2913
  //selector.x = bounds.x + (int)(((alpha - 0)/(100 - 0))*(bounds.width - 2*GuiGetStyle(SLIDER, BORDER_WIDTH))) - selector.width/2;
2972
2914
  }
2973
- else state = GUI_STATE_FOCUSED;
2915
+ else state = STATE_FOCUSED;
2974
2916
  }
2975
2917
  }
2976
2918
  //--------------------------------------------------------------------
@@ -2979,16 +2921,16 @@ float GuiColorBarAlpha(Rectangle bounds, float alpha)
2979
2921
  //--------------------------------------------------------------------
2980
2922
 
2981
2923
  // Draw alpha bar: checked background
2982
- if (state != GUI_STATE_DISABLED)
2924
+ if (state != STATE_DISABLED)
2983
2925
  {
2984
- int checksX = (int)bounds.width/COLORBARALPHA_CHECKED_SIZE;
2985
- int checksY = (int)bounds.height/COLORBARALPHA_CHECKED_SIZE;
2926
+ int checksX = (int)bounds.width/RAYGUI_COLORBARALPHA_CHECKED_SIZE;
2927
+ int checksY = (int)bounds.height/RAYGUI_COLORBARALPHA_CHECKED_SIZE;
2986
2928
 
2987
2929
  for (int x = 0; x < checksX; x++)
2988
2930
  {
2989
2931
  for (int y = 0; y < checksY; y++)
2990
2932
  {
2991
- Rectangle check = { bounds.x + x*COLORBARALPHA_CHECKED_SIZE, bounds.y + y*COLORBARALPHA_CHECKED_SIZE, COLORBARALPHA_CHECKED_SIZE, COLORBARALPHA_CHECKED_SIZE };
2933
+ Rectangle check = { bounds.x + x*RAYGUI_COLORBARALPHA_CHECKED_SIZE, bounds.y + y*RAYGUI_COLORBARALPHA_CHECKED_SIZE, RAYGUI_COLORBARALPHA_CHECKED_SIZE, RAYGUI_COLORBARALPHA_CHECKED_SIZE };
2992
2934
  GuiDrawRectangle(check, 0, BLANK, ((x + y)%2)? Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), 0.4f), guiAlpha) : Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.4f), guiAlpha));
2993
2935
  }
2994
2936
  }
@@ -3012,14 +2954,14 @@ float GuiColorBarAlpha(Rectangle bounds, float alpha)
3012
2954
  // Color GuiColorBarSat() [WHITE->color]
3013
2955
  // Color GuiColorBarValue() [BLACK->color], HSV/HSL
3014
2956
  // float GuiColorBarLuminance() [BLACK->WHITE]
3015
- float GuiColorBarHue(Rectangle bounds, float hue)
2957
+ float GuiColorBarHue(Rectangle bounds, const char *text, float hue)
3016
2958
  {
3017
- GuiControlState state = guiState;
2959
+ GuiState state = guiState;
3018
2960
  Rectangle selector = { (float)bounds.x - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW), (float)bounds.y + hue/360.0f*bounds.height - GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT)/2, (float)bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW)*2, (float)GuiGetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT) };
3019
2961
 
3020
2962
  // Update control
3021
2963
  //--------------------------------------------------------------------
3022
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
2964
+ if ((state != STATE_DISABLED) && !guiLocked)
3023
2965
  {
3024
2966
  Vector2 mousePoint = GetMousePosition();
3025
2967
 
@@ -3028,14 +2970,14 @@ float GuiColorBarHue(Rectangle bounds, float hue)
3028
2970
  {
3029
2971
  if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
3030
2972
  {
3031
- state = GUI_STATE_PRESSED;
2973
+ state = STATE_PRESSED;
3032
2974
 
3033
2975
  hue = (mousePoint.y - bounds.y)*360/bounds.height;
3034
2976
  if (hue <= 0.0f) hue = 0.0f;
3035
2977
  if (hue >= 359.0f) hue = 359.0f;
3036
2978
 
3037
2979
  }
3038
- else state = GUI_STATE_FOCUSED;
2980
+ else state = STATE_FOCUSED;
3039
2981
 
3040
2982
  /*if (IsKeyDown(KEY_UP))
3041
2983
  {
@@ -3053,14 +2995,14 @@ float GuiColorBarHue(Rectangle bounds, float hue)
3053
2995
 
3054
2996
  // Draw control
3055
2997
  //--------------------------------------------------------------------
3056
- if (state != GUI_STATE_DISABLED)
2998
+ if (state != STATE_DISABLED)
3057
2999
  {
3058
3000
  // Draw hue bar:color bars
3059
- DrawRectangleGradientV((int)bounds.x, (int)(bounds.y), (int)bounds.width, ceil(bounds.height/6), Fade(RAYGUI_CLITERAL(Color) { 255, 0, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color) { 255, 255, 0, 255 }, guiAlpha));
3060
- DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + bounds.height/6), (int)bounds.width, ceil(bounds.height/6), Fade(RAYGUI_CLITERAL(Color) { 255, 255, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color) { 0, 255, 0, 255 }, guiAlpha));
3061
- DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + 2*(bounds.height/6)), (int)bounds.width, ceil(bounds.height/6), Fade(RAYGUI_CLITERAL(Color) { 0, 255, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color) { 0, 255, 255, 255 }, guiAlpha));
3062
- DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + 3*(bounds.height/6)), (int)bounds.width, ceil(bounds.height/6), Fade(RAYGUI_CLITERAL(Color) { 0, 255, 255, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color) { 0, 0, 255, 255 }, guiAlpha));
3063
- DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + 4*(bounds.height/6)), (int)bounds.width, ceil(bounds.height/6), Fade(RAYGUI_CLITERAL(Color) { 0, 0, 255, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color) { 255, 0, 255, 255 }, guiAlpha));
3001
+ DrawRectangleGradientV((int)bounds.x, (int)(bounds.y), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color) { 255, 0, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color) { 255, 255, 0, 255 }, guiAlpha));
3002
+ DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + bounds.height/6), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color) { 255, 255, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color) { 0, 255, 0, 255 }, guiAlpha));
3003
+ DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + 2*(bounds.height/6)), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color) { 0, 255, 0, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color) { 0, 255, 255, 255 }, guiAlpha));
3004
+ DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + 3*(bounds.height/6)), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color) { 0, 255, 255, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color) { 0, 0, 255, 255 }, guiAlpha));
3005
+ DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + 4*(bounds.height/6)), (int)bounds.width, (int)ceilf(bounds.height/6), Fade(RAYGUI_CLITERAL(Color) { 0, 0, 255, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color) { 255, 0, 255, 255 }, guiAlpha));
3064
3006
  DrawRectangleGradientV((int)bounds.x, (int)(bounds.y + 5*(bounds.height/6)), (int)bounds.width, (int)(bounds.height/6), Fade(RAYGUI_CLITERAL(Color) { 255, 0, 255, 255 }, guiAlpha), Fade(RAYGUI_CLITERAL(Color) { 255, 0, 0, 255 }, guiAlpha));
3065
3007
  }
3066
3008
  else DrawRectangleGradientV((int)bounds.x, (int)bounds.y, (int)bounds.width, (int)bounds.height, Fade(Fade(GetColor(GuiGetStyle(COLORPICKER, BASE_COLOR_DISABLED)), 0.1f), guiAlpha), Fade(GetColor(GuiGetStyle(COLORPICKER, BORDER_COLOR_DISABLED)), guiAlpha));
@@ -3080,15 +3022,15 @@ float GuiColorBarHue(Rectangle bounds, float hue)
3080
3022
  // float GuiColorBarAlpha(Rectangle bounds, float alpha)
3081
3023
  // float GuiColorBarHue(Rectangle bounds, float value)
3082
3024
  // NOTE: bounds define GuiColorPanel() size
3083
- Color GuiColorPicker(Rectangle bounds, Color color)
3025
+ Color GuiColorPicker(Rectangle bounds, const char *text, Color color)
3084
3026
  {
3085
- color = GuiColorPanel(bounds, color);
3027
+ color = GuiColorPanel(bounds, NULL, color);
3086
3028
 
3087
3029
  Rectangle boundsHue = { (float)bounds.x + bounds.width + GuiGetStyle(COLORPICKER, HUEBAR_PADDING), (float)bounds.y, (float)GuiGetStyle(COLORPICKER, HUEBAR_WIDTH), (float)bounds.height };
3088
3030
  //Rectangle boundsAlpha = { bounds.x, bounds.y + bounds.height + GuiGetStyle(COLORPICKER, BARS_PADDING), bounds.width, GuiGetStyle(COLORPICKER, BARS_THICK) };
3089
3031
 
3090
3032
  Vector3 hsv = ConvertRGBtoHSV(RAYGUI_CLITERAL(Vector3){ color.r/255.0f, color.g/255.0f, color.b/255.0f });
3091
- hsv.x = GuiColorBarHue(boundsHue, hsv.x);
3033
+ hsv.x = GuiColorBarHue(boundsHue, NULL, hsv.x);
3092
3034
  //color.a = (unsigned char)(GuiColorBarAlpha(boundsAlpha, (float)color.a/255.0f)*255.0f);
3093
3035
  Vector3 rgb = ConvertHSVtoRGB(hsv);
3094
3036
 
@@ -3100,43 +3042,47 @@ Color GuiColorPicker(Rectangle bounds, Color color)
3100
3042
  // Message Box control
3101
3043
  int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons)
3102
3044
  {
3103
- #define MESSAGEBOX_BUTTON_HEIGHT 24
3104
- #define MESSAGEBOX_BUTTON_PADDING 10
3045
+ #if !defined(RAYGUI_MESSAGEBOX_BUTTON_HEIGHT)
3046
+ #define RAYGUI_MESSAGEBOX_BUTTON_HEIGHT 24
3047
+ #endif
3048
+ #if !defined(RAYGUI_MESSAGEBOX_BUTTON_PADDING)
3049
+ #define RAYGUI_MESSAGEBOX_BUTTON_PADDING 12
3050
+ #endif
3105
3051
 
3106
3052
  int clicked = -1; // Returns clicked button from buttons list, 0 refers to closed window button
3107
3053
 
3108
3054
  int buttonCount = 0;
3109
3055
  const char **buttonsText = GuiTextSplit(buttons, &buttonCount, NULL);
3110
3056
  Rectangle buttonBounds = { 0 };
3111
- buttonBounds.x = bounds.x + MESSAGEBOX_BUTTON_PADDING;
3112
- buttonBounds.y = bounds.y + bounds.height - MESSAGEBOX_BUTTON_HEIGHT - MESSAGEBOX_BUTTON_PADDING;
3113
- buttonBounds.width = (bounds.width - MESSAGEBOX_BUTTON_PADDING*(buttonCount + 1))/buttonCount;
3114
- buttonBounds.height = MESSAGEBOX_BUTTON_HEIGHT;
3057
+ buttonBounds.x = bounds.x + RAYGUI_MESSAGEBOX_BUTTON_PADDING;
3058
+ buttonBounds.y = bounds.y + bounds.height - RAYGUI_MESSAGEBOX_BUTTON_HEIGHT - RAYGUI_MESSAGEBOX_BUTTON_PADDING;
3059
+ buttonBounds.width = (bounds.width - RAYGUI_MESSAGEBOX_BUTTON_PADDING*(buttonCount + 1))/buttonCount;
3060
+ buttonBounds.height = RAYGUI_MESSAGEBOX_BUTTON_HEIGHT;
3115
3061
 
3116
3062
  Vector2 textSize = MeasureTextEx(guiFont, message, (float)GuiGetStyle(DEFAULT, TEXT_SIZE), 1);
3117
3063
 
3118
3064
  Rectangle textBounds = { 0 };
3119
3065
  textBounds.x = bounds.x + bounds.width/2 - textSize.x/2;
3120
- textBounds.y = bounds.y + WINDOW_STATUSBAR_HEIGHT + (bounds.height - WINDOW_STATUSBAR_HEIGHT - MESSAGEBOX_BUTTON_HEIGHT - MESSAGEBOX_BUTTON_PADDING)/2 - textSize.y/2;
3066
+ textBounds.y = bounds.y + RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT + RAYGUI_MESSAGEBOX_BUTTON_PADDING;
3121
3067
  textBounds.width = textSize.x;
3122
- textBounds.height = textSize.y;
3068
+ textBounds.height = bounds.height - RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT - 3*RAYGUI_MESSAGEBOX_BUTTON_PADDING - RAYGUI_MESSAGEBOX_BUTTON_HEIGHT;
3123
3069
 
3124
3070
  // Draw control
3125
3071
  //--------------------------------------------------------------------
3126
3072
  if (GuiWindowBox(bounds, title)) clicked = 0;
3127
3073
 
3128
3074
  int prevTextAlignment = GuiGetStyle(LABEL, TEXT_ALIGNMENT);
3129
- GuiSetStyle(LABEL, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
3075
+ GuiSetStyle(LABEL, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
3130
3076
  GuiLabel(textBounds, message);
3131
3077
  GuiSetStyle(LABEL, TEXT_ALIGNMENT, prevTextAlignment);
3132
3078
 
3133
3079
  prevTextAlignment = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
3134
- GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
3080
+ GuiSetStyle(BUTTON, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
3135
3081
 
3136
3082
  for (int i = 0; i < buttonCount; i++)
3137
3083
  {
3138
3084
  if (GuiButton(buttonBounds, buttonsText[i])) clicked = i + 1;
3139
- buttonBounds.x += (buttonBounds.width + MESSAGEBOX_BUTTON_PADDING);
3085
+ buttonBounds.x += (buttonBounds.width + RAYGUI_MESSAGEBOX_BUTTON_PADDING);
3140
3086
  }
3141
3087
 
3142
3088
  GuiSetStyle(BUTTON, TEXT_ALIGNMENT, prevTextAlignment);
@@ -3146,13 +3092,17 @@ int GuiMessageBox(Rectangle bounds, const char *title, const char *message, cons
3146
3092
  }
3147
3093
 
3148
3094
  // Text Input Box control, ask for text
3149
- int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text)
3095
+ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text, int textMaxSize, int *secretViewActive)
3150
3096
  {
3151
- #define TEXTINPUTBOX_BUTTON_HEIGHT 24
3152
- #define TEXTINPUTBOX_BUTTON_PADDING 10
3153
- #define TEXTINPUTBOX_HEIGHT 30
3154
-
3155
- #define TEXTINPUTBOX_MAX_TEXT_LENGTH 256
3097
+ #if !defined(RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT)
3098
+ #define RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT 28
3099
+ #endif
3100
+ #if !defined(RAYGUI_TEXTINPUTBOX_BUTTON_PADDING)
3101
+ #define RAYGUI_TEXTINPUTBOX_BUTTON_PADDING 12
3102
+ #endif
3103
+ #if !defined(RAYGUI_TEXTINPUTBOX_HEIGHT)
3104
+ #define RAYGUI_TEXTINPUTBOX_HEIGHT 28
3105
+ #endif
3156
3106
 
3157
3107
  // Used to enable text edit mode
3158
3108
  // WARNING: No more than one GuiTextInputBox() should be open at the same time
@@ -3163,12 +3113,12 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co
3163
3113
  int buttonCount = 0;
3164
3114
  const char **buttonsText = GuiTextSplit(buttons, &buttonCount, NULL);
3165
3115
  Rectangle buttonBounds = { 0 };
3166
- buttonBounds.x = bounds.x + TEXTINPUTBOX_BUTTON_PADDING;
3167
- buttonBounds.y = bounds.y + bounds.height - TEXTINPUTBOX_BUTTON_HEIGHT - TEXTINPUTBOX_BUTTON_PADDING;
3168
- buttonBounds.width = (bounds.width - TEXTINPUTBOX_BUTTON_PADDING*(buttonCount + 1))/buttonCount;
3169
- buttonBounds.height = TEXTINPUTBOX_BUTTON_HEIGHT;
3116
+ buttonBounds.x = bounds.x + RAYGUI_TEXTINPUTBOX_BUTTON_PADDING;
3117
+ buttonBounds.y = bounds.y + bounds.height - RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT - RAYGUI_TEXTINPUTBOX_BUTTON_PADDING;
3118
+ buttonBounds.width = (bounds.width - RAYGUI_TEXTINPUTBOX_BUTTON_PADDING*(buttonCount + 1))/buttonCount;
3119
+ buttonBounds.height = RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT;
3170
3120
 
3171
- int messageInputHeight = (int)bounds.height - WINDOW_STATUSBAR_HEIGHT - GuiGetStyle(STATUSBAR, BORDER_WIDTH) - TEXTINPUTBOX_BUTTON_HEIGHT - 2*TEXTINPUTBOX_BUTTON_PADDING;
3121
+ int messageInputHeight = (int)bounds.height - RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT - GuiGetStyle(STATUSBAR, BORDER_WIDTH) - RAYGUI_TEXTINPUTBOX_BUTTON_HEIGHT - 2*RAYGUI_TEXTINPUTBOX_BUTTON_PADDING;
3172
3122
 
3173
3123
  Rectangle textBounds = { 0 };
3174
3124
  if (message != NULL)
@@ -3176,18 +3126,18 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co
3176
3126
  Vector2 textSize = MeasureTextEx(guiFont, message, (float)GuiGetStyle(DEFAULT, TEXT_SIZE), 1);
3177
3127
 
3178
3128
  textBounds.x = bounds.x + bounds.width/2 - textSize.x/2;
3179
- textBounds.y = bounds.y + WINDOW_STATUSBAR_HEIGHT + messageInputHeight/4 - textSize.y/2;
3129
+ textBounds.y = bounds.y + RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT + messageInputHeight/4 - textSize.y/2;
3180
3130
  textBounds.width = textSize.x;
3181
3131
  textBounds.height = textSize.y;
3182
3132
  }
3183
3133
 
3184
3134
  Rectangle textBoxBounds = { 0 };
3185
- textBoxBounds.x = bounds.x + TEXTINPUTBOX_BUTTON_PADDING;
3186
- textBoxBounds.y = bounds.y + WINDOW_STATUSBAR_HEIGHT - TEXTINPUTBOX_HEIGHT/2;
3187
- if (message == NULL) textBoxBounds.y += messageInputHeight/2;
3135
+ textBoxBounds.x = bounds.x + RAYGUI_TEXTINPUTBOX_BUTTON_PADDING;
3136
+ textBoxBounds.y = bounds.y + RAYGUI_WINDOWBOX_STATUSBAR_HEIGHT - RAYGUI_TEXTINPUTBOX_HEIGHT/2;
3137
+ if (message == NULL) textBoxBounds.y = bounds.y + 24 + RAYGUI_TEXTINPUTBOX_BUTTON_PADDING;
3188
3138
  else textBoxBounds.y += (messageInputHeight/2 + messageInputHeight/4);
3189
- textBoxBounds.width = bounds.width - TEXTINPUTBOX_BUTTON_PADDING*2;
3190
- textBoxBounds.height = TEXTINPUTBOX_HEIGHT;
3139
+ textBoxBounds.width = bounds.width - RAYGUI_TEXTINPUTBOX_BUTTON_PADDING*2;
3140
+ textBoxBounds.height = RAYGUI_TEXTINPUTBOX_HEIGHT;
3191
3141
 
3192
3142
  // Draw control
3193
3143
  //--------------------------------------------------------------------
@@ -3197,20 +3147,31 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co
3197
3147
  if (message != NULL)
3198
3148
  {
3199
3149
  int prevTextAlignment = GuiGetStyle(LABEL, TEXT_ALIGNMENT);
3200
- GuiSetStyle(LABEL, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
3150
+ GuiSetStyle(LABEL, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
3201
3151
  GuiLabel(textBounds, message);
3202
3152
  GuiSetStyle(LABEL, TEXT_ALIGNMENT, prevTextAlignment);
3203
3153
  }
3204
3154
 
3205
- if (GuiTextBox(textBoxBounds, text, TEXTINPUTBOX_MAX_TEXT_LENGTH, textEditMode)) textEditMode = !textEditMode;
3155
+ if (secretViewActive != NULL)
3156
+ {
3157
+ static char stars[] = "****************";
3158
+ if (GuiTextBox(RAYGUI_CLITERAL(Rectangle){ textBoxBounds.x, textBoxBounds.y, textBoxBounds.width - 4 - RAYGUI_TEXTINPUTBOX_HEIGHT, textBoxBounds.height },
3159
+ ((*secretViewActive == 1) || textEditMode)? text : stars, textMaxSize, textEditMode)) textEditMode = !textEditMode;
3160
+
3161
+ *secretViewActive = GuiToggle(RAYGUI_CLITERAL(Rectangle){ textBoxBounds.x + textBoxBounds.width - RAYGUI_TEXTINPUTBOX_HEIGHT, textBoxBounds.y, RAYGUI_TEXTINPUTBOX_HEIGHT, RAYGUI_TEXTINPUTBOX_HEIGHT }, (*secretViewActive == 1)? "#44#" : "#45#", *secretViewActive);
3162
+ }
3163
+ else
3164
+ {
3165
+ if (GuiTextBox(textBoxBounds, text, textMaxSize, textEditMode)) textEditMode = !textEditMode;
3166
+ }
3206
3167
 
3207
3168
  int prevBtnTextAlignment = GuiGetStyle(BUTTON, TEXT_ALIGNMENT);
3208
- GuiSetStyle(BUTTON, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
3169
+ GuiSetStyle(BUTTON, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER);
3209
3170
 
3210
3171
  for (int i = 0; i < buttonCount; i++)
3211
3172
  {
3212
3173
  if (GuiButton(buttonBounds, buttonsText[i])) btnIndex = i + 1;
3213
- buttonBounds.x += (buttonBounds.width + MESSAGEBOX_BUTTON_PADDING);
3174
+ buttonBounds.x += (buttonBounds.width + RAYGUI_MESSAGEBOX_BUTTON_PADDING);
3214
3175
  }
3215
3176
 
3216
3177
  GuiSetStyle(BUTTON, TEXT_ALIGNMENT, prevBtnTextAlignment);
@@ -3223,13 +3184,14 @@ int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, co
3223
3184
  // NOTE: Returns grid mouse-hover selected cell
3224
3185
  // About drawing lines at subpixel spacing, simple put, not easy solution:
3225
3186
  // https://stackoverflow.com/questions/4435450/2d-opengl-drawing-lines-that-dont-exactly-fit-pixel-raster
3226
- Vector2 GuiGrid(Rectangle bounds, float spacing, int subdivs)
3187
+ Vector2 GuiGrid(Rectangle bounds, const char *text, float spacing, int subdivs)
3227
3188
  {
3228
- #if !defined(GRID_COLOR_ALPHA)
3229
- #define GRID_COLOR_ALPHA 0.15f // Grid lines alpha amount
3189
+ // Grid lines alpha amount
3190
+ #if !defined(RAYGUI_GRID_ALPHA)
3191
+ #define RAYGUI_GRID_ALPHA 0.15f
3230
3192
  #endif
3231
3193
 
3232
- GuiControlState state = guiState;
3194
+ GuiState state = guiState;
3233
3195
  Vector2 mousePoint = GetMousePosition();
3234
3196
  Vector2 currentCell = { -1, -1 };
3235
3197
 
@@ -3238,21 +3200,25 @@ Vector2 GuiGrid(Rectangle bounds, float spacing, int subdivs)
3238
3200
 
3239
3201
  // Update control
3240
3202
  //--------------------------------------------------------------------
3241
- if ((state != GUI_STATE_DISABLED) && !guiLocked)
3203
+ if ((state != STATE_DISABLED) && !guiLocked)
3242
3204
  {
3243
3205
  if (CheckCollisionPointRec(mousePoint, bounds))
3244
3206
  {
3245
- currentCell.x = (mousePoint.x - bounds.x)/spacing;
3246
- currentCell.y = (mousePoint.y - bounds.y)/spacing;
3207
+ // NOTE: Cell values must be rounded to int
3208
+ currentCell.x = (int)((mousePoint.x - bounds.x)/spacing);
3209
+ currentCell.y = (int)((mousePoint.y - bounds.y)/spacing);
3247
3210
  }
3248
3211
  }
3249
3212
  //--------------------------------------------------------------------
3250
3213
 
3251
3214
  // Draw control
3252
3215
  //--------------------------------------------------------------------
3216
+
3217
+ // TODO: Draw background panel?
3218
+
3253
3219
  switch (state)
3254
3220
  {
3255
- case GUI_STATE_NORMAL:
3221
+ case STATE_NORMAL:
3256
3222
  {
3257
3223
  if (subdivs > 0)
3258
3224
  {
@@ -3260,14 +3226,14 @@ Vector2 GuiGrid(Rectangle bounds, float spacing, int subdivs)
3260
3226
  for (int i = 0; i < linesV; i++)
3261
3227
  {
3262
3228
  Rectangle lineV = { bounds.x + spacing*i/subdivs, bounds.y, 1, bounds.height };
3263
- GuiDrawRectangle(lineV, 0, BLANK, ((i%subdivs) == 0) ? Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), GRID_COLOR_ALPHA*4) : Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), GRID_COLOR_ALPHA));
3229
+ GuiDrawRectangle(lineV, 0, BLANK, ((i%subdivs) == 0) ? Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), RAYGUI_GRID_ALPHA*4) : Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), RAYGUI_GRID_ALPHA));
3264
3230
  }
3265
3231
 
3266
3232
  // Draw horizontal grid lines
3267
3233
  for (int i = 0; i < linesH; i++)
3268
3234
  {
3269
3235
  Rectangle lineH = { bounds.x, bounds.y + spacing*i/subdivs, bounds.width, 1 };
3270
- GuiDrawRectangle(lineH, 0, BLANK, ((i%subdivs) == 0) ? Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), GRID_COLOR_ALPHA*4) : Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), GRID_COLOR_ALPHA));
3236
+ GuiDrawRectangle(lineH, 0, BLANK, ((i%subdivs) == 0) ? Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), RAYGUI_GRID_ALPHA*4) : Fade(GetColor(GuiGetStyle(DEFAULT, LINE_COLOR)), RAYGUI_GRID_ALPHA));
3271
3237
  }
3272
3238
  }
3273
3239
  } break;
@@ -3282,8 +3248,12 @@ Vector2 GuiGrid(Rectangle bounds, float spacing, int subdivs)
3282
3248
  //----------------------------------------------------------------------------------
3283
3249
 
3284
3250
  // Load raygui style file (.rgs)
3251
+ // NOTE: By default a binary file is expected, that file could contain a custom font,
3252
+ // in that case, custom font image atlas is GRAY+ALPHA and pixel data can be compressed (DEFLATE)
3285
3253
  void GuiLoadStyle(const char *fileName)
3286
3254
  {
3255
+ #define MAX_LINE_BUFFER_SIZE 256
3256
+
3287
3257
  bool tryBinary = false;
3288
3258
 
3289
3259
  // Try reading the files as text file first
@@ -3291,8 +3261,8 @@ void GuiLoadStyle(const char *fileName)
3291
3261
 
3292
3262
  if (rgsFile != NULL)
3293
3263
  {
3294
- char buffer[256] = { 0 };
3295
- fgets(buffer, 256, rgsFile);
3264
+ char buffer[MAX_LINE_BUFFER_SIZE] = { 0 };
3265
+ fgets(buffer, MAX_LINE_BUFFER_SIZE, rgsFile);
3296
3266
 
3297
3267
  if (buffer[0] == '#')
3298
3268
  {
@@ -3309,7 +3279,6 @@ void GuiLoadStyle(const char *fileName)
3309
3279
  // Style property: p <control_id> <property_id> <property_value> <property_name>
3310
3280
 
3311
3281
  sscanf(buffer, "p %d %d 0x%x", &controlId, &propertyId, &propertyValue);
3312
-
3313
3282
  GuiSetStyle(controlId, propertyId, (int)propertyValue);
3314
3283
 
3315
3284
  } break;
@@ -3337,12 +3306,19 @@ void GuiLoadStyle(const char *fileName)
3337
3306
  int *values = (int *)RAYGUI_MALLOC(glyphCount*sizeof(int));
3338
3307
  for (int i = 0; i < glyphCount; i++) values[i] = TextToInteger(chars[i]);
3339
3308
 
3309
+ if (font.texture.id != GetFontDefault().texture.id) UnloadTexture(font.texture);
3340
3310
  font = LoadFontEx(TextFormat("%s/%s", GetDirectoryPath(fileName), fontFileName), fontSize, values, glyphCount);
3311
+ if (font.texture.id == 0) font = GetFontDefault();
3341
3312
 
3342
3313
  RAYGUI_FREE(values);
3343
3314
  }
3344
3315
  }
3345
- else font = LoadFontEx(TextFormat("%s/%s", GetDirectoryPath(fileName), fontFileName), fontSize, NULL, 0);
3316
+ else
3317
+ {
3318
+ if (font.texture.id != GetFontDefault().texture.id) UnloadTexture(font.texture);
3319
+ font = LoadFontEx(TextFormat("%s/%s", GetDirectoryPath(fileName), fontFileName), fontSize, NULL, 0);
3320
+ if (font.texture.id == 0) font = GetFontDefault();
3321
+ }
3346
3322
 
3347
3323
  if ((font.texture.id > 0) && (font.glyphCount > 0)) GuiSetFont(font);
3348
3324
 
@@ -3350,7 +3326,7 @@ void GuiLoadStyle(const char *fileName)
3350
3326
  default: break;
3351
3327
  }
3352
3328
 
3353
- fgets(buffer, 256, rgsFile);
3329
+ fgets(buffer, MAX_LINE_BUFFER_SIZE, rgsFile);
3354
3330
  }
3355
3331
  }
3356
3332
  else tryBinary = true;
@@ -3364,7 +3340,7 @@ void GuiLoadStyle(const char *fileName)
3364
3340
 
3365
3341
  if (rgsFile == NULL) return;
3366
3342
 
3367
- char signature[5] = "";
3343
+ char signature[5] = { 0 };
3368
3344
  short version = 0;
3369
3345
  short reserved = 0;
3370
3346
  int propertyCount = 0;
@@ -3381,13 +3357,13 @@ void GuiLoadStyle(const char *fileName)
3381
3357
  {
3382
3358
  short controlId = 0;
3383
3359
  short propertyId = 0;
3384
- int propertyValue = 0;
3360
+ unsigned int propertyValue = 0;
3385
3361
 
3386
3362
  for (int i = 0; i < propertyCount; i++)
3387
3363
  {
3388
3364
  fread(&controlId, 1, sizeof(short), rgsFile);
3389
3365
  fread(&propertyId, 1, sizeof(short), rgsFile);
3390
- fread(&propertyValue, 1, sizeof(int), rgsFile);
3366
+ fread(&propertyValue, 1, sizeof(unsigned int), rgsFile);
3391
3367
 
3392
3368
  if (controlId == 0) // DEFAULT control
3393
3369
  {
@@ -3420,25 +3396,43 @@ void GuiLoadStyle(const char *fileName)
3420
3396
  fread(&whiteRec, 1, sizeof(Rectangle), rgsFile);
3421
3397
 
3422
3398
  // Load font image parameters
3423
- int fontImageSize = 0;
3424
- fread(&fontImageSize, 1, sizeof(int), rgsFile);
3425
-
3426
- if (fontImageSize > 0)
3399
+ int fontImageUncompSize = 0;
3400
+ int fontImageCompSize = 0;
3401
+ fread(&fontImageUncompSize, 1, sizeof(int), rgsFile);
3402
+ fread(&fontImageCompSize, 1, sizeof(int), rgsFile);
3403
+
3404
+ Image imFont = { 0 };
3405
+ imFont.mipmaps = 1;
3406
+ fread(&imFont.width, 1, sizeof(int), rgsFile);
3407
+ fread(&imFont.height, 1, sizeof(int), rgsFile);
3408
+ fread(&imFont.format, 1, sizeof(int), rgsFile);
3409
+
3410
+ if (fontImageCompSize < fontImageUncompSize)
3427
3411
  {
3428
- Image imFont = { 0 };
3429
- imFont.mipmaps = 1;
3430
- fread(&imFont.width, 1, sizeof(int), rgsFile);
3431
- fread(&imFont.height, 1, sizeof(int), rgsFile);
3432
- fread(&imFont.format, 1, sizeof(int), rgsFile);
3433
-
3434
- imFont.data = (unsigned char *)RAYGUI_MALLOC(fontImageSize);
3435
- fread(imFont.data, 1, fontImageSize, rgsFile);
3412
+ // Compressed font atlas image data (DEFLATE), it requires DecompressData()
3413
+ int dataUncompSize = 0;
3414
+ unsigned char *compData = (unsigned char *)RAYGUI_MALLOC(fontImageCompSize);
3415
+ fread(compData, 1, fontImageCompSize, rgsFile);
3416
+ imFont.data = DecompressData(compData, fontImageCompSize, &dataUncompSize);
3436
3417
 
3437
- font.texture = LoadTextureFromImage(imFont);
3418
+ // Security check, dataUncompSize must match the provided fontImageUncompSize
3419
+ if (dataUncompSize != fontImageUncompSize) RAYGUI_LOG("WARNING: Uncompressed font atlas image data could be corrupted");
3438
3420
 
3439
- RAYGUI_FREE(imFont.data);
3421
+ RAYGUI_FREE(compData);
3422
+ }
3423
+ else
3424
+ {
3425
+ // Font atlas image data is not compressed
3426
+ imFont.data = (unsigned char *)RAYGUI_MALLOC(fontImageUncompSize);
3427
+ fread(imFont.data, 1, fontImageUncompSize, rgsFile);
3440
3428
  }
3441
3429
 
3430
+ if (font.texture.id != GetFontDefault().texture.id) UnloadTexture(font.texture);
3431
+ font.texture = LoadTextureFromImage(imFont);
3432
+ if (font.texture.id == 0) font = GetFontDefault();
3433
+
3434
+ RAYGUI_FREE(imFont.data);
3435
+
3442
3436
  // Load font recs data
3443
3437
  font.recs = (Rectangle *)RAYGUI_CALLOC(font.glyphCount, sizeof(Rectangle));
3444
3438
  for (int i = 0; i < font.glyphCount; i++) fread(&font.recs[i], 1, sizeof(Rectangle), rgsFile);
@@ -3488,23 +3482,23 @@ void GuiLoadStyleDefault(void)
3488
3482
  GuiSetStyle(DEFAULT, TEXT_COLOR_DISABLED, 0xaeb7b8ff);
3489
3483
  GuiSetStyle(DEFAULT, BORDER_WIDTH, 1); // WARNING: Some controls use other values
3490
3484
  GuiSetStyle(DEFAULT, TEXT_PADDING, 0); // WARNING: Some controls use other values
3491
- GuiSetStyle(DEFAULT, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER); // WARNING: Some controls use other values
3485
+ GuiSetStyle(DEFAULT, TEXT_ALIGNMENT, TEXT_ALIGN_CENTER); // WARNING: Some controls use other values
3492
3486
 
3493
3487
  // Initialize control-specific property values
3494
3488
  // NOTE: Those properties are in default list but require specific values by control type
3495
- GuiSetStyle(LABEL, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT);
3489
+ GuiSetStyle(LABEL, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
3496
3490
  GuiSetStyle(BUTTON, BORDER_WIDTH, 2);
3497
- GuiSetStyle(SLIDER, TEXT_PADDING, 5);
3498
- GuiSetStyle(CHECKBOX, TEXT_PADDING, 5);
3499
- GuiSetStyle(CHECKBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_RIGHT);
3500
- GuiSetStyle(TEXTBOX, TEXT_PADDING, 5);
3501
- GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT);
3491
+ GuiSetStyle(SLIDER, TEXT_PADDING, 4);
3492
+ GuiSetStyle(CHECKBOX, TEXT_PADDING, 4);
3493
+ GuiSetStyle(CHECKBOX, TEXT_ALIGNMENT, TEXT_ALIGN_RIGHT);
3494
+ GuiSetStyle(TEXTBOX, TEXT_PADDING, 4);
3495
+ GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
3502
3496
  GuiSetStyle(VALUEBOX, TEXT_PADDING, 4);
3503
- GuiSetStyle(VALUEBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT);
3497
+ GuiSetStyle(VALUEBOX, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
3504
3498
  GuiSetStyle(SPINNER, TEXT_PADDING, 4);
3505
- GuiSetStyle(SPINNER, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT);
3506
- GuiSetStyle(STATUSBAR, TEXT_PADDING, 6);
3507
- GuiSetStyle(STATUSBAR, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_LEFT);
3499
+ GuiSetStyle(SPINNER, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
3500
+ GuiSetStyle(STATUSBAR, TEXT_PADDING, 8);
3501
+ GuiSetStyle(STATUSBAR, TEXT_ALIGNMENT, TEXT_ALIGN_LEFT);
3508
3502
 
3509
3503
  // Initialize extended property values
3510
3504
  // NOTE: By default, extended property values are initialized to 0
@@ -3513,35 +3507,33 @@ void GuiLoadStyleDefault(void)
3513
3507
  GuiSetStyle(DEFAULT, LINE_COLOR, 0x90abb5ff); // DEFAULT specific property
3514
3508
  GuiSetStyle(DEFAULT, BACKGROUND_COLOR, 0xf5f5f5ff); // DEFAULT specific property
3515
3509
  GuiSetStyle(TOGGLE, GROUP_PADDING, 2);
3516
- GuiSetStyle(SLIDER, SLIDER_WIDTH, 15);
3510
+ GuiSetStyle(SLIDER, SLIDER_WIDTH, 16);
3517
3511
  GuiSetStyle(SLIDER, SLIDER_PADDING, 1);
3518
3512
  GuiSetStyle(PROGRESSBAR, PROGRESS_PADDING, 1);
3519
3513
  GuiSetStyle(CHECKBOX, CHECK_PADDING, 1);
3520
- GuiSetStyle(COMBOBOX, COMBO_BUTTON_WIDTH, 30);
3521
- GuiSetStyle(COMBOBOX, COMBO_BUTTON_PADDING, 2);
3514
+ GuiSetStyle(COMBOBOX, COMBO_BUTTON_WIDTH, 32);
3515
+ GuiSetStyle(COMBOBOX, COMBO_BUTTON_SPACING, 2);
3522
3516
  GuiSetStyle(DROPDOWNBOX, ARROW_PADDING, 16);
3523
- GuiSetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_PADDING, 2);
3524
- GuiSetStyle(TEXTBOX, TEXT_LINES_PADDING, 5);
3517
+ GuiSetStyle(DROPDOWNBOX, DROPDOWN_ITEMS_SPACING, 2);
3518
+ GuiSetStyle(TEXTBOX, TEXT_LINES_SPACING, 4);
3525
3519
  GuiSetStyle(TEXTBOX, TEXT_INNER_PADDING, 4);
3526
- GuiSetStyle(TEXTBOX, COLOR_SELECTED_FG, 0xf0fffeff);
3527
- GuiSetStyle(TEXTBOX, COLOR_SELECTED_BG, 0x839affe0);
3528
- GuiSetStyle(SPINNER, SPIN_BUTTON_WIDTH, 20);
3529
- GuiSetStyle(SPINNER, SPIN_BUTTON_PADDING, 2);
3520
+ GuiSetStyle(SPINNER, SPIN_BUTTON_WIDTH, 24);
3521
+ GuiSetStyle(SPINNER, SPIN_BUTTON_SPACING, 2);
3530
3522
  GuiSetStyle(SCROLLBAR, BORDER_WIDTH, 0);
3531
3523
  GuiSetStyle(SCROLLBAR, ARROWS_VISIBLE, 0);
3532
3524
  GuiSetStyle(SCROLLBAR, ARROWS_SIZE, 6);
3533
3525
  GuiSetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING, 0);
3534
3526
  GuiSetStyle(SCROLLBAR, SCROLL_SLIDER_SIZE, 16);
3535
3527
  GuiSetStyle(SCROLLBAR, SCROLL_PADDING, 0);
3536
- GuiSetStyle(SCROLLBAR, SCROLL_SPEED, 10);
3537
- GuiSetStyle(LISTVIEW, LIST_ITEMS_HEIGHT, 0x1e);
3538
- GuiSetStyle(LISTVIEW, LIST_ITEMS_PADDING, 2);
3539
- GuiSetStyle(LISTVIEW, SCROLLBAR_WIDTH, 10);
3528
+ GuiSetStyle(SCROLLBAR, SCROLL_SPEED, 12);
3529
+ GuiSetStyle(LISTVIEW, LIST_ITEMS_HEIGHT, 24);
3530
+ GuiSetStyle(LISTVIEW, LIST_ITEMS_SPACING, 2);
3531
+ GuiSetStyle(LISTVIEW, SCROLLBAR_WIDTH, 12);
3540
3532
  GuiSetStyle(LISTVIEW, SCROLLBAR_SIDE, SCROLLBAR_RIGHT_SIDE);
3541
- GuiSetStyle(COLORPICKER, COLOR_SELECTOR_SIZE, 6);
3542
- GuiSetStyle(COLORPICKER, HUEBAR_WIDTH, 0x14);
3543
- GuiSetStyle(COLORPICKER, HUEBAR_PADDING, 0xa);
3544
- GuiSetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT, 6);
3533
+ GuiSetStyle(COLORPICKER, COLOR_SELECTOR_SIZE, 8);
3534
+ GuiSetStyle(COLORPICKER, HUEBAR_WIDTH, 16);
3535
+ GuiSetStyle(COLORPICKER, HUEBAR_PADDING, 8);
3536
+ GuiSetStyle(COLORPICKER, HUEBAR_SELECTOR_HEIGHT, 8);
3545
3537
  GuiSetStyle(COLORPICKER, HUEBAR_SELECTOR_OVERFLOW, 2);
3546
3538
 
3547
3539
  guiFont = GetFontDefault(); // Initialize default font
@@ -3552,35 +3544,42 @@ void GuiLoadStyleDefault(void)
3552
3544
  // a number that can change between ricon versions
3553
3545
  const char *GuiIconText(int iconId, const char *text)
3554
3546
  {
3555
- #if defined(RAYGUI_NO_RICONS)
3547
+ #if defined(RAYGUI_NO_ICONS)
3556
3548
  return NULL;
3557
3549
  #else
3558
3550
  static char buffer[1024] = { 0 };
3559
- memset(buffer, 0, 1024);
3560
-
3561
- sprintf(buffer, "#%03i#", iconId);
3551
+ static char iconBuffer[6] = { 0 };
3562
3552
 
3563
3553
  if (text != NULL)
3564
3554
  {
3555
+ memset(buffer, 0, 1024);
3556
+ sprintf(buffer, "#%03i#", iconId);
3557
+
3565
3558
  for (int i = 5; i < 1024; i++)
3566
3559
  {
3567
3560
  buffer[i] = text[i - 5];
3568
3561
  if (text[i - 5] == '\0') break;
3569
3562
  }
3563
+
3564
+ return buffer;
3565
+ }
3566
+ else
3567
+ {
3568
+ sprintf(iconBuffer, "#%03i#", iconId & 0x1ff);
3569
+
3570
+ return iconBuffer;
3570
3571
  }
3571
-
3572
- return buffer;
3573
3572
  #endif
3574
3573
  }
3575
3574
 
3576
- #if !defined(RAYGUI_NO_RICONS)
3575
+ #if !defined(RAYGUI_NO_ICONS)
3577
3576
 
3578
3577
  // Get full icons data pointer
3579
3578
  unsigned int *GuiGetIcons(void) { return guiIcons; }
3580
3579
 
3581
3580
  // Load raygui icons file (.rgi)
3582
3581
  // NOTE: In case nameIds are required, they can be requested with loadIconsName,
3583
- // they are returned as a guiIconsName[iconCount][RICON_MAX_NAME_LENGTH],
3582
+ // they are returned as a guiIconsName[iconCount][RAYGUI_ICON_MAX_NAME_LENGTH],
3584
3583
  // WARNING: guiIconsName[]][] memory should be manually freed!
3585
3584
  char **GuiLoadIcons(const char *fileName, bool loadIconsName)
3586
3585
  {
@@ -3614,7 +3613,7 @@ char **GuiLoadIcons(const char *fileName, bool loadIconsName)
3614
3613
 
3615
3614
  if (rgiFile != NULL)
3616
3615
  {
3617
- char signature[5] = "";
3616
+ char signature[5] = { 0 };
3618
3617
  short version = 0;
3619
3618
  short reserved = 0;
3620
3619
  short iconCount = 0;
@@ -3636,11 +3635,11 @@ char **GuiLoadIcons(const char *fileName, bool loadIconsName)
3636
3635
  guiIconsName = (char **)RAYGUI_MALLOC(iconCount*sizeof(char **));
3637
3636
  for (int i = 0; i < iconCount; i++)
3638
3637
  {
3639
- guiIconsName[i] = (char *)RAYGUI_MALLOC(RICON_MAX_NAME_LENGTH);
3640
- fread(guiIconsName[i], RICON_MAX_NAME_LENGTH, 1, rgiFile);
3638
+ guiIconsName[i] = (char *)RAYGUI_MALLOC(RAYGUI_ICON_MAX_NAME_LENGTH);
3639
+ fread(guiIconsName[i], RAYGUI_ICON_MAX_NAME_LENGTH, 1, rgiFile);
3641
3640
  }
3642
3641
  }
3643
- else fseek(rgiFile, iconCount*RICON_MAX_NAME_LENGTH, SEEK_CUR);
3642
+ else fseek(rgiFile, iconCount*RAYGUI_ICON_MAX_NAME_LENGTH, SEEK_CUR);
3644
3643
 
3645
3644
  // Read icons data directly over guiIcons data array
3646
3645
  fread(guiIcons, iconCount*(iconSize*iconSize/32), sizeof(unsigned int), rgiFile);
@@ -3655,16 +3654,16 @@ char **GuiLoadIcons(const char *fileName, bool loadIconsName)
3655
3654
  // Draw selected icon using rectangles pixel-by-pixel
3656
3655
  void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color)
3657
3656
  {
3658
- #define BIT_CHECK(a,b) ((a) & (1<<(b)))
3657
+ #define BIT_CHECK(a,b) ((a) & (1u<<(b)))
3659
3658
 
3660
- for (int i = 0, y = 0; i < RICON_SIZE*RICON_SIZE/32; i++)
3659
+ for (int i = 0, y = 0; i < RAYGUI_ICON_SIZE*RAYGUI_ICON_SIZE/32; i++)
3661
3660
  {
3662
3661
  for (int k = 0; k < 32; k++)
3663
3662
  {
3664
- if (BIT_CHECK(guiIcons[iconId*RICON_DATA_ELEMENTS + i], k))
3663
+ if (BIT_CHECK(guiIcons[iconId*RAYGUI_ICON_DATA_ELEMENTS + i], k))
3665
3664
  {
3666
3665
  #if !defined(RAYGUI_STANDALONE)
3667
- DrawRectangle(posX + (k%RICON_SIZE)*pixelSize, posY + y*pixelSize, pixelSize, pixelSize, color);
3666
+ DrawRectangle(posX + (k%RAYGUI_ICON_SIZE)*pixelSize, posY + y*pixelSize, pixelSize, pixelSize, color);
3668
3667
  #endif
3669
3668
  }
3670
3669
 
@@ -3674,65 +3673,91 @@ void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color)
3674
3673
  }
3675
3674
 
3676
3675
  // Get icon bit data
3677
- // NOTE: Bit data array grouped as unsigned int (ICON_SIZE*ICON_SIZE/32 elements)
3676
+ // NOTE: Bit data array grouped as unsigned int (RAYGUI_ICON_SIZE*RAYGUI_ICON_SIZE/32 elements)
3678
3677
  unsigned int *GuiGetIconData(int iconId)
3679
3678
  {
3680
- static unsigned int iconData[RICON_DATA_ELEMENTS] = { 0 };
3681
- memset(iconData, 0, RICON_DATA_ELEMENTS*sizeof(unsigned int));
3679
+ static unsigned int iconData[RAYGUI_ICON_DATA_ELEMENTS] = { 0 };
3680
+ memset(iconData, 0, RAYGUI_ICON_DATA_ELEMENTS*sizeof(unsigned int));
3682
3681
 
3683
- if (iconId < RICON_MAX_ICONS) memcpy(iconData, &guiIcons[iconId*RICON_DATA_ELEMENTS], RICON_DATA_ELEMENTS*sizeof(unsigned int));
3682
+ if (iconId < RAYGUI_ICON_MAX_ICONS) memcpy(iconData, &guiIcons[iconId*RAYGUI_ICON_DATA_ELEMENTS], RAYGUI_ICON_DATA_ELEMENTS*sizeof(unsigned int));
3684
3683
 
3685
3684
  return iconData;
3686
3685
  }
3687
3686
 
3688
3687
  // Set icon bit data
3689
- // NOTE: Data must be provided as unsigned int array (ICON_SIZE*ICON_SIZE/32 elements)
3688
+ // NOTE: Data must be provided as unsigned int array (RAYGUI_ICON_SIZE*RAYGUI_ICON_SIZE/32 elements)
3690
3689
  void GuiSetIconData(int iconId, unsigned int *data)
3691
3690
  {
3692
- if (iconId < RICON_MAX_ICONS) memcpy(&guiIcons[iconId*RICON_DATA_ELEMENTS], data, RICON_DATA_ELEMENTS*sizeof(unsigned int));
3691
+ if (iconId < RAYGUI_ICON_MAX_ICONS) memcpy(&guiIcons[iconId*RAYGUI_ICON_DATA_ELEMENTS], data, RAYGUI_ICON_DATA_ELEMENTS*sizeof(unsigned int));
3692
+ }
3693
+
3694
+ // Set icon scale (1 by default)
3695
+ void GuiSetIconScale(unsigned int scale)
3696
+ {
3697
+ guiIconScale = (scale < 1)? 1 : scale;
3693
3698
  }
3694
3699
 
3695
3700
  // Set icon pixel value
3696
3701
  void GuiSetIconPixel(int iconId, int x, int y)
3697
3702
  {
3698
- #define BIT_SET(a,b) ((a) |= (1<<(b)))
3703
+ #define BIT_SET(a,b) ((a) |= (1u<<(b)))
3699
3704
 
3700
- // This logic works for any RICON_SIZE pixels icons,
3705
+ // This logic works for any RAYGUI_ICON_SIZE pixels icons,
3701
3706
  // For example, in case of 16x16 pixels, every 2 lines fit in one unsigned int data element
3702
- BIT_SET(guiIcons[iconId*RICON_DATA_ELEMENTS + y/(sizeof(unsigned int)*8/RICON_SIZE)], x + (y%(sizeof(unsigned int)*8/RICON_SIZE)*RICON_SIZE));
3707
+ BIT_SET(guiIcons[iconId*RAYGUI_ICON_DATA_ELEMENTS + y/(sizeof(unsigned int)*8/RAYGUI_ICON_SIZE)], x + (y%(sizeof(unsigned int)*8/RAYGUI_ICON_SIZE)*RAYGUI_ICON_SIZE));
3703
3708
  }
3704
3709
 
3705
3710
  // Clear icon pixel value
3706
3711
  void GuiClearIconPixel(int iconId, int x, int y)
3707
3712
  {
3708
- #define BIT_CLEAR(a,b) ((a) &= ~((1)<<(b)))
3713
+ #define BIT_CLEAR(a,b) ((a) &= ~((1u)<<(b)))
3709
3714
 
3710
- // This logic works for any RICON_SIZE pixels icons,
3715
+ // This logic works for any RAYGUI_ICON_SIZE pixels icons,
3711
3716
  // For example, in case of 16x16 pixels, every 2 lines fit in one unsigned int data element
3712
- BIT_CLEAR(guiIcons[iconId*RICON_DATA_ELEMENTS + y/(sizeof(unsigned int)*8/RICON_SIZE)], x + (y%(sizeof(unsigned int)*8/RICON_SIZE)*RICON_SIZE));
3717
+ BIT_CLEAR(guiIcons[iconId*RAYGUI_ICON_DATA_ELEMENTS + y/(sizeof(unsigned int)*8/RAYGUI_ICON_SIZE)], x + (y%(sizeof(unsigned int)*8/RAYGUI_ICON_SIZE)*RAYGUI_ICON_SIZE));
3713
3718
  }
3714
3719
 
3715
3720
  // Check icon pixel value
3716
3721
  bool GuiCheckIconPixel(int iconId, int x, int y)
3717
3722
  {
3718
- #define BIT_CHECK(a,b) ((a) & (1<<(b)))
3723
+ #define BIT_CHECK(a,b) ((a) & (1u<<(b)))
3719
3724
 
3720
3725
  return (BIT_CHECK(guiIcons[iconId*8 + y/2], x + (y%2*16)));
3721
3726
  }
3722
- #endif // !RAYGUI_NO_RICONS
3727
+ #endif // !RAYGUI_NO_ICONS
3723
3728
 
3724
3729
  //----------------------------------------------------------------------------------
3725
3730
  // Module specific Functions Definition
3726
3731
  //----------------------------------------------------------------------------------
3727
- // Gui get text width using default font
3728
- // NOTE: Icon is not considered here
3732
+ // Gui get text width considering icon
3729
3733
  static int GetTextWidth(const char *text)
3730
3734
  {
3735
+ #if !defined(ICON_TEXT_PADDING)
3736
+ #define ICON_TEXT_PADDING 4
3737
+ #endif
3738
+
3731
3739
  Vector2 size = { 0 };
3740
+ int textIconOffset = 0;
3732
3741
 
3733
3742
  if ((text != NULL) && (text[0] != '\0'))
3734
3743
  {
3735
- size = MeasureTextEx(guiFont, text, (float)GuiGetStyle(DEFAULT, TEXT_SIZE), (float)GuiGetStyle(DEFAULT, TEXT_SPACING));
3744
+ if (text[0] == '#')
3745
+ {
3746
+ for (int i = 1; (text[i] != '\0') && (i < 5); i++)
3747
+ {
3748
+ if (text[i] == '#')
3749
+ {
3750
+ textIconOffset = i;
3751
+ break;
3752
+ }
3753
+ }
3754
+ }
3755
+
3756
+ // Make sure guiFont is set, GuiGetStyle() initializes it lazynessly
3757
+ float fontSize = (float)GuiGetStyle(DEFAULT, TEXT_SIZE);
3758
+
3759
+ size = MeasureTextEx(guiFont, text + textIconOffset, fontSize, (float)GuiGetStyle(DEFAULT, TEXT_SPACING));
3760
+ if (textIconOffset > 0) size.x += (RAYGUI_ICON_SIZE - ICON_TEXT_PADDING);
3736
3761
  }
3737
3762
 
3738
3763
  return (int)size.x;
@@ -3751,11 +3776,11 @@ static Rectangle GetTextBounds(int control, Rectangle bounds)
3751
3776
  // Consider TEXT_PADDING properly, depends on control type and TEXT_ALIGNMENT
3752
3777
  switch (control)
3753
3778
  {
3754
- case COMBOBOX: bounds.width -= (GuiGetStyle(control, COMBO_BUTTON_WIDTH) + GuiGetStyle(control, COMBO_BUTTON_PADDING)); break;
3779
+ case COMBOBOX: bounds.width -= (GuiGetStyle(control, COMBO_BUTTON_WIDTH) + GuiGetStyle(control, COMBO_BUTTON_SPACING)); break;
3755
3780
  case VALUEBOX: break; // NOTE: ValueBox text value always centered, text padding applies to label
3756
3781
  default:
3757
3782
  {
3758
- if (GuiGetStyle(control, TEXT_ALIGNMENT) == GUI_TEXT_ALIGN_RIGHT) textBounds.x -= GuiGetStyle(control, TEXT_PADDING);
3783
+ if (GuiGetStyle(control, TEXT_ALIGNMENT) == TEXT_ALIGN_RIGHT) textBounds.x -= GuiGetStyle(control, TEXT_PADDING);
3759
3784
  else textBounds.x += GuiGetStyle(control, TEXT_PADDING);
3760
3785
  } break;
3761
3786
  }
@@ -3770,7 +3795,7 @@ static Rectangle GetTextBounds(int control, Rectangle bounds)
3770
3795
  // NOTE: We support up to 999 values for iconId
3771
3796
  static const char *GetTextIcon(const char *text, int *iconId)
3772
3797
  {
3773
- #if !defined(RAYGUI_NO_RICONS)
3798
+ #if !defined(RAYGUI_NO_ICONS)
3774
3799
  *iconId = -1;
3775
3800
  if (text[0] == '#') // Maybe we have an icon!
3776
3801
  {
@@ -3802,6 +3827,10 @@ static void GuiDrawText(const char *text, Rectangle bounds, int alignment, Color
3802
3827
  {
3803
3828
  #define TEXT_VALIGN_PIXEL_OFFSET(h) ((int)h%2) // Vertical alignment for pixel perfect
3804
3829
 
3830
+ #if !defined(ICON_TEXT_PADDING)
3831
+ #define ICON_TEXT_PADDING 4
3832
+ #endif
3833
+
3805
3834
  if ((text != NULL) && (text[0] != '\0'))
3806
3835
  {
3807
3836
  int iconId = 0;
@@ -3809,40 +3838,40 @@ static void GuiDrawText(const char *text, Rectangle bounds, int alignment, Color
3809
3838
 
3810
3839
  // Get text position depending on alignment and iconId
3811
3840
  //---------------------------------------------------------------------------------
3812
- #define RICON_TEXT_PADDING 4
3813
-
3814
3841
  Vector2 position = { bounds.x, bounds.y };
3815
3842
 
3816
3843
  // NOTE: We get text size after icon has been processed
3817
- int textWidth = GetTextWidth(text);
3818
- int textHeight = GuiGetStyle(DEFAULT, TEXT_SIZE);
3844
+ // TODO: REVIEW: We consider text size in case of line breaks! -> MeasureTextEx() depends on raylib!
3845
+ Vector2 textSize = MeasureTextEx(GuiGetFont(), text, GuiGetStyle(DEFAULT, TEXT_SIZE), GuiGetStyle(DEFAULT, TEXT_SPACING));
3846
+ //int textWidth = GetTextWidth(text);
3847
+ //int textHeight = GuiGetStyle(DEFAULT, TEXT_SIZE);
3819
3848
 
3820
3849
  // If text requires an icon, add size to measure
3821
3850
  if (iconId >= 0)
3822
3851
  {
3823
- textWidth += RICON_SIZE;
3852
+ textSize.x += RAYGUI_ICON_SIZE*guiIconScale;
3824
3853
 
3825
3854
  // WARNING: If only icon provided, text could be pointing to EOF character: '\0'
3826
- if ((text != NULL) && (text[0] != '\0')) textWidth += RICON_TEXT_PADDING;
3855
+ if ((text != NULL) && (text[0] != '\0')) textSize.x += ICON_TEXT_PADDING;
3827
3856
  }
3828
3857
 
3829
3858
  // Check guiTextAlign global variables
3830
3859
  switch (alignment)
3831
3860
  {
3832
- case GUI_TEXT_ALIGN_LEFT:
3861
+ case TEXT_ALIGN_LEFT:
3833
3862
  {
3834
3863
  position.x = bounds.x;
3835
- position.y = bounds.y + bounds.height/2 - textHeight/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height);
3864
+ position.y = bounds.y + bounds.height/2 - textSize.y/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height);
3836
3865
  } break;
3837
- case GUI_TEXT_ALIGN_CENTER:
3866
+ case TEXT_ALIGN_CENTER:
3838
3867
  {
3839
- position.x = bounds.x + bounds.width/2 - textWidth/2;
3840
- position.y = bounds.y + bounds.height/2 - textHeight/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height);
3868
+ position.x = bounds.x + bounds.width/2 - textSize.x/2;
3869
+ position.y = bounds.y + bounds.height/2 - textSize.y/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height);
3841
3870
  } break;
3842
- case GUI_TEXT_ALIGN_RIGHT:
3871
+ case TEXT_ALIGN_RIGHT:
3843
3872
  {
3844
- position.x = bounds.x + bounds.width - textWidth;
3845
- position.y = bounds.y + bounds.height/2 - textHeight/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height);
3873
+ position.x = bounds.x + bounds.width - textSize.x;
3874
+ position.y = bounds.y + bounds.height/2 - textSize.y/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height);
3846
3875
  } break;
3847
3876
  default: break;
3848
3877
  }
@@ -3855,12 +3884,12 @@ static void GuiDrawText(const char *text, Rectangle bounds, int alignment, Color
3855
3884
 
3856
3885
  // Draw text (with icon if available)
3857
3886
  //---------------------------------------------------------------------------------
3858
- #if !defined(RAYGUI_NO_RICONS)
3887
+ #if !defined(RAYGUI_NO_ICONS)
3859
3888
  if (iconId >= 0)
3860
3889
  {
3861
3890
  // NOTE: We consider icon height, probably different than text size
3862
- GuiDrawIcon(iconId, (int)position.x, (int)(bounds.y + bounds.height/2 - RICON_SIZE/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height)), 1, tint);
3863
- position.x += (RICON_SIZE + RICON_TEXT_PADDING);
3891
+ GuiDrawIcon(iconId, (int)position.x, (int)(bounds.y + bounds.height/2 - RAYGUI_ICON_SIZE*guiIconScale/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.height)), guiIconScale, tint);
3892
+ position.x += (RAYGUI_ICON_SIZE*guiIconScale + ICON_TEXT_PADDING);
3864
3893
  }
3865
3894
  #endif
3866
3895
  DrawTextEx(guiFont, text, position, (float)GuiGetStyle(DEFAULT, TEXT_SIZE), (float)GuiGetStyle(DEFAULT, TEXT_SPACING), tint);
@@ -3894,21 +3923,20 @@ static const char **GuiTextSplit(const char *text, int *count, int *textRow)
3894
3923
  // NOTE: Current implementation returns a copy of the provided string with '\0' (string end delimiter)
3895
3924
  // inserted between strings defined by "delimiter" parameter. No memory is dynamically allocated,
3896
3925
  // all used memory is static... it has some limitations:
3897
- // 1. Maximum number of possible split strings is set by TEXTSPLIT_MAX_TEXT_ELEMENTS
3898
- // 2. Maximum size of text to split is TEXTSPLIT_MAX_TEXT_LENGTH
3926
+ // 1. Maximum number of possible split strings is set by RAYGUI_TEXTSPLIT_MAX_ITEMS
3927
+ // 2. Maximum size of text to split is RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE
3899
3928
  // NOTE: Those definitions could be externally provided if required
3900
3929
 
3901
- #if !defined(TEXTSPLIT_MAX_TEXT_LENGTH)
3902
- #define TEXTSPLIT_MAX_TEXT_LENGTH 1024
3930
+ #if !defined(RAYGUI_TEXTSPLIT_MAX_ITEMS)
3931
+ #define RAYGUI_TEXTSPLIT_MAX_ITEMS 128
3903
3932
  #endif
3904
-
3905
- #if !defined(TEXTSPLIT_MAX_TEXT_ELEMENTS)
3906
- #define TEXTSPLIT_MAX_TEXT_ELEMENTS 128
3933
+ #if !defined(RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE)
3934
+ #define RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE 1024
3907
3935
  #endif
3908
3936
 
3909
- static const char *result[TEXTSPLIT_MAX_TEXT_ELEMENTS] = { NULL };
3910
- static char buffer[TEXTSPLIT_MAX_TEXT_LENGTH] = { 0 };
3911
- memset(buffer, 0, TEXTSPLIT_MAX_TEXT_LENGTH);
3937
+ static const char *result[RAYGUI_TEXTSPLIT_MAX_ITEMS] = { NULL };
3938
+ static char buffer[RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE] = { 0 };
3939
+ memset(buffer, 0, RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE);
3912
3940
 
3913
3941
  result[0] = buffer;
3914
3942
  int counter = 1;
@@ -3916,7 +3944,7 @@ static const char **GuiTextSplit(const char *text, int *count, int *textRow)
3916
3944
  if (textRow != NULL) textRow[0] = 0;
3917
3945
 
3918
3946
  // Count how many substrings we have on text and point to every one
3919
- for (int i = 0; i < TEXTSPLIT_MAX_TEXT_LENGTH; i++)
3947
+ for (int i = 0; i < RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE; i++)
3920
3948
  {
3921
3949
  buffer[i] = text[i];
3922
3950
  if (buffer[i] == '\0') break;
@@ -3933,7 +3961,7 @@ static const char **GuiTextSplit(const char *text, int *count, int *textRow)
3933
3961
  buffer[i] = '\0'; // Set an end of string at this point
3934
3962
 
3935
3963
  counter++;
3936
- if (counter == TEXTSPLIT_MAX_TEXT_ELEMENTS) break;
3964
+ if (counter == RAYGUI_TEXTSPLIT_MAX_ITEMS) break;
3937
3965
  }
3938
3966
  }
3939
3967
 
@@ -4066,6 +4094,121 @@ static Vector3 ConvertHSVtoRGB(Vector3 hsv)
4066
4094
  return rgb;
4067
4095
  }
4068
4096
 
4097
+ // Scroll bar control (used by GuiScrollPanel())
4098
+ static int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue)
4099
+ {
4100
+ GuiState state = guiState;
4101
+
4102
+ // Is the scrollbar horizontal or vertical?
4103
+ bool isVertical = (bounds.width > bounds.height) ? false : true;
4104
+
4105
+ // The size (width or height depending on scrollbar type) of the spinner buttons
4106
+ const int spinnerSize = GuiGetStyle(SCROLLBAR, ARROWS_VISIBLE) ? (isVertical ? (int)bounds.width - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH) : (int)bounds.height - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH)) : 0;
4107
+
4108
+ // Arrow buttons [<] [>] [∧] [∨]
4109
+ Rectangle arrowUpLeft = { 0 };
4110
+ Rectangle arrowDownRight = { 0 };
4111
+
4112
+ // Actual area of the scrollbar excluding the arrow buttons
4113
+ Rectangle scrollbar = { 0 };
4114
+
4115
+ // Slider bar that moves --[///]-----
4116
+ Rectangle slider = { 0 };
4117
+
4118
+ // Normalize value
4119
+ if (value > maxValue) value = maxValue;
4120
+ if (value < minValue) value = minValue;
4121
+
4122
+ const int range = maxValue - minValue;
4123
+ int sliderSize = GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_SIZE);
4124
+
4125
+ // Calculate rectangles for all of the components
4126
+ arrowUpLeft = RAYGUI_CLITERAL(Rectangle) { (float)bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)spinnerSize, (float)spinnerSize };
4127
+
4128
+ if (isVertical)
4129
+ {
4130
+ arrowDownRight = RAYGUI_CLITERAL(Rectangle) { (float)bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)bounds.y + bounds.height - spinnerSize - GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)spinnerSize, (float)spinnerSize };
4131
+ scrollbar = RAYGUI_CLITERAL(Rectangle) { bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING), arrowUpLeft.y + arrowUpLeft.height, bounds.width - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING)), bounds.height - arrowUpLeft.height - arrowDownRight.height - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH) };
4132
+ sliderSize = (sliderSize >= scrollbar.height) ? ((int)scrollbar.height - 2) : sliderSize; // Make sure the slider won't get outside of the scrollbar
4133
+ slider = RAYGUI_CLITERAL(Rectangle) { (float)bounds.x + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING), (float)scrollbar.y + (int)(((float)(value - minValue)/range)*(scrollbar.height - sliderSize)), (float)bounds.width - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING)), (float)sliderSize };
4134
+ }
4135
+ else
4136
+ {
4137
+ arrowDownRight = RAYGUI_CLITERAL(Rectangle) { (float)bounds.x + bounds.width - spinnerSize - GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH), (float)spinnerSize, (float)spinnerSize };
4138
+ scrollbar = RAYGUI_CLITERAL(Rectangle) { arrowUpLeft.x + arrowUpLeft.width, bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING), bounds.width - arrowUpLeft.width - arrowDownRight.width - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH), bounds.height - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_PADDING)) };
4139
+ sliderSize = (sliderSize >= scrollbar.width) ? ((int)scrollbar.width - 2) : sliderSize; // Make sure the slider won't get outside of the scrollbar
4140
+ slider = RAYGUI_CLITERAL(Rectangle) { (float)scrollbar.x + (int)(((float)(value - minValue)/range)*(scrollbar.width - sliderSize)), (float)bounds.y + GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING), (float)sliderSize, (float)bounds.height - 2*(GuiGetStyle(SCROLLBAR, BORDER_WIDTH) + GuiGetStyle(SCROLLBAR, SCROLL_SLIDER_PADDING)) };
4141
+ }
4142
+
4143
+ // Update control
4144
+ //--------------------------------------------------------------------
4145
+ if ((state != STATE_DISABLED) && !guiLocked)
4146
+ {
4147
+ Vector2 mousePoint = GetMousePosition();
4148
+
4149
+ if (CheckCollisionPointRec(mousePoint, bounds))
4150
+ {
4151
+ state = STATE_FOCUSED;
4152
+
4153
+ // Handle mouse wheel
4154
+ int wheel = (int)GetMouseWheelMove();
4155
+ if (wheel != 0) value += wheel;
4156
+
4157
+ if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON))
4158
+ {
4159
+ if (CheckCollisionPointRec(mousePoint, arrowUpLeft)) value -= range/GuiGetStyle(SCROLLBAR, SCROLL_SPEED);
4160
+ else if (CheckCollisionPointRec(mousePoint, arrowDownRight)) value += range/GuiGetStyle(SCROLLBAR, SCROLL_SPEED);
4161
+
4162
+ state = STATE_PRESSED;
4163
+ }
4164
+ else if (IsMouseButtonDown(MOUSE_LEFT_BUTTON))
4165
+ {
4166
+ if (!isVertical)
4167
+ {
4168
+ Rectangle scrollArea = { arrowUpLeft.x + arrowUpLeft.width, arrowUpLeft.y, scrollbar.width, bounds.height - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH) };
4169
+ if (CheckCollisionPointRec(mousePoint, scrollArea)) value = (int)(((float)(mousePoint.x - scrollArea.x - slider.width/2)*range)/(scrollArea.width - slider.width) + minValue);
4170
+ }
4171
+ else
4172
+ {
4173
+ Rectangle scrollArea = { arrowUpLeft.x, arrowUpLeft.y+arrowUpLeft.height, bounds.width - 2*GuiGetStyle(SCROLLBAR, BORDER_WIDTH), scrollbar.height };
4174
+ if (CheckCollisionPointRec(mousePoint, scrollArea)) value = (int)(((float)(mousePoint.y - scrollArea.y - slider.height/2)*range)/(scrollArea.height - slider.height) + minValue);
4175
+ }
4176
+ }
4177
+ }
4178
+
4179
+ // Normalize value
4180
+ if (value > maxValue) value = maxValue;
4181
+ if (value < minValue) value = minValue;
4182
+ }
4183
+ //--------------------------------------------------------------------
4184
+
4185
+ // Draw control
4186
+ //--------------------------------------------------------------------
4187
+ GuiDrawRectangle(bounds, GuiGetStyle(SCROLLBAR, BORDER_WIDTH), Fade(GetColor(GuiGetStyle(LISTVIEW, BORDER + state*3)), guiAlpha), Fade(GetColor(GuiGetStyle(DEFAULT, BORDER_COLOR_DISABLED)), guiAlpha)); // Draw the background
4188
+
4189
+ GuiDrawRectangle(scrollbar, 0, BLANK, Fade(GetColor(GuiGetStyle(BUTTON, BASE_COLOR_NORMAL)), guiAlpha)); // Draw the scrollbar active area background
4190
+ GuiDrawRectangle(slider, 0, BLANK, Fade(GetColor(GuiGetStyle(SLIDER, BORDER + state*3)), guiAlpha)); // Draw the slider bar
4191
+
4192
+ // Draw arrows (using icon if available)
4193
+ if (GuiGetStyle(SCROLLBAR, ARROWS_VISIBLE))
4194
+ {
4195
+ #if defined(RAYGUI_NO_ICONS)
4196
+ GuiDrawText(isVertical ? "^" : "<", RAYGUI_CLITERAL(Rectangle){ arrowUpLeft.x, arrowUpLeft.y, isVertical ? bounds.width : bounds.height, isVertical ? bounds.width : bounds.height },
4197
+ TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha));
4198
+ GuiDrawText(isVertical ? "v" : ">", RAYGUI_CLITERAL(Rectangle){ arrowDownRight.x, arrowDownRight.y, isVertical ? bounds.width : bounds.height, isVertical ? bounds.width : bounds.height },
4199
+ TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(DROPDOWNBOX, TEXT + (state*3))), guiAlpha));
4200
+ #else
4201
+ GuiDrawText(isVertical ? "#121#" : "#118#", RAYGUI_CLITERAL(Rectangle){ arrowUpLeft.x, arrowUpLeft.y, isVertical ? bounds.width : bounds.height, isVertical ? bounds.width : bounds.height },
4202
+ TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(SCROLLBAR, TEXT + state*3)), guiAlpha)); // ICON_ARROW_UP_FILL / ICON_ARROW_LEFT_FILL
4203
+ GuiDrawText(isVertical ? "#120#" : "#119#", RAYGUI_CLITERAL(Rectangle){ arrowDownRight.x, arrowDownRight.y, isVertical ? bounds.width : bounds.height, isVertical ? bounds.width : bounds.height },
4204
+ TEXT_ALIGN_CENTER, Fade(GetColor(GuiGetStyle(SCROLLBAR, TEXT + state*3)), guiAlpha)); // ICON_ARROW_DOWN_FILL / ICON_ARROW_RIGHT_FILL
4205
+ #endif
4206
+ }
4207
+ //--------------------------------------------------------------------
4208
+
4209
+ return value;
4210
+ }
4211
+
4069
4212
  #if defined(RAYGUI_STANDALONE)
4070
4213
  // Returns a Color struct from hexadecimal value
4071
4214
  static Color GetColor(int hexValue)
@@ -4111,9 +4254,11 @@ static Color Fade(Color color, float alpha)
4111
4254
  // Formatting of text with variables to 'embed'
4112
4255
  static const char *TextFormat(const char *text, ...)
4113
4256
  {
4114
- #define MAX_FORMATTEXT_LENGTH 64
4257
+ #if !defined(RAYGUI_TEXTFORMAT_MAX_SIZE)
4258
+ #define RAYGUI_TEXTFORMAT_MAX_SIZE 256
4259
+ #endif
4115
4260
 
4116
- static char buffer[MAX_FORMATTEXT_LENGTH];
4261
+ static char buffer[RAYGUI_TEXTFORMAT_MAX_SIZE];
4117
4262
 
4118
4263
  va_list args;
4119
4264
  va_start(args, text);
@@ -4131,21 +4276,25 @@ static void DrawRectangleGradientV(int posX, int posY, int width, int height, Co
4131
4276
  DrawRectangleGradientEx(bounds, color1, color2, color2, color1);
4132
4277
  }
4133
4278
 
4134
- #define TEXTSPLIT_MAX_TEXT_BUFFER_LENGTH 1024 // Size of static buffer: TextSplit()
4135
- #define TEXTSPLIT_MAX_SUBSTRINGS_COUNT 128 // Size of static pointers array: TextSplit()
4136
-
4137
4279
  // Split string into multiple strings
4138
4280
  const char **TextSplit(const char *text, char delimiter, int *count)
4139
4281
  {
4140
4282
  // NOTE: Current implementation returns a copy of the provided string with '\0' (string end delimiter)
4141
4283
  // inserted between strings defined by "delimiter" parameter. No memory is dynamically allocated,
4142
4284
  // all used memory is static... it has some limitations:
4143
- // 1. Maximum number of possible split strings is set by TEXTSPLIT_MAX_SUBSTRINGS_COUNT
4144
- // 2. Maximum size of text to split is TEXTSPLIT_MAX_TEXT_BUFFER_LENGTH
4285
+ // 1. Maximum number of possible split strings is set by RAYGUI_TEXTSPLIT_MAX_ITEMS
4286
+ // 2. Maximum size of text to split is RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE
4287
+
4288
+ #if !defined(RAYGUI_TEXTSPLIT_MAX_ITEMS)
4289
+ #define RAYGUI_TEXTSPLIT_MAX_ITEMS 128
4290
+ #endif
4291
+ #if !defined(RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE)
4292
+ #define RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE 1024
4293
+ #endif
4145
4294
 
4146
- static const char *result[TEXTSPLIT_MAX_SUBSTRINGS_COUNT] = { NULL };
4147
- static char buffer[TEXTSPLIT_MAX_TEXT_BUFFER_LENGTH] = { 0 };
4148
- memset(buffer, 0, TEXTSPLIT_MAX_TEXT_BUFFER_LENGTH);
4295
+ static const char *result[RAYGUI_TEXTSPLIT_MAX_ITEMS] = { NULL };
4296
+ static char buffer[RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE] = { 0 };
4297
+ memset(buffer, 0, RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE);
4149
4298
 
4150
4299
  result[0] = buffer;
4151
4300
  int counter = 0;
@@ -4155,7 +4304,7 @@ const char **TextSplit(const char *text, char delimiter, int *count)
4155
4304
  counter = 1;
4156
4305
 
4157
4306
  // Count how many substrings we have on text and point to every one
4158
- for (int i = 0; i < TEXTSPLIT_MAX_TEXT_BUFFER_LENGTH; i++)
4307
+ for (int i = 0; i < RAYGUI_TEXTSPLIT_MAX_TEXT_SIZE; i++)
4159
4308
  {
4160
4309
  buffer[i] = text[i];
4161
4310
  if (buffer[i] == '\0') break;
@@ -4165,7 +4314,7 @@ const char **TextSplit(const char *text, char delimiter, int *count)
4165
4314
  result[counter] = buffer + i + 1;
4166
4315
  counter++;
4167
4316
 
4168
- if (counter == TEXTSPLIT_MAX_SUBSTRINGS_COUNT) break;
4317
+ if (counter == RAYGUI_TEXTSPLIT_MAX_ITEMS) break;
4169
4318
  }
4170
4319
  }
4171
4320
  }