185#define RAYGUI_VERSION "3.0"
187#if !defined(RAYGUI_STANDALONE)
194 #if defined(BUILD_LIBTYPE_SHARED)
195 #define RAYGUIAPI __declspec(dllexport)
196 #elif defined(USE_LIBTYPE_SHARED)
197 #define RAYGUIAPI __declspec(dllimport)
212 #define RAYGUI_MALLOC(sz) malloc(sz)
215 #define RAYGUI_CALLOC(n,sz) calloc(n,sz)
218 #define RAYGUI_FREE(p) free(p)
222#define TRACELOG(level, ...) (void)0
228#if defined(RAYGUI_STANDALONE)
232 typedef enum {
false,
true }
bool;
250 typedef struct Color {
286 typedef struct Font {
465#if defined(__cplusplus)
538#if !defined(RAYGUI_NO_RICONS)
551#if defined(__cplusplus)
563#if defined(RAYGUI_IMPLEMENTATION)
572 #define RAYGUI_CLITERAL(name) name
574 #define RAYGUI_CLITERAL(name) (name)
577#if !defined(RAYGUI_NO_RICONS)
579#if defined(RAYGUI_CUSTOM_RICONS)
581#define RICONS_IMPLEMENTATION
587#define RICON_MAX_ICONS 256
588#define RICON_MAX_NAME_LENGTH 32
594#define RICON_DATA_ELEMENTS (RICON_SIZE*RICON_SIZE/32)
601 RICON_FOLDER_FILE_OPEN = 1,
602 RICON_FILE_SAVE_CLASSIC = 2,
603 RICON_FOLDER_OPEN = 3,
604 RICON_FOLDER_SAVE = 4,
607 RICON_FILE_EXPORT = 7,
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,
618 RICON_FILE_PASTE = 18,
619 RICON_CURSOR_HAND = 19,
620 RICON_CURSOR_POINTER = 20,
621 RICON_CURSOR_CLASSIC = 21,
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,
629 RICON_COLOR_BUCKET = 29,
634 RICON_FILTER_POINT = 34,
635 RICON_FILTER_BILINEAR = 35,
637 RICON_CROP_ALPHA = 37,
638 RICON_SQUARE_TOGGLE = 38,
640 RICON_SYMMETRY_HORIZONTAL = 40,
641 RICON_SYMMETRY_VERTICAL = 41,
646 RICON_FILTER_TOP = 46,
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,
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,
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,
688 RICON_BOX_TOP_LEFT = 88,
689 RICON_BOX_CENTER = 89,
690 RICON_BOX_CIRCLE_MASK = 90,
692 RICON_ALPHA_MULTIPLY = 92,
693 RICON_ALPHA_CLEAR = 93,
694 RICON_DITHERING = 94,
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,
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,
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,
737 RICON_LOCK_CLOSE = 137,
738 RICON_LOCK_OPEN = 138,
742 RICON_GEAR_BIG = 142,
744 RICON_HAND_POINTER = 144,
747 RICON_EXPLOSION = 147,
750 RICON_PLAYER_JUMP = 150,
753 RICON_TEXT_POPUP = 153,
756 RICON_CRACK_POINTS = 156,
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,
771 RICON_LINK_NET = 171,
772 RICON_LINK_BOXES = 172,
773 RICON_LINK_MULTI = 173,
775 RICON_LINK_BROKE = 175,
776 RICON_TEXT_NOTES = 176,
777 RICON_NOTEBOOK = 177,
778 RICON_SUITCASE = 178,
779 RICON_SUITCASE_ZIP = 179,
783 RICON_PHOTO_CAMERA = 183,
784 RICON_PHOTO_CAMERA_FLASH = 184,
788 RICON_VERTICAL_BARS = 188,
789 RICON_VERTICAL_BARS_FILL = 189,
790 RICON_LIFE_BARS = 190,
792 RICON_CROSSLINE = 192,
794 RICON_FILETYPE_ALPHA = 194,
795 RICON_FILETYPE_HOME = 195,
796 RICON_LAYERS_VISIBLE = 196,
869static unsigned int guiIcons[RICON_MAX_ICONS*RICON_DATA_ELEMENTS] = {
870 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
871 0x3ff80000, 0x2f082008, 0x2042207e, 0x40027fc2, 0x40024002, 0x40024002, 0x40024002, 0x00007ffe,
872 0x3ffe0000, 0x44226422, 0x400247e2, 0x5ffa4002, 0x57ea500a, 0x500a500a, 0x40025ffa, 0x00007ffe,
873 0x00000000, 0x0042007e, 0x40027fc2, 0x40024002, 0x41024002, 0x44424282, 0x793e4102, 0x00000100,
874 0x00000000, 0x0042007e, 0x40027fc2, 0x40024002, 0x41024102, 0x44424102, 0x793e4282, 0x00000000,
875 0x3ff00000, 0x201c2010, 0x20042004, 0x21042004, 0x24442284, 0x21042104, 0x20042104, 0x00003ffc,
876 0x3ff00000, 0x201c2010, 0x20042004, 0x21042004, 0x21042104, 0x22842444, 0x20042104, 0x00003ffc,
877 0x3ff00000, 0x201c2010, 0x00042004, 0x20041004, 0x20844784, 0x00841384, 0x20042784, 0x00003ffc,
878 0x3ff00000, 0x201c2010, 0x20042004, 0x20042004, 0x22042204, 0x22042f84, 0x20042204, 0x00003ffc,
879 0x3ff00000, 0x201c2010, 0x20042004, 0x20042004, 0x25042884, 0x25042204, 0x20042884, 0x00003ffc,
880 0x3ff00000, 0x201c2010, 0x20042004, 0x20042ff4, 0x20042ff4, 0x20042ff4, 0x20042004, 0x00003ffc,
881 0x3ff00000, 0x201c2010, 0x27042004, 0x244424c4, 0x26442444, 0x20642664, 0x20042004, 0x00003ffc,
882 0x3ff00000, 0x201c2010, 0x26042604, 0x20042004, 0x35442884, 0x2414222c, 0x20042004, 0x00003ffc,
883 0x3ff00000, 0x201c2010, 0x20c42004, 0x22442144, 0x22442444, 0x20c42144, 0x20042004, 0x00003ffc,
884 0x3ff00000, 0x3ffc2ff0, 0x3f3c2ff4, 0x3dbc2eb4, 0x3dbc2bb4, 0x3f3c2eb4, 0x3ffc2ff4, 0x00002ff4,
885 0x3ff00000, 0x201c2010, 0x21842184, 0x21842004, 0x21842184, 0x21842184, 0x20042184, 0x00003ffc,
886 0x0ff00000, 0x381c0810, 0x28042804, 0x28042804, 0x28042804, 0x28042804, 0x20102ffc, 0x00003ff0,
887 0x00000000, 0x701c0000, 0x079c1e14, 0x55a000f0, 0x079c00f0, 0x701c1e14, 0x00000000, 0x00000000,
888 0x01c00000, 0x13e41bec, 0x3f841004, 0x204420c4, 0x20442044, 0x20442044, 0x207c2044, 0x00003fc0,
889 0x00000000, 0x3aa00fe0, 0x2abc2aa0, 0x2aa42aa4, 0x20042aa4, 0x20042004, 0x3ffc2004, 0x00000000,
890 0x00000000, 0x003c000c, 0x030800c8, 0x30100c10, 0x10202020, 0x04400840, 0x01800280, 0x00000000,
891 0x00000000, 0x00180000, 0x01f00078, 0x03e007f0, 0x07c003e0, 0x04000e40, 0x00000000, 0x00000000,
892 0x00000000, 0x04000000, 0x11000a00, 0x04400a80, 0x01100220, 0x00580088, 0x00000038, 0x00000000,
893 0x04000000, 0x15000a00, 0x50402880, 0x14102820, 0x05040a08, 0x015c028c, 0x007c00bc, 0x00000000,
894 0x01c00000, 0x01400140, 0x01400140, 0x0ff80140, 0x0ff80808, 0x0aa80808, 0x0aa80aa8, 0x00000ff8,
895 0x1ffc0000, 0x5ffc7ffe, 0x40004000, 0x00807f80, 0x01c001c0, 0x01c001c0, 0x01c001c0, 0x00000080,
896 0x00000000, 0x00800000, 0x01c00080, 0x03e001c0, 0x07f003e0, 0x036006f0, 0x000001c0, 0x00000000,
897 0x00000000, 0x3e003800, 0x1f803f80, 0x0c201e40, 0x02080c10, 0x00840104, 0x00380044, 0x00000000,
898 0x00000000, 0x07800300, 0x1fe00fc0, 0x3f883fd0, 0x0e021f04, 0x02040402, 0x00f00108, 0x00000000,
899 0x00c00000, 0x02800140, 0x08200440, 0x20081010, 0x2ffe3004, 0x03f807fc, 0x00e001f0, 0x00000040,
900 0x00000000, 0x21843ffc, 0x01800180, 0x01800180, 0x01800180, 0x01800180, 0x03c00180, 0x00000000,
901 0x00800000, 0x01400180, 0x06200340, 0x0c100620, 0x1ff80c10, 0x380c1808, 0x70067004, 0x0000f80f,
902 0x78000000, 0x50004000, 0x00004800, 0x03c003c0, 0x03c003c0, 0x00100000, 0x0002000a, 0x0000000e,
903 0x75560000, 0x5e004002, 0x54001002, 0x41001202, 0x408200fe, 0x40820082, 0x40820082, 0x00006afe,
904 0x00000000, 0x3f003f00, 0x3f003f00, 0x3f003f00, 0x00400080, 0x001c0020, 0x001c001c, 0x00000000,
905 0x6d800000, 0x00004080, 0x40804080, 0x40800000, 0x00406d80, 0x001c0020, 0x001c001c, 0x00000000,
906 0x40080000, 0x1ffe2008, 0x14081008, 0x11081208, 0x10481088, 0x10081028, 0x10047ff8, 0x00001002,
907 0x00100000, 0x3ffc0010, 0x2ab03550, 0x22b02550, 0x20b02150, 0x20302050, 0x2000fff0, 0x00002000,
908 0x40000000, 0x1ff82000, 0x04082808, 0x01082208, 0x00482088, 0x00182028, 0x35542008, 0x00000002,
909 0x00000000, 0x02800280, 0x06c006c0, 0x0ea00ee0, 0x1e901eb0, 0x3e883e98, 0x7efc7e8c, 0x00000000,
910 0x01000000, 0x05600100, 0x1d480d50, 0x7d423d44, 0x3d447d42, 0x0d501d48, 0x01000560, 0x00000100,
911 0x01800000, 0x04200240, 0x10080810, 0x00001ff8, 0x00007ffe, 0x0ff01ff8, 0x03c007e0, 0x00000180,
912 0x00000000, 0x010800f0, 0x02040204, 0x02040204, 0x07f00308, 0x1c000e00, 0x30003800, 0x00000000,
913 0x00000000, 0x061803f0, 0x08240c0c, 0x08040814, 0x0c0c0804, 0x23f01618, 0x18002400, 0x00000000,
914 0x00000000, 0x00000000, 0x1c7007c0, 0x638e3398, 0x1c703398, 0x000007c0, 0x00000000, 0x00000000,
915 0x00000000, 0x10002000, 0x04700fc0, 0x610e3218, 0x1c703098, 0x001007a0, 0x00000008, 0x00000000,
916 0x00000000, 0x00007ffc, 0x40047ffc, 0x10102008, 0x04400820, 0x02800280, 0x02800280, 0x00000100,
917 0x00000000, 0x40027ffe, 0x10082004, 0x04200810, 0x02400240, 0x02400240, 0x01400240, 0x000000c0,
918 0x00800000, 0x00800080, 0x00000080, 0x3c9e0000, 0x00000000, 0x00800080, 0x00800080, 0x00000000,
919 0x00800000, 0x00800080, 0x00800080, 0x3f7e01c0, 0x008001c0, 0x00800080, 0x00800080, 0x00000000,
920 0x00800000, 0x00800080, 0x03e00080, 0x3e3e0220, 0x03e00220, 0x00800080, 0x00800080, 0x00000000,
921 0x01000000, 0x04400280, 0x01000100, 0x43842008, 0x43849ab2, 0x01002008, 0x04400100, 0x01000280,
922 0x01000000, 0x04400280, 0x01000100, 0x41042108, 0x41049ff2, 0x01002108, 0x04400100, 0x01000280,
923 0x781e0000, 0x500a4002, 0x04204812, 0x00000240, 0x02400000, 0x48120420, 0x4002500a, 0x0000781e,
924 0x00000000, 0x20003c00, 0x24002800, 0x01000200, 0x00400080, 0x00140024, 0x003c0004, 0x00000000,
925 0x00000000, 0x0004003c, 0x00240014, 0x00800040, 0x02000100, 0x28002400, 0x3c002000, 0x00000000,
926 0x00000000, 0x00100020, 0x10101fc8, 0x10001020, 0x10001000, 0x10001000, 0x00001fc0, 0x00000000,
927 0x00000000, 0x08000400, 0x080813f8, 0x00080408, 0x00080008, 0x00080008, 0x000003f8, 0x00000000,
928 0x00000000, 0x3ffc0000, 0x20042004, 0x20002000, 0x20402000, 0x3f902020, 0x00400020, 0x00000000,
929 0x00000000, 0x3ffc0000, 0x20042004, 0x27fc2004, 0x20202000, 0x3fc82010, 0x00200010, 0x00000000,
930 0x00000000, 0x0ff00000, 0x10081818, 0x11801008, 0x10001180, 0x18101020, 0x00100fc8, 0x00000020,
931 0x00000000, 0x04000200, 0x240429fc, 0x20042204, 0x20442004, 0x3f942024, 0x00400020, 0x00000000,
932 0x00000000, 0x20001000, 0x22104c0e, 0x00801120, 0x11200040, 0x4c0e2210, 0x10002000, 0x00000000,
933 0x7ffe0000, 0x50024002, 0x44024802, 0x41024202, 0x40424082, 0x40124022, 0x4002400a, 0x00007ffe,
934 0x00800000, 0x03e00080, 0x08080490, 0x3c9e0808, 0x08080808, 0x03e00490, 0x00800080, 0x00000000,
935 0x00800000, 0x00800080, 0x00800080, 0x3ffe01c0, 0x008001c0, 0x00800080, 0x00800080, 0x00000000,
936 0x00800000, 0x00800080, 0x03e00080, 0x3ffe03e0, 0x03e003e0, 0x00800080, 0x00800080, 0x00000000,
937 0x01000000, 0x07c00380, 0x01000100, 0x638c2008, 0x638cfbbe, 0x01002008, 0x07c00100, 0x01000380,
938 0x01000000, 0x07c00380, 0x01000100, 0x610c2108, 0x610cfffe, 0x01002108, 0x07c00100, 0x01000380,
939 0x781e0000, 0x6006700e, 0x04204812, 0x00000240, 0x02400000, 0x48120420, 0x700e6006, 0x0000781e,
940 0x00000000, 0x38003c00, 0x24003000, 0x01000200, 0x00400080, 0x000c0024, 0x003c001c, 0x00000000,
941 0x00000000, 0x001c003c, 0x0024000c, 0x00800040, 0x02000100, 0x30002400, 0x3c003800, 0x00000000,
942 0x00000000, 0x00300020, 0x10301ff8, 0x10001020, 0x10001000, 0x10001000, 0x00001fc0, 0x00000000,
943 0x00000000, 0x0c000400, 0x0c081ff8, 0x00080408, 0x00080008, 0x00080008, 0x000003f8, 0x00000000,
944 0x00000000, 0x3ffc0000, 0x20042004, 0x20002000, 0x20402000, 0x3ff02060, 0x00400060, 0x00000000,
945 0x00000000, 0x3ffc0000, 0x20042004, 0x27fc2004, 0x20202000, 0x3ff82030, 0x00200030, 0x00000000,
946 0x00000000, 0x0ff00000, 0x10081818, 0x11801008, 0x10001180, 0x18301020, 0x00300ff8, 0x00000020,
947 0x00000000, 0x06000200, 0x26042ffc, 0x20042204, 0x20442004, 0x3ff42064, 0x00400060, 0x00000000,
948 0x00000000, 0x30001000, 0x32107c0e, 0x00801120, 0x11200040, 0x7c0e3210, 0x10003000, 0x00000000,
949 0x00000000, 0x30043ffc, 0x24042804, 0x21042204, 0x20442084, 0x20142024, 0x3ffc200c, 0x00000000,
950 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000,
951 0x00000000, 0x23c43ffc, 0x23c423c4, 0x200423c4, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000,
952 0x00000000, 0x3e043ffc, 0x3e043e04, 0x20043e04, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000,
953 0x00000000, 0x20043ffc, 0x20042004, 0x3e043e04, 0x3e043e04, 0x20042004, 0x3ffc2004, 0x00000000,
954 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x3e042004, 0x3e043e04, 0x3ffc3e04, 0x00000000,
955 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x23c42004, 0x23c423c4, 0x3ffc23c4, 0x00000000,
956 0x00000000, 0x20043ffc, 0x20042004, 0x20042004, 0x207c2004, 0x207c207c, 0x3ffc207c, 0x00000000,
957 0x00000000, 0x20043ffc, 0x20042004, 0x207c207c, 0x207c207c, 0x20042004, 0x3ffc2004, 0x00000000,
958 0x00000000, 0x207c3ffc, 0x207c207c, 0x2004207c, 0x20042004, 0x20042004, 0x3ffc2004, 0x00000000,
959 0x00000000, 0x20043ffc, 0x20042004, 0x23c423c4, 0x23c423c4, 0x20042004, 0x3ffc2004, 0x00000000,
960 0x7ffe0000, 0x40024002, 0x47e24182, 0x4ff247e2, 0x47e24ff2, 0x418247e2, 0x40024002, 0x00007ffe,
961 0x7fff0000, 0x40014001, 0x40014001, 0x49555ddd, 0x4945495d, 0x400149c5, 0x40014001, 0x00007fff,
962 0x7ffe0000, 0x53327332, 0x44ce4cce, 0x41324332, 0x404e40ce, 0x48125432, 0x4006540e, 0x00007ffe,
963 0x7ffe0000, 0x53327332, 0x44ce4cce, 0x41324332, 0x5c4e40ce, 0x44124432, 0x40065c0e, 0x00007ffe,
964 0x7ffe0000, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x42fe417e, 0x00007ffe,
965 0x07fe0000, 0x1ffa0002, 0x7fea000a, 0x402a402a, 0x5b2a512a, 0x5128552a, 0x40205128, 0x00007fe0,
966 0x00000000, 0x1ff80000, 0x12481248, 0x12481ff8, 0x1ff81248, 0x12481248, 0x00001ff8, 0x00000000,
967 0x12480000, 0x7ffe1248, 0x12481248, 0x12487ffe, 0x7ffe1248, 0x12481248, 0x12487ffe, 0x00001248,
968 0x00000000, 0x1c380000, 0x1c3817e8, 0x08100810, 0x08100810, 0x17e81c38, 0x00001c38, 0x00000000,
969 0x700e0000, 0x700e5ffa, 0x20042004, 0x20042004, 0x20042004, 0x20042004, 0x5ffa700e, 0x0000700e,
970 0x3f7e0000, 0x21422142, 0x21422142, 0x00003f7e, 0x21423f7e, 0x21422142, 0x3f7e2142, 0x00000000,
971 0x00000000, 0x3bb80000, 0x3bb83bb8, 0x3bb80000, 0x3bb83bb8, 0x3bb80000, 0x3bb83bb8, 0x00000000,
972 0x7ffe0000, 0x7ffe7ffe, 0x77fe7000, 0x77fe77fe, 0x777e7700, 0x777e777e, 0x777e777e, 0x0000777e,
973 0x781e0000, 0x40024002, 0x00004002, 0x01800000, 0x00000180, 0x40020000, 0x40024002, 0x0000781e,
974 0x781e0000, 0x40024002, 0x00004002, 0x03c003c0, 0x03c003c0, 0x40020000, 0x40024002, 0x0000781e,
975 0x781e0000, 0x40024002, 0x07e04002, 0x07e007e0, 0x07e007e0, 0x400207e0, 0x40024002, 0x0000781e,
976 0x781e0000, 0x5ffa4002, 0x1ff85ffa, 0x1ff81ff8, 0x1ff81ff8, 0x5ffa1ff8, 0x40025ffa, 0x0000781e,
977 0x00000000, 0x2004381c, 0x00002004, 0x00000000, 0x00000000, 0x20040000, 0x381c2004, 0x00000000,
978 0x00000000, 0x1db80000, 0x10081008, 0x10080000, 0x00001008, 0x10081008, 0x00001db8, 0x00000000,
979 0x35560000, 0x00002002, 0x00002002, 0x00002002, 0x00002002, 0x00002002, 0x35562002, 0x00000000,
980 0x7ffe0000, 0x40024002, 0x48124ff2, 0x49924812, 0x48124992, 0x4ff24812, 0x40024002, 0x00007ffe,
981 0x00000000, 0x10841ffc, 0x10841084, 0x1ffc1084, 0x10841084, 0x10841084, 0x00001ffc, 0x00000000,
982 0x00000000, 0x00000000, 0x10000000, 0x04000800, 0x01040200, 0x00500088, 0x00000020, 0x00000000,
983 0x00000000, 0x10080000, 0x04200810, 0x01800240, 0x02400180, 0x08100420, 0x00001008, 0x00000000,
984 0x00000000, 0x02000000, 0x00800100, 0x00200040, 0x00200010, 0x00800040, 0x02000100, 0x00000000,
985 0x00000000, 0x00400000, 0x01000080, 0x04000200, 0x04000800, 0x01000200, 0x00400080, 0x00000000,
986 0x00000000, 0x00000000, 0x00000000, 0x08081004, 0x02200410, 0x00800140, 0x00000000, 0x00000000,
987 0x00000000, 0x00000000, 0x01400080, 0x04100220, 0x10040808, 0x00000000, 0x00000000, 0x00000000,
988 0x00000000, 0x02000000, 0x03800300, 0x03e003c0, 0x03e003f0, 0x038003c0, 0x02000300, 0x00000000,
989 0x00000000, 0x00400000, 0x01c000c0, 0x07c003c0, 0x07c00fc0, 0x01c003c0, 0x004000c0, 0x00000000,
990 0x00000000, 0x00000000, 0x00000000, 0x0ff81ffc, 0x03e007f0, 0x008001c0, 0x00000000, 0x00000000,
991 0x00000000, 0x00000000, 0x01c00080, 0x07f003e0, 0x1ffc0ff8, 0x00000000, 0x00000000, 0x00000000,
992 0x00000000, 0x18a008c0, 0x32881290, 0x24822686, 0x26862482, 0x12903288, 0x08c018a0, 0x00000000,
993 0x00000000, 0x04800780, 0x004000c0, 0x662000f0, 0x08103c30, 0x130a0e18, 0x0000318e, 0x00000000,
994 0x00000000, 0x00800000, 0x08880888, 0x2aaa0a8a, 0x0a8a2aaa, 0x08880888, 0x00000080, 0x00000000,
995 0x00000000, 0x00600000, 0x01080090, 0x02040108, 0x42044204, 0x24022402, 0x00001800, 0x00000000,
996 0x00000000, 0x07f80000, 0x04080408, 0x04080408, 0x04080408, 0x7c0e0408, 0x00000000, 0x00000000,
997 0x00000000, 0x00000000, 0x00a00040, 0x22084110, 0x08021404, 0x00000000, 0x00000000, 0x00000000,
998 0x00000000, 0x00000000, 0x04200000, 0x01800240, 0x02400180, 0x00000420, 0x00000000, 0x00000000,
999 0x00000000, 0x18380000, 0x12281428, 0x10a81128, 0x112810a8, 0x14281228, 0x00001838, 0x00000000,
1000 0x00000000, 0x18000000, 0x11801600, 0x10181060, 0x10601018, 0x16001180, 0x00001800, 0x00000000,
1001 0x00000000, 0x00180000, 0x01880068, 0x18080608, 0x06081808, 0x00680188, 0x00000018, 0x00000000,
1002 0x00000000, 0x1e780000, 0x12481248, 0x12481248, 0x12481248, 0x12481248, 0x00001e78, 0x00000000,
1003 0x00000000, 0x1ff80000, 0x10081008, 0x10081008, 0x10081008, 0x10081008, 0x00001ff8, 0x00000000,
1004 0x00000000, 0x1c180000, 0x14481428, 0x15081488, 0x14881508, 0x14281448, 0x00001c18, 0x00000000,
1005 0x00000000, 0x03c00000, 0x08100420, 0x10081008, 0x10081008, 0x04200810, 0x000003c0, 0x00000000,
1006 0x00000000, 0x0c3007e0, 0x13c81818, 0x14281668, 0x14281428, 0x1c381c38, 0x08102244, 0x00000000,
1007 0x07c00000, 0x08200820, 0x3ff80820, 0x23882008, 0x21082388, 0x20082108, 0x1ff02008, 0x00000000,
1008 0x07c00000, 0x08000800, 0x3ff80800, 0x23882008, 0x21082388, 0x20082108, 0x1ff02008, 0x00000000,
1009 0x01c00000, 0x0c180770, 0x3086188c, 0x60832082, 0x60034781, 0x30062002, 0x0c18180c, 0x01c00770,
1010 0x0a200000, 0x1b201b20, 0x04200e20, 0x04200420, 0x04700420, 0x0e700e70, 0x0e700e70, 0x04200e70,
1011 0x01800000, 0x3bdc318c, 0x0ff01ff8, 0x7c3e1e78, 0x1e787c3e, 0x1ff80ff0, 0x318c3bdc, 0x00000180,
1012 0x01800000, 0x3ffc318c, 0x1c381ff8, 0x781e1818, 0x1818781e, 0x1ff81c38, 0x318c3ffc, 0x00000180,
1013 0x00000000, 0x08080ff8, 0x08081ffc, 0x0aa80aa8, 0x0aa80aa8, 0x0aa80aa8, 0x08080aa8, 0x00000ff8,
1014 0x00000000, 0x00000000, 0x20043ffc, 0x08043f84, 0x04040f84, 0x04040784, 0x000007fc, 0x00000000,
1015 0x00000000, 0x24400400, 0x00001480, 0x6efe0e00, 0x00000e00, 0x24401480, 0x00000400, 0x00000000,
1016 0x00000000, 0x03c00000, 0x08300460, 0x11181118, 0x11181118, 0x04600830, 0x000003c0, 0x00000000,
1017 0x00000000, 0x10880080, 0x06c00810, 0x366c07e0, 0x07e00240, 0x00001768, 0x04200240, 0x00000000,
1018 0x00000000, 0x3d280000, 0x2528252c, 0x3d282528, 0x05280528, 0x05e80528, 0x00000000, 0x00000000,
1019 0x01800000, 0x03c003c0, 0x018003c0, 0x0ff007e0, 0x0bd00bd0, 0x0a500bd0, 0x02400240, 0x02400240,
1020 0x01800000, 0x03c003c0, 0x118013c0, 0x03c81ff8, 0x07c003c8, 0x04400440, 0x0c080478, 0x00000000,
1021 0x3ff80000, 0x30183ff8, 0x30183018, 0x3ff83ff8, 0x03000300, 0x03c003c0, 0x03e00300, 0x000003e0,
1022 0x3ff80000, 0x3ff83ff8, 0x33983ff8, 0x3ff83398, 0x3ff83ff8, 0x00000540, 0x0fe00aa0, 0x00000fe0,
1023 0x00000000, 0x0ff00000, 0x20041008, 0x25442004, 0x10082004, 0x06000bf0, 0x00000300, 0x00000000,
1024 0x00000000, 0x11440000, 0x07f00be8, 0x1c1c0e38, 0x1c1c0c18, 0x07f00e38, 0x11440be8, 0x00000000,
1025 0x00000000, 0x20080000, 0x0c601010, 0x07c00fe0, 0x07c007c0, 0x0c600fe0, 0x20081010, 0x00000000,
1026 0x00000000, 0x20080000, 0x0c601010, 0x04400fe0, 0x04405554, 0x0c600fe0, 0x20081010, 0x00000000,
1027 0x00000000, 0x00800080, 0x01c001c0, 0x1ffc3ffe, 0x03e007f0, 0x07f003e0, 0x0c180770, 0x00000808,
1028 0x0ff00000, 0x08180810, 0x08100818, 0x0a100810, 0x08180810, 0x08100818, 0x08100810, 0x00001ff8,
1029 0x0ff00000, 0x08100810, 0x08100810, 0x10100010, 0x4f902010, 0x10102010, 0x08100010, 0x00000ff0,
1030 0x00040000, 0x001f000e, 0x0ef40004, 0x12f41284, 0x0ef41214, 0x10040004, 0x7ffc3004, 0x10003000,
1031 0x78040000, 0x501f600e, 0x0ef44004, 0x12f41284, 0x0ef41284, 0x10140004, 0x7ffc300c, 0x10003000,
1032 0x7fe00000, 0x50286030, 0x47fe4804, 0x44224402, 0x44224422, 0x241275e2, 0x0c06140a, 0x000007fe,
1033 0x7fe00000, 0x5ff87ff0, 0x47fe4ffc, 0x44224402, 0x44224422, 0x241275e2, 0x0c06140a, 0x000007fe,
1034 0x7fe00000, 0x50386030, 0x47fe483c, 0x443e443e, 0x443e443e, 0x241e75fe, 0x0c06140e, 0x000007fe,
1035 0x7fe00000, 0x50286030, 0x47fe4804, 0x47fe47fe, 0x47fe47fe, 0x27fe77fe, 0x0ffe17fe, 0x000007fe,
1036 0x7fe00000, 0x50286030, 0x47fe4804, 0x44224402, 0x44224422, 0x3ff27fe2, 0x0ffe1ffa, 0x000007fe,
1037 0x7fe00000, 0x70286030, 0x7ffe7804, 0x7c227c02, 0x7c227c22, 0x3c127de2, 0x0c061c0a, 0x000007fe,
1038 0x7fe00000, 0x7fe87ff0, 0x7ffe7fe4, 0x7fe27fe2, 0x7fe27fe2, 0x24127fe2, 0x0c06140a, 0x000007fe,
1039 0x00000000, 0x2a0233fe, 0x22022602, 0x22022202, 0x2a022602, 0x00a033fe, 0x02080110, 0x00000000,
1040 0x00000000, 0x200c3ffc, 0x000c000c, 0x3ffc000c, 0x30003000, 0x30003000, 0x3ffc3004, 0x00000000,
1041 0x00000000, 0x0022003e, 0x012201e2, 0x0100013e, 0x01000100, 0x79000100, 0x4f004900, 0x00007800,
1042 0x00000000, 0x44007c00, 0x45004600, 0x00627cbe, 0x00620022, 0x45007cbe, 0x44004600, 0x00007c00,
1043 0x00000000, 0x0044007c, 0x0010007c, 0x3f100010, 0x3f1021f0, 0x3f100010, 0x3f0021f0, 0x00000000,
1044 0x00000000, 0x0044007c, 0x00440044, 0x0010007c, 0x00100010, 0x44107c10, 0x440047f0, 0x00007c00,
1045 0x00000000, 0x0044007c, 0x00440044, 0x0000007c, 0x00000010, 0x44007c10, 0x44004550, 0x00007c00,
1046 0x02a00000, 0x22a43ffc, 0x20042004, 0x20042ff4, 0x20042ff4, 0x20042ff4, 0x20042004, 0x00003ffc,
1047 0x3ffc0000, 0x20042004, 0x245e27c4, 0x27c42444, 0x2004201e, 0x201e2004, 0x20042004, 0x00003ffc,
1048 0x00000000, 0x07e00000, 0x04200420, 0x24243ffc, 0x24242424, 0x24242424, 0x3ffc2424, 0x00000000,
1049 0x00000000, 0x0fe00000, 0x08200820, 0x40047ffc, 0x7ffc5554, 0x40045554, 0x7ffc4004, 0x00000000,
1050 0x00000000, 0x20043ffc, 0x3ffc2004, 0x13c81008, 0x100813c8, 0x10081008, 0x1ff81008, 0x00000000,
1051 0x00000000, 0x40027ffe, 0x5ffa5ffa, 0x5ffa5ffa, 0x40025ffa, 0x03c07ffe, 0x1ff81ff8, 0x00000000,
1052 0x0ff00000, 0x6bfe7ffe, 0x7ffe7ffe, 0x68167ffe, 0x08106816, 0x08100810, 0x0ff00810, 0x00000000,
1053 0x3ff80000, 0xfffe2008, 0x870a8002, 0x904a888a, 0x904a904a, 0x870a888a, 0xfffe8002, 0x00000000,
1054 0x0fc00000, 0xfcfe0cd8, 0x8002fffe, 0x84428382, 0x84428442, 0x80028382, 0xfffe8002, 0x00000000,
1055 0x00000000, 0x02400180, 0x08100420, 0x20041008, 0x23c42004, 0x22442244, 0x3ffc2244, 0x00000000,
1056 0x00000000, 0x1c700000, 0x3ff83ef8, 0x3ff83ff8, 0x0fe01ff0, 0x038007c0, 0x00000100, 0x00000000,
1057 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x80000000, 0xe000c000,
1058 0x00000000, 0x14001c00, 0x15c01400, 0x15401540, 0x155c1540, 0x15541554, 0x1ddc1554, 0x00000000,
1059 0x00000000, 0x03000300, 0x1b001b00, 0x1b601b60, 0x1b6c1b60, 0x1b6c1b6c, 0x1b6c1b6c, 0x00000000,
1060 0x00000000, 0x00000000, 0x403e7ffe, 0x7ffe403e, 0x7ffe0000, 0x43fe43fe, 0x00007ffe, 0x00000000,
1061 0x7ffc0000, 0x43844004, 0x43844284, 0x43844004, 0x42844284, 0x42844284, 0x40044384, 0x00007ffc,
1062 0x40008000, 0x10002000, 0x04000800, 0x01000200, 0x00400080, 0x00100020, 0x00040008, 0x00010002,
1063 0x00000000, 0x1ff01ff0, 0x18301830, 0x1f001830, 0x03001f00, 0x00000300, 0x03000300, 0x00000000,
1064 0x3ff00000, 0x2abc3550, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x2aac3554, 0x00003ffc,
1065 0x3ff00000, 0x201c2010, 0x22442184, 0x28142424, 0x29942814, 0x2ff42994, 0x20042004, 0x00003ffc,
1066 0x07fe0000, 0x04020402, 0x7fe20402, 0x44224422, 0x44224422, 0x402047fe, 0x40204020, 0x00007fe0,
1067 0x07fe0000, 0x04020402, 0x7c020402, 0x44024402, 0x44024402, 0x402047fe, 0x40204020, 0x00007fe0,
1068 0x00000000, 0x40027ffe, 0x7ffe4002, 0x40024002, 0x40024002, 0x40024002, 0x7ffe4002, 0x00000000,
1069 0x09100000, 0x09f00910, 0x09100910, 0x00000910, 0x24a2779e, 0x27a224a2, 0x709e20a2, 0x00000000,
1070 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1071 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1072 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1073 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1074 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1075 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1076 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1077 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1078 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1079 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1080 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1081 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1082 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1083 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1084 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1085 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1086 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1087 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1088 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1089 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1090 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1091 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1092 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1093 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1094 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1095 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1096 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1097 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1098 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1099 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1100 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1101 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1102 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1103 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1104 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1105 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1106 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1107 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1108 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1109 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1110 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1111 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1112 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1113 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1114 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1115 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1116 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1117 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1118 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1119 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1120 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1121 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1122 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1123 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1124 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1125 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
1133 #define RICON_SIZE 0
1136#define RAYGUI_MAX_CONTROLS 16
1137#define RAYGUI_MAX_PROPS_BASE 16
1138#define RAYGUI_MAX_PROPS_EXTENDED 8
1144typedef enum { BORDER = 0, BASE, TEXT, OTHER } GuiPropertyElement;
1151static Font guiFont = { 0 };
1152static bool guiLocked =
false;
1153static float guiAlpha = 1.0f;
1167static unsigned int guiStyle[RAYGUI_MAX_CONTROLS*(RAYGUI_MAX_PROPS_BASE + RAYGUI_MAX_PROPS_EXTENDED)] = { 0 };
1169static bool guiStyleLoaded =
false;
1177#if defined(RAYGUI_STANDALONE)
1179#define KEY_RIGHT 262
1183#define KEY_BACKSPACE 259
1184#define KEY_ENTER 257
1186#define MOUSE_LEFT_BUTTON 0
1210static Font LoadFontEx(
const char *fileName,
int fontSize,
int *fontChars,
int glyphCount);
1227static const char *
TextFormat(
const char *text, ...);
1228static const char **
TextSplit(
const char *text,
char delimiter,
int *count);
1230static int GetCodepoint(
const char *text,
int *bytesProcessed);
1241static int GetTextWidth(
const char *text);
1243static const char *GetTextIcon(
const char *text,
int *iconId);
1245static void GuiDrawText(
const char *text,
Rectangle bounds,
int alignment,
Color tint);
1246static void GuiDrawRectangle(
Rectangle rec,
int borderWidth,
Color borderColor,
Color color);
1248static const char **GuiTextSplit(
const char *text,
int *count,
int *textRow);
1262void GuiLock(
void) { guiLocked =
true; }
1265void GuiUnlock(
void) { guiLocked =
false; }
1273 if (alpha < 0.0f) alpha = 0.0f;
1274 else if (alpha > 1.0f) alpha = 1.0f;
1308void GuiSetStyle(
int control,
int property,
int value)
1311 guiStyle[control*(RAYGUI_MAX_PROPS_BASE + RAYGUI_MAX_PROPS_EXTENDED) + property] = value;
1314 if ((control == 0) && (
property < RAYGUI_MAX_PROPS_BASE))
1316 for (
int i = 1; i < RAYGUI_MAX_CONTROLS; i++) guiStyle[i*(RAYGUI_MAX_PROPS_BASE + RAYGUI_MAX_PROPS_EXTENDED) + property] = value;
1324 return guiStyle[control*(RAYGUI_MAX_PROPS_BASE + RAYGUI_MAX_PROPS_EXTENDED) + property];
1335 #define WINDOW_STATUSBAR_HEIGHT 22
1338 bool clicked =
false;
1341 statusBarHeight += (statusBarHeight%2);
1343 Rectangle statusBar = { bounds.
x, bounds.
y, bounds.
width, (float)statusBarHeight };
1344 if (bounds.
height < statusBarHeight*2.0f) bounds.
height = statusBarHeight*2.0f;
1346 Rectangle windowPanel = { bounds.
x, bounds.
y + (float)statusBarHeight - 1, bounds.
width, bounds.
height - (
float)statusBarHeight };
1348 statusBar.
y + statusBarHeight/2.0f - 18.0f/2.0f, 18, 18 };
1365#if defined(RAYGUI_NO_RICONS)
1366 clicked =
GuiButton(closeButtonRec,
"x");
1380 #define GROUPBOX_LINE_THICK 1
1381 #define GROUPBOX_TEXT_PADDING 10
1398 #define LINE_TEXT_PADDING 10
1410 textBounds.
width = (float)GetTextWidth(text);
1412 textBounds.
x = bounds.
x + LINE_TEXT_PADDING;
1416 GuiDrawRectangle(RAYGUI_CLITERAL(
Rectangle){ bounds.
x, bounds.
y, LINE_TEXT_PADDING - 2, 1 }, 0,
BLANK, color);
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);
1426 #define PANEL_BORDER_WIDTH 1
1442 Vector2 scrollPos = { 0.0f, 0.0f };
1443 if (scroll !=
NULL) scrollPos = *scroll;
1483 if (hasHorizontalScrollBar)
1489 if (hasVerticalScrollBar)
1499 else scrollPos.
y += wheelMove*20;
1504 if (scrollPos.
x > -horizontalMin) scrollPos.
x = -horizontalMin;
1505 if (scrollPos.
x < -horizontalMax) scrollPos.
x = -horizontalMax;
1506 if (scrollPos.
y > -verticalMin) scrollPos.
y = -verticalMin;
1507 if (scrollPos.
y < -verticalMax) scrollPos.
y = -verticalMax;
1518 if (hasHorizontalScrollBar)
1522 scrollPos.
x = (float)-
GuiScrollBar(horizontalScrollBar, (
int)-scrollPos.
x, (int)horizontalMin, (
int)horizontalMax);
1526 if (hasVerticalScrollBar)
1530 scrollPos.
y = (float)-
GuiScrollBar(verticalScrollBar, (
int)-scrollPos.
y, (int)verticalMin, (
int)verticalMax);
1534 if (hasHorizontalScrollBar && hasVerticalScrollBar)
1547 if (scroll !=
NULL) *scroll = scrollPos;
1572 bool pressed =
false;
1604 bool pressed =
false;
1608 if (bounds.
width < textWidth) bounds.
width = textWidth;
1680 #if !defined(TOGGLEGROUP_MAX_ELEMENTS)
1681 #define TOGGLEGROUP_MAX_ELEMENTS 32
1684 float initBoundsX = bounds.
x;
1687 int rows[TOGGLEGROUP_MAX_ELEMENTS] = { 0 };
1689 const char **items = GuiTextSplit(text, &itemCount, rows);
1691 int prevRow = rows[0];
1693 for (
int i = 0; i < itemCount; i++)
1695 if (prevRow != rows[i])
1697 bounds.
x = initBoundsX;
1702 if (i == active)
GuiToggle(bounds, items[i],
true);
1703 else if (
GuiToggle(bounds, items[i],
false) ==
true) active = i;
1720 textBounds.
width = (float)GetTextWidth(text);
1782 const char **items = GuiTextSplit(text, &itemCount,
NULL);
1784 if (active < 0) active = 0;
1785 else if (active > itemCount - 1) active = itemCount - 1;
1799 if (active >= itemCount) active = 0;
1835 int itemSelected = *active;
1836 int itemFocused = -1;
1840 const char **items = GuiTextSplit(text, &itemCount,
NULL);
1847 bool pressed =
false;
1869 for (
int i = 0; i < itemCount; i++)
1886 itemBounds = bounds;
1905 if (editMode)
GuiPanel(boundsOpen);
1913 for (
int i = 0; i < itemCount; i++)
1918 if (i == itemSelected)
1923 else if (i == itemFocused)
1933#if defined(RAYGUI_NO_RICONS)
1942 *active = itemSelected;
1951 bool pressed =
false;
1973 int keyCount = (int)strlen(text);
1976 if (keyCount < (textSize - 1))
1985 for (
int i = 0; i < byteSize; i++)
1987 text[keyCount] = textUTF8[i];
1991 text[keyCount] =
'\0';
2001 text[keyCount] =
'\0';
2002 if (keyCount < 0) keyCount = 0;
2046bool GuiSpinner(
Rectangle bounds,
const char *text,
int *value,
int minValue,
int maxValue,
bool editMode)
2050 bool pressed =
false;
2051 int tempValue = *value;
2061 textBounds.
width = (float)GetTextWidth(text);
2084 if (tempValue < minValue) tempValue = minValue;
2085 if (tempValue > maxValue) tempValue = maxValue;
2092 pressed =
GuiValueBox(spinner,
NULL, &tempValue, minValue, maxValue, editMode);
2101#if defined(RAYGUI_NO_RICONS)
2102 if (
GuiButton(leftButtonBound,
"<")) tempValue--;
2103 if (
GuiButton(rightButtonBound,
">")) tempValue++;
2122bool GuiValueBox(
Rectangle bounds,
const char *text,
int *value,
int minValue,
int maxValue,
bool editMode)
2124 #if !defined(VALUEBOX_MAX_CHARS)
2125 #define VALUEBOX_MAX_CHARS 32
2129 bool pressed =
false;
2131 char textValue[VALUEBOX_MAX_CHARS + 1] =
"\0";
2132 sprintf(textValue,
"%i", *value);
2137 textBounds.
width = (float)GetTextWidth(text);
2150 bool valueHasChanged =
false;
2156 int keyCount = (int)strlen(textValue);
2159 if (keyCount < VALUEBOX_MAX_CHARS)
2161 if (GetTextWidth(textValue) < bounds.
width)
2164 if ((key >= 48) && (key <= 57))
2166 textValue[keyCount] = (char)key;
2168 valueHasChanged =
true;
2179 textValue[keyCount] =
'\0';
2180 if (keyCount < 0) keyCount = 0;
2181 valueHasChanged =
true;
2191 if (*value > maxValue) *value = maxValue;
2192 else if (*value < minValue) *value = minValue;
2232 bool pressed =
false;
2258 int textLength = (int)strlen(text);
2261 if (textLength < (textSize - 1))
2265 text[textLength] =
'\n';
2268 else if (codepoint >= 32)
2271 int charUTF8Length = 0;
2272 const char *charEncoded =
CodepointToUTF8(codepoint, &charUTF8Length);
2273 memcpy(text + textLength, charEncoded, charUTF8Length);
2274 textLength += charUTF8Length;
2283 if ((
unsigned char)text[textLength - 1] < 127)
2287 text[textLength] =
'\0';
2292 int charUTF8Length = 0;
2293 while (((
unsigned char)text[textLength - 1 - charUTF8Length] & 0b01000000) == 0) charUTF8Length++;
2295 textLength -= (charUTF8Length + 1);
2296 text[textLength] =
'\0';
2328 Vector2 cursorPos = { textAreaBounds.
x, textAreaBounds.
y };
2334 for (
int i = 0, codepointLength = 0; text[i] !=
'\0'; i += codepointLength)
2336 int codepoint =
GetCodepoint(text + i, &codepointLength);
2341 if ((codepointLength == 1) && (codepoint ==
'\n'))
2344 cursorPos.
x = textAreaBounds.
x;
2352 else glyphWidth += (atlasRec.
width + glyphInfo.
offsetX);
2355 if ((cursorPos.
x + (glyphWidth*scaleFactor)) > (textAreaBounds.
x + textAreaBounds.
width))
2358 cursorPos.
x = textAreaBounds.
x;
2361 else if (wrapMode == 2)
2385 else glyphWidth += (atlasRec.
width + glyphInfo.
offsetX);
2392 cursor.
x = cursorPos.
x;
2393 cursor.
y = cursorPos.
y;
2404float GuiSliderPro(
Rectangle bounds,
const char *textLeft,
const char *textRight,
float value,
float minValue,
float maxValue,
int sliderWidth)
2413 if (sliderWidth > 0)
2415 slider.
x += (sliderValue - sliderWidth/2);
2416 slider.
width = (float)sliderWidth;
2418 else if (sliderWidth == 0)
2421 slider.
width = (float)sliderValue;
2437 value = ((maxValue - minValue)*(mousePoint.
x - (
float)(bounds.
x + sliderWidth/2)))/(
float)(bounds.
width - sliderWidth) + minValue;
2439 if (sliderWidth > 0) slider.
x = mousePoint.
x - slider.
width/2;
2440 else if (sliderWidth == 0) slider.
width = (float)sliderValue;
2445 if (value > maxValue) value = maxValue;
2446 else if (value < minValue) value = minValue;
2450 if (sliderWidth > 0)
2455 else if (sliderWidth == 0)
2470 if (textLeft !=
NULL)
2473 textBounds.
width = (float)GetTextWidth(textLeft);
2481 if (textRight !=
NULL)
2484 textBounds.
width = (float)GetTextWidth(textRight);
2497float GuiSlider(
Rectangle bounds,
const char *textLeft,
const char *textRight,
float value,
float minValue,
float maxValue)
2503float GuiSliderBar(
Rectangle bounds,
const char *textLeft,
const char *textRight,
float value,
float minValue,
float maxValue)
2505 return GuiSliderPro(bounds, textLeft, textRight, value, minValue, maxValue, 0);
2509float GuiProgressBar(
Rectangle bounds,
const char *textLeft,
const char *textRight,
float value,
float minValue,
float maxValue)
2531 if (textLeft !=
NULL)
2534 textBounds.
width = (float)GetTextWidth(textLeft);
2542 if (textRight !=
NULL)
2545 textBounds.
width = (float)GetTextWidth(textRight);
2603 bool isVertical = (bounds.
width > bounds.
height)?
false :
true;
2619 if (value > maxValue) value = maxValue;
2620 if (value < minValue) value = minValue;
2622 const int range = maxValue - minValue;
2632 sliderSize = (sliderSize >= scrollbar.
height)? ((
int)scrollbar.
height - 2) : sliderSize;
2639 sliderSize = (sliderSize >= scrollbar.
width)? ((
int)scrollbar.
width - 2) : sliderSize;
2655 if (wheel != 0) value += wheel;
2680 if (value > maxValue) value = maxValue;
2681 if (value < minValue) value = minValue;
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 },
2698 GuiDrawText(isVertical?
"v" :
">", RAYGUI_CLITERAL(
Rectangle){ arrowDownRight.
x, arrowDownRight.
y, isVertical? bounds.
width : bounds.
height, isVertical? bounds.
width : bounds.
height },
2701 GuiDrawText(isVertical?
"#121#" :
"#118#", RAYGUI_CLITERAL(
Rectangle){ arrowUpLeft.
x, arrowUpLeft.
y, isVertical? bounds.
width : bounds.
height, isVertical? bounds.
width : bounds.
height },
2703 GuiDrawText(isVertical?
"#120#" :
"#119#", RAYGUI_CLITERAL(
Rectangle){ arrowDownRight.
x, arrowDownRight.
y, isVertical? bounds.
width : bounds.
height, isVertical? bounds.
width : bounds.
height },
2716 const char **items =
NULL;
2718 if (text !=
NULL) items = GuiTextSplit(text, &itemCount,
NULL);
2724int GuiListViewEx(
Rectangle bounds,
const char **text,
int count,
int *focus,
int *scrollIndex,
int active)
2727 int itemFocused = (focus ==
NULL)? -1 : *focus;
2728 int itemSelected = active;
2731 bool useScrollBar =
false;
2744 if (visibleItems > count) visibleItems = count;
2746 int startIndex = (scrollIndex ==
NULL)? 0 : *scrollIndex;
2747 if ((startIndex < 0) || (startIndex > (count - visibleItems))) startIndex = 0;
2748 int endIndex = startIndex + visibleItems;
2762 for (
int i = 0; i < visibleItems; i++)
2766 itemFocused = startIndex + i;
2769 if (itemSelected == (startIndex + i)) itemSelected = -1;
2770 else itemSelected = startIndex + i;
2782 startIndex -= wheelMove;
2784 if (startIndex < 0) startIndex = 0;
2785 else if (startIndex > (count - visibleItems)) startIndex = count - visibleItems;
2787 endIndex = startIndex + visibleItems;
2788 if (endIndex > count) endIndex = count;
2791 else itemFocused = -1;
2803 for (
int i = 0; ((i < visibleItems) && (text !=
NULL)); i++)
2813 if ((startIndex + i) == itemSelected)
2819 else if ((startIndex + i) == itemFocused)
2845 float percentVisible = (float)(endIndex - startIndex)/count;
2846 float sliderSize = bounds.
height*percentVisible;
2853 startIndex =
GuiScrollBar(scrollBarBounds, startIndex, 0, count - visibleItems);
2860 if (focus !=
NULL) *focus = itemFocused;
2861 if (scrollIndex !=
NULL) *scrollIndex = startIndex;
2863 return itemSelected;
2869 const Color colWhite = { 255, 255, 255, 255 };
2870 const Color colBlack = { 0, 0, 0, 255 };
2873 Vector2 pickerSelector = { 0 };
2875 Vector3 vcolor = { (float)color.
r/255.0f, (
float)color.
g/255.0f, (float)color.
b/255.0f };
2876 Vector3 hsv = ConvertRGBtoHSV(vcolor);
2878 pickerSelector.
x = bounds.
x + (float)hsv.
y*bounds.
width;
2879 pickerSelector.
y = bounds.
y + (1.0f - (
float)hsv.
z)*bounds.
height;
2882 Vector3 maxHue = { hue >= 0.0f ? hue : hsv.
x, 1.0f, 1.0f };
2883 Vector3 rgbHue = ConvertHSVtoRGB(maxHue);
2884 Color maxHueCol = { (
unsigned char)(255.0f*rgbHue.
x),
2885 (
unsigned char)(255.0f*rgbHue.
y),
2886 (
unsigned char)(255.0f*rgbHue.
z), 255 };
2899 pickerSelector = mousePoint;
2902 Vector2 colorPick = { pickerSelector.
x - bounds.
x, pickerSelector.y - bounds.
y };
2904 colorPick.
x /= (float)bounds.
width;
2905 colorPick.
y /= (
float)bounds.
height;
2907 hsv.y = colorPick.
x;
2908 hsv.z = 1.0f - colorPick.
y;
2910 Vector3 rgb = ConvertHSVtoRGB(hsv);
2913 color = RAYGUI_CLITERAL(
Color){ (
unsigned char)(255.0f*rgb.
x),
2914 (
unsigned char)(255.0f*rgb.
y),
2915 (
unsigned char)(255.0f*rgb.
z),
2916 (
unsigned char)(255.0f*(
float)color.
a/255.0f) };
2933 GuiDrawRectangle(selector, 0,
BLANK,
Fade(colWhite, guiAlpha));
2937 DrawRectangleGradientEx(bounds,
Fade(
Fade(
GetColor(
GuiGetStyle(
COLORPICKER,
BASE_COLOR_DISABLED)), 0.1f), guiAlpha),
Fade(
Fade(colBlack, 0.6f), guiAlpha),
Fade(
Fade(colBlack, 0.6f), guiAlpha),
Fade(
Fade(
GetColor(
GuiGetStyle(
COLORPICKER,
BORDER_COLOR_DISABLED)), 0.6f), guiAlpha));
2950 #define COLORBARALPHA_CHECKED_SIZE 10
2968 alpha = (mousePoint.
x - bounds.
x)/bounds.
width;
2969 if (alpha <= 0.0f) alpha = 0.0f;
2970 if (alpha >= 1.0f) alpha = 1.0f;
2984 int checksX = (int)bounds.
width/COLORBARALPHA_CHECKED_SIZE;
2985 int checksY = (
int)bounds.
height/COLORBARALPHA_CHECKED_SIZE;
2987 for (
int x = 0; x < checksX; x++)
2989 for (
int y = 0; y < checksY; y++)
2991 Rectangle check = { bounds.
x + x*COLORBARALPHA_CHECKED_SIZE, bounds.
y + y*COLORBARALPHA_CHECKED_SIZE, COLORBARALPHA_CHECKED_SIZE, COLORBARALPHA_CHECKED_SIZE };
2996 DrawRectangleGradientEx(bounds, RAYGUI_CLITERAL(
Color){ 255, 255, 255, 0 }, RAYGUI_CLITERAL(
Color){ 255, 255, 255, 0 },
Fade(RAYGUI_CLITERAL(
Color){ 0, 0, 0, 255 }, guiAlpha),
Fade(RAYGUI_CLITERAL(
Color){ 0, 0, 0, 255 }, guiAlpha));
2998 else DrawRectangleGradientEx(bounds,
Fade(
GetColor(
GuiGetStyle(
COLORPICKER,
BASE_COLOR_DISABLED)), 0.1f),
Fade(
GetColor(
GuiGetStyle(
COLORPICKER,
BASE_COLOR_DISABLED)), 0.1f),
Fade(
GetColor(
GuiGetStyle(
COLORPICKER,
BORDER_COLOR_DISABLED)), guiAlpha),
Fade(
GetColor(
GuiGetStyle(
COLORPICKER,
BORDER_COLOR_DISABLED)), guiAlpha));
3033 hue = (mousePoint.
y - bounds.
y)*360/bounds.
height;
3034 if (hue <= 0.0f) hue = 0.0f;
3035 if (hue >= 359.0f) hue = 359.0f;
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));
3064 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));
3066 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));
3090 Vector3 hsv = ConvertRGBtoHSV(RAYGUI_CLITERAL(
Vector3){ color.
r/255.0f, color.
g/255.0f, color.
b/255.0f });
3093 Vector3 rgb = ConvertHSVtoRGB(hsv);
3095 color = RAYGUI_CLITERAL(
Color){ (
unsigned char)roundf(rgb.
x*255.0f), (
unsigned char)roundf(rgb.
y*255.0f), (
unsigned char)roundf(rgb.
z*255.0f), color.
a };
3103 #define MESSAGEBOX_BUTTON_HEIGHT 24
3104 #define MESSAGEBOX_BUTTON_PADDING 10
3108 int buttonCount = 0;
3109 const char **buttonsText = GuiTextSplit(buttons, &buttonCount,
NULL);
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;
3119 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;
3121 textBounds.
width = textSize.
x;
3122 textBounds.
height = textSize.
y;
3136 for (
int i = 0; i < buttonCount; i++)
3138 if (
GuiButton(buttonBounds, buttonsText[i])) clicked = i + 1;
3139 buttonBounds.
x += (buttonBounds.
width + MESSAGEBOX_BUTTON_PADDING);
3151 #define TEXTINPUTBOX_BUTTON_HEIGHT 24
3152 #define TEXTINPUTBOX_BUTTON_PADDING 10
3153 #define TEXTINPUTBOX_HEIGHT 30
3155 #define TEXTINPUTBOX_MAX_TEXT_LENGTH 256
3159 static bool textEditMode =
false;
3163 int buttonCount = 0;
3164 const char **buttonsText = GuiTextSplit(buttons, &buttonCount,
NULL);
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;
3174 if (message !=
NULL)
3178 textBounds.
x = bounds.
x + bounds.
width/2 - textSize.
x/2;
3179 textBounds.
y = bounds.
y + WINDOW_STATUSBAR_HEIGHT + messageInputHeight/4 - textSize.
y/2;
3180 textBounds.
width = textSize.
x;
3181 textBounds.
height = textSize.
y;
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;
3188 else textBoxBounds.
y += (messageInputHeight/2 + messageInputHeight/4);
3189 textBoxBounds.
width = bounds.
width - TEXTINPUTBOX_BUTTON_PADDING*2;
3190 textBoxBounds.
height = TEXTINPUTBOX_HEIGHT;
3197 if (message !=
NULL)
3205 if (
GuiTextBox(textBoxBounds, text, TEXTINPUTBOX_MAX_TEXT_LENGTH, textEditMode)) textEditMode = !textEditMode;
3210 for (
int i = 0; i < buttonCount; i++)
3212 if (
GuiButton(buttonBounds, buttonsText[i])) btnIndex = i + 1;
3213 buttonBounds.
x += (buttonBounds.
width + MESSAGEBOX_BUTTON_PADDING);
3228 #if !defined(GRID_COLOR_ALPHA)
3229 #define GRID_COLOR_ALPHA 0.15f
3234 Vector2 currentCell = { -1, -1 };
3236 int linesV = ((int)(bounds.
width/spacing))*subdivs + 1;
3237 int linesH = ((int)(bounds.
height/spacing))*subdivs + 1;
3245 currentCell.
x = (mousePoint.
x - bounds.
x)/spacing;
3246 currentCell.
y = (mousePoint.
y - bounds.
y)/spacing;
3260 for (
int i = 0; i < linesV; i++)
3267 for (
int i = 0; i < linesH; i++)
3269 Rectangle lineH = { bounds.
x, bounds.
y + spacing*i/subdivs, bounds.
width, 1 };
3287 bool tryBinary =
false;
3290 FILE *rgsFile = fopen(fileName,
"rt");
3292 if (rgsFile !=
NULL)
3294 char buffer[256] = { 0 };
3295 fgets(buffer, 256, rgsFile);
3297 if (buffer[0] ==
'#')
3301 unsigned int propertyValue = 0;
3303 while (!feof(rgsFile))
3311 sscanf(buffer,
"p %d %d 0x%x", &controlId, &propertyId, &propertyValue);
3313 GuiSetStyle(controlId, propertyId, (
int)propertyValue);
3321 char charmapFileName[256] = { 0 };
3322 char fontFileName[256] = { 0 };
3323 sscanf(buffer,
"f %d %s %[^\r\n]s", &fontSize, charmapFileName, fontFileName);
3327 if (charmapFileName[0] !=
'0')
3332 if (charValues !=
NULL)
3335 const char **chars =
TextSplit(charValues,
'\n', &glyphCount);
3338 for (
int i = 0; i < glyphCount; i++) values[i] =
TextToInteger(chars[i]);
3353 fgets(buffer, 256, rgsFile);
3356 else tryBinary =
true;
3363 rgsFile = fopen(fileName,
"rb");
3365 if (rgsFile ==
NULL)
return;
3367 char signature[5] =
"";
3370 int propertyCount = 0;
3372 fread(signature, 1, 4, rgsFile);
3373 fread(&version, 1,
sizeof(
short), rgsFile);
3374 fread(&reserved, 1,
sizeof(
short), rgsFile);
3375 fread(&propertyCount, 1,
sizeof(
int), rgsFile);
3377 if ((signature[0] ==
'r') &&
3378 (signature[1] ==
'G') &&
3379 (signature[2] ==
'S') &&
3380 (signature[3] ==
' '))
3382 short controlId = 0;
3383 short propertyId = 0;
3384 int propertyValue = 0;
3386 for (
int i = 0; i < propertyCount; i++)
3388 fread(&controlId, 1,
sizeof(
short), rgsFile);
3389 fread(&propertyId, 1,
sizeof(
short), rgsFile);
3390 fread(&propertyValue, 1,
sizeof(
int), rgsFile);
3398 if (propertyId < RAYGUI_MAX_PROPS_BASE)
for (
int i = 1; i < RAYGUI_MAX_CONTROLS; i++)
GuiSetStyle(i, (
int)propertyId, propertyValue);
3400 else GuiSetStyle((
int)controlId, (
int)propertyId, propertyValue);
3404#if !defined(RAYGUI_STANDALONE)
3406 int fontDataSize = 0;
3407 fread(&fontDataSize, 1,
sizeof(
int), rgsFile);
3409 if (fontDataSize > 0)
3415 fread(&font.
baseSize, 1,
sizeof(
int), rgsFile);
3416 fread(&font.
glyphCount, 1,
sizeof(
int), rgsFile);
3417 fread(&fontType, 1,
sizeof(
int), rgsFile);
3420 fread(&whiteRec, 1,
sizeof(
Rectangle), rgsFile);
3423 int fontImageSize = 0;
3424 fread(&fontImageSize, 1,
sizeof(
int), rgsFile);
3426 if (fontImageSize > 0)
3428 Image imFont = { 0 };
3430 fread(&imFont.
width, 1,
sizeof(
int), rgsFile);
3431 fread(&imFont.
height, 1,
sizeof(
int), rgsFile);
3432 fread(&imFont.
format, 1,
sizeof(
int), rgsFile);
3435 fread(imFont.
data, 1, fontImageSize, rgsFile);
3450 fread(&font.
glyphs[i].
value, 1,
sizeof(
int), rgsFile);
3474 guiStyleLoaded =
true;
3553const char *
GuiIconText(
int iconId,
const char *text)
3555#if defined(RAYGUI_NO_RICONS)
3558 static char buffer[1024] = { 0 };
3559 memset(buffer, 0, 1024);
3561 sprintf(buffer,
"#%03i#", iconId);
3565 for (
int i = 5; i < 1024; i++)
3567 buffer[i] = text[i - 5];
3568 if (text[i - 5] ==
'\0')
break;
3576#if !defined(RAYGUI_NO_RICONS)
3579unsigned int *
GuiGetIcons(
void) {
return guiIcons; }
3585char **GuiLoadIcons(
const char *fileName,
bool loadIconsName)
3611 FILE *rgiFile = fopen(fileName,
"rb");
3613 char **guiIconsName =
NULL;
3615 if (rgiFile !=
NULL)
3617 char signature[5] =
"";
3620 short iconCount = 0;
3623 fread(signature, 1, 4, rgiFile);
3624 fread(&version, 1,
sizeof(
short), rgiFile);
3625 fread(&reserved, 1,
sizeof(
short), rgiFile);
3626 fread(&iconCount, 1,
sizeof(
short), rgiFile);
3627 fread(&iconSize, 1,
sizeof(
short), rgiFile);
3629 if ((signature[0] ==
'r') &&
3630 (signature[1] ==
'G') &&
3631 (signature[2] ==
'I') &&
3632 (signature[3] ==
' '))
3636 guiIconsName = (
char **)
RAYGUI_MALLOC(iconCount*
sizeof(
char **));
3637 for (
int i = 0; i < iconCount; i++)
3639 guiIconsName[i] = (
char *)
RAYGUI_MALLOC(RICON_MAX_NAME_LENGTH);
3640 fread(guiIconsName[i], RICON_MAX_NAME_LENGTH, 1, rgiFile);
3643 else fseek(rgiFile, iconCount*RICON_MAX_NAME_LENGTH, SEEK_CUR);
3646 fread(guiIcons, iconCount*(iconSize*iconSize/32),
sizeof(
unsigned int), rgiFile);
3652 return guiIconsName;
3656void GuiDrawIcon(
int iconId,
int posX,
int posY,
int pixelSize,
Color color)
3658 #define BIT_CHECK(a,b) ((a) & (1<<(b)))
3660 for (
int i = 0, y = 0; i < RICON_SIZE*RICON_SIZE/32; i++)
3662 for (
int k = 0; k < 32; k++)
3664 if (
BIT_CHECK(guiIcons[iconId*RICON_DATA_ELEMENTS + i], k))
3666 #if !defined(RAYGUI_STANDALONE)
3667 DrawRectangle(posX + (k%RICON_SIZE)*pixelSize, posY + y*pixelSize, pixelSize, pixelSize, color);
3671 if ((k == 15) || (k == 31)) y++;
3680 static unsigned int iconData[RICON_DATA_ELEMENTS] = { 0 };
3681 memset(iconData, 0, RICON_DATA_ELEMENTS*
sizeof(
unsigned int));
3683 if (iconId < RICON_MAX_ICONS) memcpy(iconData, &guiIcons[iconId*RICON_DATA_ELEMENTS], RICON_DATA_ELEMENTS*
sizeof(
unsigned int));
3692 if (iconId < RICON_MAX_ICONS) memcpy(&guiIcons[iconId*RICON_DATA_ELEMENTS], data, RICON_DATA_ELEMENTS*
sizeof(
unsigned int));
3698 #define BIT_SET(a,b) ((a) |= (1<<(b)))
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));
3708 #define BIT_CLEAR(a,b) ((a) &= ~((1)<<(b)))
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));
3718 #define BIT_CHECK(a,b) ((a) & (1<<(b)))
3720 return (
BIT_CHECK(guiIcons[iconId*8 + y/2], x + (y%2*16)));
3729static int GetTextWidth(
const char *text)
3733 if ((text !=
NULL) && (text[0] !=
'\0'))
3771static const char *GetTextIcon(
const char *text,
int *iconId)
3773#if !defined(RAYGUI_NO_RICONS)
3777 char iconValue[4] = { 0 };
3780 while ((pos < 4) && (text[pos] >=
'0') && (text[pos] <=
'9'))
3782 iconValue[pos - 1] = text[pos];
3786 if (text[pos] ==
'#')
3792 if (*iconId >= 0) text += (pos + 1);
3801static void GuiDrawText(
const char *text,
Rectangle bounds,
int alignment,
Color tint)
3803 #define TEXT_VALIGN_PIXEL_OFFSET(h) ((int)h%2)
3805 if ((text !=
NULL) && (text[0] !=
'\0'))
3808 text = GetTextIcon(text, &iconId);
3812 #define RICON_TEXT_PADDING 4
3814 Vector2 position = { bounds.
x, bounds.
y };
3817 int textWidth = GetTextWidth(text);
3823 textWidth += RICON_SIZE;
3826 if ((text !=
NULL) && (text[0] !=
'\0')) textWidth += RICON_TEXT_PADDING;
3834 position.
x = bounds.
x;
3835 position.
y = bounds.
y + bounds.
height/2 - textHeight/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.
height);
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);
3844 position.
x = bounds.
x + bounds.
width - textWidth;
3845 position.
y = bounds.
y + bounds.
height/2 - textHeight/2 + TEXT_VALIGN_PIXEL_OFFSET(bounds.
height);
3852 position.
x = (float)((
int)position.
x);
3853 position.
y = (float)((
int)position.
y);
3858#if !defined(RAYGUI_NO_RICONS)
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);
3872static void GuiDrawRectangle(
Rectangle rec,
int borderWidth,
Color borderColor,
Color color)
3880 if (borderWidth > 0)
3884 DrawRectangle((
int)rec.
x, (
int)rec.
y + borderWidth, borderWidth, (
int)rec.
height - 2*borderWidth, borderColor);
3885 DrawRectangle((
int)rec.
x + (
int)rec.
width - borderWidth, (
int)rec.
y + borderWidth, borderWidth, (
int)rec.
height - 2*borderWidth, borderColor);
3892static const char **GuiTextSplit(
const char *text,
int *count,
int *textRow)
3901 #if !defined(TEXTSPLIT_MAX_TEXT_LENGTH)
3902 #define TEXTSPLIT_MAX_TEXT_LENGTH 1024
3905 #if !defined(TEXTSPLIT_MAX_TEXT_ELEMENTS)
3906 #define TEXTSPLIT_MAX_TEXT_ELEMENTS 128
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);
3916 if (textRow !=
NULL) textRow[0] = 0;
3919 for (
int i = 0; i < TEXTSPLIT_MAX_TEXT_LENGTH; i++)
3921 buffer[i] = text[i];
3922 if (buffer[i] ==
'\0')
break;
3923 else if ((buffer[i] ==
';') || (buffer[i] ==
'\n'))
3925 result[counter] = buffer + i + 1;
3927 if (textRow !=
NULL)
3929 if (buffer[i] ==
'\n') textRow[counter] = textRow[counter - 1] + 1;
3930 else textRow[counter] = textRow[counter - 1];
3936 if (counter == TEXTSPLIT_MAX_TEXT_ELEMENTS)
break;
3954 min = (rgb.
x < rgb.
y)? rgb.
x : rgb.
y;
3955 min = (min < rgb.
z)? min : rgb.
z;
3957 max = (rgb.
x > rgb.
y)? rgb.
x : rgb.
y;
3958 max = (max > rgb.
z)? max : rgb.
z;
3963 if (delta < 0.00001f)
3973 hsv.
y = (delta/max);
3984 if (rgb.
x >= max) hsv.
x = (rgb.
y - rgb.
z)/delta;
3987 if (rgb.
y >= max) hsv.
x = 2.0f + (rgb.
z - rgb.
x)/delta;
3988 else hsv.
x = 4.0f + (rgb.
x - rgb.
y)/delta;
3993 if (hsv.
x < 0.0f) hsv.
x += 360.0f;
4003 float hh = 0.0f, p = 0.0f, q = 0.0f, t = 0.0f, ff = 0.0f;
4016 if (hh >= 360.0f) hh = 0.0f;
4021 p = hsv.
z*(1.0f - hsv.
y);
4022 q = hsv.
z*(1.0f - (hsv.
y*ff));
4023 t = hsv.
z*(1.0f - (hsv.
y*(1.0f - ff)));
4069#if defined(RAYGUI_STANDALONE)
4075 color.
r = (
unsigned char)(hexValue >> 24) & 0xFF;
4076 color.
g = (
unsigned char)(hexValue >> 16) & 0xFF;
4077 color.
b = (
unsigned char)(hexValue >> 8) & 0xFF;
4078 color.
a = (
unsigned char)hexValue & 0xFF;
4086 return (((
int)color.
r << 24) | ((
int)color.
g << 16) | ((
int)color.
b << 8) | (
int)color.
a);
4092 bool collision =
false;
4094 if ((point.
x >= rec.
x) && (point.
x <= (rec.
x + rec.
width)) &&
4095 (point.
y >= rec.
y) && (point.
y <= (rec.
y + rec.
height))) collision =
true;
4103 if (alpha < 0.0f) alpha = 0.0f;
4104 else if (alpha > 1.0f) alpha = 1.0f;
4106 Color result = { color.
r, color.
g, color.
b, (
unsigned char)(255.0f*alpha) };
4112static const char *
TextFormat(
const char *text, ...)
4114 #define MAX_FORMATTEXT_LENGTH 64
4116 static char buffer[MAX_FORMATTEXT_LENGTH];
4119 va_start(args, text);
4120 vsprintf(buffer, text, args);
4130 Rectangle bounds = { (float)posX, (
float)posY, (float)width, (
float)height };
4134#define TEXTSPLIT_MAX_TEXT_BUFFER_LENGTH 1024
4135#define TEXTSPLIT_MAX_SUBSTRINGS_COUNT 128
4138const char **
TextSplit(
const char *text,
char delimiter,
int *count)
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);
4158 for (
int i = 0; i < TEXTSPLIT_MAX_TEXT_BUFFER_LENGTH; i++)
4160 buffer[i] = text[i];
4161 if (buffer[i] ==
'\0')
break;
4162 else if (buffer[i] == delimiter)
4165 result[counter] = buffer + i + 1;
4168 if (counter == TEXTSPLIT_MAX_SUBSTRINGS_COUNT)
break;
4184 if ((text[0] ==
'+') || (text[0] ==
'-'))
4186 if (text[0] ==
'-') sign = -1;
4190 for (
int i = 0; ((text[i] >=
'0') && (text[i] <=
'9')); ++i) value = value*10 + (
int)(text[i] -
'0');
4198 static char utf8[6] = { 0 };
4201 if (codepoint <= 0x7f)
4203 utf8[0] = (char)codepoint;
4206 else if (codepoint <= 0x7ff)
4208 utf8[0] = (char)(((codepoint >> 6) & 0x1f) | 0xc0);
4209 utf8[1] = (char)((codepoint & 0x3f) | 0x80);
4212 else if (codepoint <= 0xffff)
4214 utf8[0] = (char)(((codepoint >> 12) & 0x0f) | 0xe0);
4215 utf8[1] = (char)(((codepoint >> 6) & 0x3f) | 0x80);
4216 utf8[2] = (char)((codepoint & 0x3f) | 0x80);
4219 else if (codepoint <= 0x10ffff)
4221 utf8[0] = (char)(((codepoint >> 18) & 0x07) | 0xf0);
4222 utf8[1] = (char)(((codepoint >> 12) & 0x3f) | 0x80);
4223 utf8[2] = (char)(((codepoint >> 6) & 0x3f) | 0x80);
4224 utf8[3] = (char)((codepoint & 0x3f) | 0x80);
4238static int GetCodepoint(
const char *text,
int *bytesProcessed)
4254 int octet = (
unsigned char)(text[0]);
4255 *bytesProcessed = 1;
4262 else if ((octet & 0xe0) == 0xc0)
4267 unsigned char octet1 = text[1];
4269 if ((octet1 ==
'\0') || ((octet1 >> 6) != 2)) { *bytesProcessed = 2;
return code; }
4271 if ((octet >= 0xc2) && (octet <= 0xdf))
4273 code = ((octet & 0x1f) << 6) | (octet1 & 0x3f);
4274 *bytesProcessed = 2;
4277 else if ((octet & 0xf0) == 0xe0)
4280 unsigned char octet1 = text[1];
4281 unsigned char octet2 =
'\0';
4283 if ((octet1 ==
'\0') || ((octet1 >> 6) != 2)) { *bytesProcessed = 2;
return code; }
4287 if ((octet2 ==
'\0') || ((octet2 >> 6) != 2)) { *bytesProcessed = 3;
return code; }
4294 if (((octet == 0xe0) && !((octet1 >= 0xa0) && (octet1 <= 0xbf))) ||
4295 ((octet == 0xed) && !((octet1 >= 0x80) && (octet1 <= 0x9f)))) { *bytesProcessed = 2;
return code; }
4297 if ((octet >= 0xe0) && (0 <= 0xef))
4299 code = ((octet & 0xf) << 12) | ((octet1 & 0x3f) << 6) | (octet2 & 0x3f);
4300 *bytesProcessed = 3;
4303 else if ((octet & 0xf8) == 0xf0)
4306 if (octet > 0xf4)
return code;
4308 unsigned char octet1 = text[1];
4309 unsigned char octet2 =
'\0';
4310 unsigned char octet3 =
'\0';
4312 if ((octet1 ==
'\0') || ((octet1 >> 6) != 2)) { *bytesProcessed = 2;
return code; }
4316 if ((octet2 ==
'\0') || ((octet2 >> 6) != 2)) { *bytesProcessed = 3;
return code; }
4320 if ((octet3 ==
'\0') || ((octet3 >> 6) != 2)) { *bytesProcessed = 4;
return code; }
4326 if (((octet == 0xf0) && !((octet1 >= 0x90) && (octet1 <= 0xbf))) ||
4327 ((octet == 0xf4) && !((octet1 >= 0x80) && (octet1 <= 0x8f)))) { *bytesProcessed = 2;
return code; }
4331 code = ((octet & 0x7) << 18) | ((octet1 & 0x3f) << 12) | ((octet2 & 0x3f) << 6) | (octet3 & 0x3f);
4332 *bytesProcessed = 4;
4336 if (code > 0x10ffff) code = 0x3f;
RAYGUIAPI unsigned int * GuiGetIcons(void)
RAYGUIAPI void GuiPanel(Rectangle bounds)
RAYGUIAPI bool GuiDropdownBox(Rectangle bounds, const char *text, int *active, bool editMode)
RAYGUIAPI Rectangle GuiScrollPanel(Rectangle bounds, Rectangle content, Vector2 *scroll)
RAYGUIAPI void GuiLine(Rectangle bounds, const char *text)
RAYGUIAPI Vector2 GuiGrid(Rectangle bounds, float spacing, int subdivs)
RAYGUIAPI void GuiDisable(void)
RAYGUIAPI int GuiListView(Rectangle bounds, const char *text, int *scrollIndex, int active)
RAYGUIAPI int GuiScrollBar(Rectangle bounds, int value, int minValue, int maxValue)
RAYGUIAPI float GuiProgressBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue)
@ HUEBAR_SELECTOR_OVERFLOW
RAYGUIAPI float GuiSlider(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue)
RAYGUIAPI unsigned int * GuiGetIconData(int iconId)
RAYGUIAPI int GuiMessageBox(Rectangle bounds, const char *title, const char *message, const char *buttons)
RAYGUIAPI void GuiUnlock(void)
RAYGUIAPI Color GuiColorPicker(Rectangle bounds, Color color)
#define RAYGUI_MALLOC(sz)
RAYGUIAPI bool GuiCheckIconPixel(int iconId, int x, int y)
RAYGUIAPI bool GuiWindowBox(Rectangle bounds, const char *title)
RAYGUIAPI void GuiLoadStyleDefault(void)
RAYGUIAPI void GuiDummyRec(Rectangle bounds, const char *text)
RAYGUIAPI void GuiStatusBar(Rectangle bounds, const char *text)
RAYGUIAPI bool GuiSpinner(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode)
RAYGUIAPI bool GuiTextBox(Rectangle bounds, char *text, int textSize, bool editMode)
RAYGUIAPI int GuiToggleGroup(Rectangle bounds, const char *text, int active)
RAYGUIAPI void GuiSetIconPixel(int iconId, int x, int y)
RAYGUIAPI bool GuiTextBoxMulti(Rectangle bounds, char *text, int textSize, bool editMode)
RAYGUIAPI bool GuiLabelButton(Rectangle bounds, const char *text)
#define RAYGUI_CALLOC(n, sz)
RAYGUIAPI bool GuiButton(Rectangle bounds, const char *text)
RAYGUIAPI Color GuiColorPanel(Rectangle bounds, Color color)
RAYGUIAPI float GuiColorBarHue(Rectangle bounds, float value)
RAYGUIAPI const char * GuiIconText(int iconId, const char *text)
RAYGUIAPI void GuiLock(void)
RAYGUIAPI void GuiLabel(Rectangle bounds, const char *text)
RAYGUIAPI int GuiGetStyle(int control, int property)
RAYGUIAPI void GuiSetFont(Font font)
RAYGUIAPI void GuiLoadStyle(const char *fileName)
RAYGUIAPI bool GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, int maxValue, bool editMode)
RAYGUIAPI void GuiSetStyle(int control, int property, int value)
RAYGUIAPI void GuiFade(float alpha)
RAYGUIAPI void GuiEnable(void)
RAYGUIAPI void GuiDrawIcon(int iconId, int posX, int posY, int pixelSize, Color color)
RAYGUIAPI int GuiComboBox(Rectangle bounds, const char *text, int active)
RAYGUIAPI float GuiColorBarAlpha(Rectangle bounds, float alpha)
RAYGUIAPI bool GuiToggle(Rectangle bounds, const char *text, bool active)
RAYGUIAPI void GuiSetIconData(int iconId, unsigned int *data)
RAYGUIAPI void GuiClearIconPixel(int iconId, int x, int y)
RAYGUIAPI void GuiGroupBox(Rectangle bounds, const char *text)
RAYGUIAPI void GuiSetState(int state)
RAYGUIAPI int GuiListViewEx(Rectangle bounds, const char **text, int count, int *focus, int *scrollIndex, int active)
RAYGUIAPI float GuiSliderBar(Rectangle bounds, const char *textLeft, const char *textRight, float value, float minValue, float maxValue)
RAYGUIAPI bool GuiCheckBox(Rectangle bounds, const char *text, bool checked)
RAYGUIAPI int GuiTextInputBox(Rectangle bounds, const char *title, const char *message, const char *buttons, char *text)
RAYGUIAPI bool GuiIsLocked(void)
RAYGUIAPI int GuiGetState(void)
RAYGUIAPI Font GuiGetFont(void)
RLAPI const char * TextFormat(const char *text,...)
RLAPI bool IsKeyPressed(int key)
RLAPI Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing)
RLAPI Font LoadFontEx(const char *fileName, int fontSize, int *fontChars, int glyphCount)
RLAPI void SetShapesTexture(Texture2D texture, Rectangle source)
RLAPI Color Fade(Color color, float alpha)
RLAPI int GetCharPressed(void)
RLAPI bool IsMouseButtonReleased(int button)
RLAPI int TextToInteger(const char *text)
RLAPI void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint)
RLAPI float GetMouseWheelMove(void)
RLAPI Font GetFontDefault(void)
RLAPI int ColorToInt(Color color)
RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color)
RLAPI const char * CodepointToUTF8(int codepoint, int *byteSize)
RLAPI bool IsMouseButtonDown(int button)
RLAPI bool IsKeyDown(int key)
RLAPI void DrawRectangleGradientEx(Rectangle rec, Color col1, Color col2, Color col3, Color col4)
RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec)
RLAPI Vector2 GetMousePosition(void)
RLAPI void DrawRectangleGradientV(int posX, int posY, int width, int height, Color color1, Color color2)
RLAPI const char * GetDirectoryPath(const char *filePath)
RLAPI int GetCodepoint(const char *text, int *bytesProcessed)
RLAPI bool IsMouseButtonPressed(int button)
RLAPI int GetGlyphIndex(Font font, int codepoint)
RLAPI const char ** TextSplit(const char *text, char delimiter, int *count)
RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint)
RLAPI Texture2D LoadTextureFromImage(Image image)
RLAPI char * LoadFileText(const char *fileName)
RLAPI Color GetColor(unsigned int hexValue)
#define MOUSE_LEFT_BUTTON
unsigned short propertyId