mirror of
https://github.com/raysan5/raygui.git
synced 2026-02-05 05:39:18 -05:00
Multiple tool improvements
- Added DropdownBox controler - GenerateLayoutCode() added bool noStaticData - Reviewed multiple layouts
This commit is contained in:
@ -13,11 +13,11 @@ a 004 0 0 0
|
|||||||
a 005 0 0 0
|
a 005 0 0 0
|
||||||
a 006 0 0 0
|
a 006 0 0 0
|
||||||
a 007 0 0 0
|
a 007 0 0 0
|
||||||
c 000 13 24 15 220 161 1 Image Export Options
|
c 000 13 0 0 220 161 1 Image Export Options
|
||||||
c 001 9 102 47 130 20 1
|
c 001 9 77 32 130 20 1 Laser/Shoot
|
||||||
c 002 9 102 77 130 20 1 SAMPLE TEXT
|
c 002 9 77 62 130 20 1 SAMPLE TEXT
|
||||||
c 003 11 102 107 131 22 1 Untitled
|
c 003 11 77 92 131 22 1 Untitled
|
||||||
c 004 1 35 139 200 30 1 Export Image
|
c 004 1 10 124 200 30 1 Export Image
|
||||||
c 005 0 35 53 60 20 1 File format
|
c 005 0 10 38 60 20 1 File format
|
||||||
c 006 0 35 83 61 20 1 Pixel format
|
c 006 0 10 68 61 20 1 Pixel format
|
||||||
c 007 0 35 113 50 20 1 File name
|
c 007 0 10 98 50 20 1 File name
|
||||||
|
|||||||
@ -13,25 +13,25 @@ a 004 0 0 0
|
|||||||
a 005 0 0 0
|
a 005 0 0 0
|
||||||
a 006 0 0 0
|
a 006 0 0 0
|
||||||
a 007 0 0 0
|
a 007 0 0 0
|
||||||
c 000 13 116 65 200 452 1 RAW Import Options
|
c 000 13 0 0 200 452 1 RAW Import Options
|
||||||
c 002 0 126 116 80 20 1 File size:
|
c 002 0 9 50 80 20 1 File size:
|
||||||
c 004 0 136 166 30 20 1 Width:
|
c 004 0 19 100 30 20 1 Width:
|
||||||
c 005 0 136 191 33 20 1 Height:
|
c 005 0 19 125 33 20 1 Height:
|
||||||
c 006 0 266 166 30 20 1 pixels
|
c 006 0 149 100 30 20 1 pixels
|
||||||
c 007 0 266 191 30 20 1 pixels
|
c 007 0 149 125 30 20 1 pixels
|
||||||
c 008 11 176 161 80 20 1 SAMPLE TEXT
|
c 008 11 59 95 80 20 1 SAMPLE TEXT
|
||||||
c 009 11 176 186 80 20 1 SAMPLE TEXT
|
c 009 11 59 120 80 20 1 SAMPLE TEXT
|
||||||
c 011 0 138 254 63 20 1 Pixel format:
|
c 011 0 21 188 63 20 1 Pixel format:
|
||||||
c 012 9 137 268 158 21 1 SAMPLE TEXT
|
c 012 9 20 202 158 21 1 SAMPLE TEXT
|
||||||
c 013 0 137 304 50 20 1 Channels:
|
c 013 0 20 238 50 20 1 Channels:
|
||||||
c 012 4 137 317 156 20 1 Bit Depth:
|
c 012 4 20 251 156 20 1 Bit Depth:
|
||||||
c 013 4 137 358 156 20 1 Bit Depth:
|
c 013 4 20 292 156 20 1 Bit Depth:
|
||||||
c 014 0 137 345 50 20 1 Bit Depth:
|
c 014 0 20 279 50 20 1 Bit Depth:
|
||||||
c 015 0 136 432 22 20 1 Size:
|
c 015 0 19 366 22 20 1 Size:
|
||||||
c 016 0 266 432 30 20 1 bytes
|
c 016 0 149 366 30 20 1 bytes
|
||||||
c 017 11 176 427 80 20 1 SAMPLE TEXT
|
c 017 11 59 361 80 20 1 SAMPLE TEXT
|
||||||
c 018 1 126 477 180 24 1 SAMPLE TEXT
|
c 018 1 9 411 180 24 1 Import
|
||||||
c 019 12 126 412 179 49 1 Header
|
c 019 12 9 346 179 49 1 Header
|
||||||
c 020 12 126 241 179 150 1 Pixels Data
|
c 020 12 9 175 179 150 1 Pixels Data
|
||||||
c 021 12 126 141 179 79 1 Resolution
|
c 021 12 9 75 179 79 1 Resolution
|
||||||
c 022 0 126 96 54 20 1 Import file:
|
c 022 0 9 30 54 20 1 Import file:
|
||||||
|
|||||||
@ -1,116 +1,123 @@
|
|||||||
#
|
#
|
||||||
# rgl text file (v1.0) - raygui layout text file generated using rGuiLayout
|
# rgl text file (v1.0) - raygui layout text file generated using rGuiLayout
|
||||||
#
|
#
|
||||||
# Total number of controls: 101
|
# Total number of controls: 108
|
||||||
# Anchor info: a <id> <posx> <posy> <enabled>
|
# Anchor info: a <id> <posx> <posy> <enabled>
|
||||||
# Control info: c <id> <type> <rectangle> <anchor_id> <text>
|
# Control info: c <id> <type> <rectangle> <anchor_id> <text>
|
||||||
#
|
#
|
||||||
a 000 0 0 1
|
a 000 0 0 1
|
||||||
a 001 0 0 1
|
a 001 50 50 1
|
||||||
a 002 0 0 0
|
a 002 0 0 0
|
||||||
a 003 0 0 0
|
a 003 0 0 0
|
||||||
a 004 0 0 0
|
a 004 0 0 0
|
||||||
a 005 0 0 0
|
a 005 0 0 0
|
||||||
a 006 0 0 0
|
a 006 0 0 0
|
||||||
a 007 0 0 0
|
a 007 0 0 0
|
||||||
c 000 1 113 98 92 20 1 Pickup/Coin
|
c 000 1 13 48 92 20 1 Pickup/Coin
|
||||||
c 001 1 113 123 92 20 1 Laser/Shoot
|
c 001 1 13 73 92 20 1 Laser/Shoot
|
||||||
c 002 1 113 148 92 20 1 Explosion
|
c 002 1 13 98 92 20 1 Explosion
|
||||||
c 003 1 113 173 92 20 1 Powerup
|
c 003 1 13 123 92 20 1 Powerup
|
||||||
c 004 1 113 198 92 20 1 Hit/Hurt
|
c 004 1 13 148 92 20 1 Hit/Hurt
|
||||||
c 005 1 113 223 92 20 1 Jump
|
c 005 1 13 173 92 20 1 Jump
|
||||||
c 006 1 113 248 92 20 1 Blip/Select
|
c 006 1 13 198 92 20 1 Blip/Select
|
||||||
c 007 1 113 414 92 20 1 Mutate
|
c 007 1 13 364 92 20 1 Mutate
|
||||||
c 008 1 113 439 92 20 1 Randomize
|
c 008 1 13 389 92 20 1 Randomize
|
||||||
c 009 1 494 65 92 20 1 Screen Size x2
|
c 009 1 394 15 92 20 1 Screen Size x2
|
||||||
c 010 1 494 333 92 20 1 Load Sound
|
c 010 1 394 283 92 20 1 Load Sound
|
||||||
c 011 1 494 357 92 20 1 Save Sound
|
c 011 1 394 307 92 20 1 Save Sound
|
||||||
c 012 1 494 439 92 20 1 Export Wav
|
c 012 1 394 389 92 20 1 Export Wav
|
||||||
c 013 1 494 131 92 20 1 Play Sound
|
c 013 1 394 81 92 20 1 Play Sound
|
||||||
c 014 10 494 165 10 10 1 SAMPLE TEXT
|
c 014 10 394 115 10 10 1 SAMPLE TEXT
|
||||||
c 015 0 510 165 80 20 1 Play on change
|
c 015 0 410 115 80 20 1 Play on change
|
||||||
c 016 0 494 190 80 20 1 powered by
|
c 016 0 394 140 80 20 1 powered by
|
||||||
c 017 0 505 300 70 20 1 www.raylib.com
|
c 017 0 405 250 70 20 1 www.raylib.com
|
||||||
c 018 0 494 99 92 20 1 VOLUME: 60 %
|
c 018 0 394 49 92 20 1 VOLUME: 60 %
|
||||||
c 019 6 494 115 92 10 1 SAMPLE TEXT
|
c 019 6 394 65 92 10 1 SAMPLE TEXT
|
||||||
c 020 9 494 390 92 20 1 SAMPLE TEXT
|
c 020 9 394 340 92 20 1 SAMPLE TEXT
|
||||||
c 021 9 494 414 92 20 1 SAMPLE TEXT
|
c 021 9 394 364 92 20 1 SAMPLE TEXT
|
||||||
c 022 4 217 65 264 20 1 SAMPLE TEXT
|
c 022 4 117 15 264 20 1 SAMPLE TEXT
|
||||||
c 023 0 116 285 90 20 1 based on sfxr by
|
c 023 0 16 235 90 20 1 based on sfxr by
|
||||||
c 024 0 113 298 98 20 1 Tomas Pettersson
|
c 024 0 13 248 98 20 1 Tomas Pettersson
|
||||||
c 025 0 118 370 100 20 1 www.github.com/
|
c 025 0 18 320 100 20 1 www.github.com/
|
||||||
c 026 0 118 385 81 20 1 raysan5/raylib
|
c 026 0 18 335 81 20 1 raysan5/raylib
|
||||||
c 027 6 344 98 100 10 1 SAMPLE TEXT
|
c 027 6 244 48 100 10 1 SAMPLE TEXT
|
||||||
c 028 6 344 113 100 10 1 SAMPLE TEXT
|
c 028 6 244 63 100 10 1 SAMPLE TEXT
|
||||||
c 029 6 344 128 100 10 1 SAMPLE TEXT
|
c 029 6 244 78 100 10 1 SAMPLE TEXT
|
||||||
c 030 6 344 143 100 10 1 SAMPLE TEXT
|
c 030 6 244 93 100 10 1 SAMPLE TEXT
|
||||||
c 031 6 344 164 100 10 1 SAMPLE TEXT
|
c 031 6 244 114 100 10 1 SAMPLE TEXT
|
||||||
c 032 6 344 179 100 10 1 SAMPLE TEXT
|
c 032 6 244 129 100 10 1 SAMPLE TEXT
|
||||||
c 033 6 344 194 100 10 1 SAMPLE TEXT
|
c 033 6 244 144 100 10 1 SAMPLE TEXT
|
||||||
c 034 6 344 209 100 10 1 SAMPLE TEXT
|
c 034 6 244 159 100 10 1 SAMPLE TEXT
|
||||||
c 035 6 344 224 100 10 1 SAMPLE TEXT
|
c 035 6 244 174 100 10 1 SAMPLE TEXT
|
||||||
c 036 6 344 239 100 10 1 SAMPLE TEXT
|
c 036 6 244 189 100 10 1 SAMPLE TEXT
|
||||||
c 037 6 344 260 100 10 1 SAMPLE TEXT
|
c 037 6 244 210 100 10 1 SAMPLE TEXT
|
||||||
c 038 6 344 275 100 10 1 SAMPLE TEXT
|
c 038 6 244 225 100 10 1 SAMPLE TEXT
|
||||||
c 039 6 344 296 100 10 1 SAMPLE TEXT
|
c 039 6 244 246 100 10 1 SAMPLE TEXT
|
||||||
c 040 6 344 311 100 10 1 SAMPLE TEXT
|
c 040 6 244 261 100 10 1 SAMPLE TEXT
|
||||||
c 041 6 344 332 100 10 1 SAMPLE TEXT
|
c 041 6 244 282 100 10 1 SAMPLE TEXT
|
||||||
c 042 6 344 353 100 10 1 SAMPLE TEXT
|
c 042 6 244 303 100 10 1 SAMPLE TEXT
|
||||||
c 043 6 344 368 100 10 1 SAMPLE TEXT
|
c 043 6 244 318 100 10 1 SAMPLE TEXT
|
||||||
c 044 6 344 389 100 10 1 SAMPLE TEXT
|
c 044 6 244 339 100 10 1 SAMPLE TEXT
|
||||||
c 045 6 344 404 100 10 1 SAMPLE TEXT
|
c 045 6 244 354 100 10 1 SAMPLE TEXT
|
||||||
c 046 6 344 419 100 10 1 SAMPLE TEXT
|
c 046 6 244 369 100 10 1 SAMPLE TEXT
|
||||||
c 047 6 344 434 100 10 1 SAMPLE TEXT
|
c 047 6 244 384 100 10 1 SAMPLE TEXT
|
||||||
c 048 6 344 449 100 10 1 SAMPLE TEXT
|
c 048 6 244 399 100 10 1 SAMPLE TEXT
|
||||||
c 049 14 427 530 173 20 1 Wave size:
|
c 049 14 327 480 173 20 1 Wave size:
|
||||||
c 050 14 100 530 201 20 1 SOUND INFO: Num samples:
|
c 050 14 0 480 201 20 1 SOUND INFO: Num samples:
|
||||||
c 051 14 300 530 128 20 1 Duration:
|
c 051 14 200 480 128 20 1 Duration:
|
||||||
c 052 0 451 450 20 20 1 0.00
|
c 052 0 351 400 20 20 1 0.00
|
||||||
c 053 0 451 99 20 20 1 0.00
|
c 053 0 351 49 20 20 1 0.00
|
||||||
c 054 0 451 129 20 20 1 0.00
|
c 054 0 351 79 20 20 1 0.00
|
||||||
c 055 0 451 180 20 20 1 0.00
|
c 055 0 351 130 20 20 1 0.00
|
||||||
c 056 0 451 195 20 20 1 0.00
|
c 056 0 351 145 20 20 1 0.00
|
||||||
c 057 0 451 210 20 20 1 0.00
|
c 057 0 351 160 20 20 1 0.00
|
||||||
c 058 0 451 225 20 20 1 0.00
|
c 058 0 351 175 20 20 1 0.00
|
||||||
c 059 0 451 240 20 20 1 0.00
|
c 059 0 351 190 20 20 1 0.00
|
||||||
c 060 0 451 261 20 20 1 0.00
|
c 060 0 351 211 20 20 1 0.00
|
||||||
c 061 0 451 276 20 20 1 0.00
|
c 061 0 351 226 20 20 1 0.00
|
||||||
c 062 0 451 297 20 20 1 0.00
|
c 062 0 351 247 20 20 1 0.00
|
||||||
c 063 0 451 312 19 20 1 0.00
|
c 063 0 351 262 19 20 1 0.00
|
||||||
c 064 0 451 333 19 20 1 0.00
|
c 064 0 351 283 19 20 1 0.00
|
||||||
c 065 0 451 354 19 20 1 0.00
|
c 065 0 351 304 19 20 1 0.00
|
||||||
c 066 0 451 390 20 20 1 1.00
|
c 066 0 351 340 20 20 1 1.00
|
||||||
c 067 0 451 405 20 20 1 0.00
|
c 067 0 351 355 20 20 1 0.00
|
||||||
c 068 0 451 420 20 20 1 0.00
|
c 068 0 351 370 20 20 1 0.00
|
||||||
c 069 0 451 435 20 20 1 0.00
|
c 069 0 351 385 20 20 1 0.00
|
||||||
c 070 0 451 165 20 20 1 0.30
|
c 070 0 351 115 20 20 1 0.30
|
||||||
c 071 0 451 114 20 20 1 0.30
|
c 071 0 351 64 20 20 1 0.30
|
||||||
c 072 0 451 144 20 20 1 0.40
|
c 072 0 351 94 20 20 1 0.40
|
||||||
c 073 0 451 369 19 20 1 0.00
|
c 073 0 351 319 19 20 1 0.00
|
||||||
c 074 0 258 98 80 20 1 ATTACK TIME
|
c 074 0 158 48 80 20 1 ATTACK TIME
|
||||||
c 075 0 255 113 81 20 1 SUSTAIN TIME
|
c 075 0 155 63 81 20 1 SUSTAIN TIME
|
||||||
c 076 0 247 128 90 20 1 SUSTAIN PUNCH
|
c 076 0 147 78 90 20 1 SUSTAIN PUNCH
|
||||||
c 077 0 267 143 70 20 1 DECAY TIME
|
c 077 0 167 93 70 20 1 DECAY TIME
|
||||||
c 078 0 229 164 103 20 1 START FREQUENCY
|
c 078 0 129 114 103 20 1 START FREQUENCY
|
||||||
c 079 0 247 179 90 20 1 MIN FREQUENCY
|
c 079 0 147 129 90 20 1 MIN FREQUENCY
|
||||||
c 080 0 302 194 30 20 1 SLIDE
|
c 080 0 202 144 30 20 1 SLIDE
|
||||||
c 081 0 263 209 70 20 1 DELTA SLIDE
|
c 081 0 163 159 70 20 1 DELTA SLIDE
|
||||||
c 082 0 246 239 90 20 1 VIBRATO SPEED
|
c 082 0 146 189 90 20 1 VIBRATO SPEED
|
||||||
c 083 0 245 224 90 20 1 VIBRATO DEPTH
|
c 083 0 145 174 90 20 1 VIBRATO DEPTH
|
||||||
c 084 0 243 260 90 20 1 CHANGE AMOUNT
|
c 084 0 143 210 90 20 1 CHANGE AMOUNT
|
||||||
c 085 0 252 275 80 20 1 CHANGE SPEED
|
c 085 0 152 225 80 20 1 CHANGE SPEED
|
||||||
c 086 0 258 296 80 20 1 SQUARE DUTY
|
c 086 0 158 246 80 20 1 SQUARE DUTY
|
||||||
c 087 0 264 311 68 20 1 DUTY SWEEP
|
c 087 0 164 261 68 20 1 DUTY SWEEP
|
||||||
c 088 0 251 332 81 20 1 REPEAT SPEED
|
c 088 0 151 282 81 20 1 REPEAT SPEED
|
||||||
c 089 0 251 368 81 20 1 PHASER SWEEP
|
c 089 0 151 318 81 20 1 PHASER SWEEP
|
||||||
c 090 0 244 353 88 20 1 PHASER OFFSET
|
c 090 0 144 303 88 20 1 PHASER OFFSET
|
||||||
c 091 0 226 404 106 20 1 LPF CUTOFF SWEEP
|
c 091 0 126 354 106 20 1 LPF CUTOFF SWEEP
|
||||||
c 092 0 266 389 66 20 1 LPF CUTOFF
|
c 092 0 166 339 66 20 1 LPF CUTOFF
|
||||||
c 093 0 246 419 86 20 1 LPF RESONANCE
|
c 093 0 146 369 86 20 1 LPF RESONANCE
|
||||||
c 094 0 225 449 107 20 1 HPF CUTOFF SWEEP
|
c 094 0 125 399 107 20 1 HPF CUTOFF SWEEP
|
||||||
c 095 0 265 434 67 20 1 HPF CUTOFF
|
c 095 0 165 384 67 20 1 HPF CUTOFF
|
||||||
c 096 0 118 330 100 20 1 www.github.com/
|
c 096 0 18 280 100 20 1 www.github.com/
|
||||||
c 097 0 118 345 81 20 1 raysan5/raygui
|
c 097 0 18 295 81 20 1 raysan5/raygui
|
||||||
c 098 14 494 203 92 92 1 LOGO
|
c 098 14 394 153 92 92 1 LOGO
|
||||||
c 099 14 129 65 76 20 1 Version
|
c 099 14 29 15 76 20 1 Version
|
||||||
c 100 14 113 471 473 50 1 WAVE
|
c 100 14 13 421 473 50 1 WAVE
|
||||||
|
c 101 12 117 42 264 67 1
|
||||||
|
c 102 12 117 109 264 96 1
|
||||||
|
c 103 12 117 205 264 36 1
|
||||||
|
c 104 12 117 277 264 22 1
|
||||||
|
c 105 12 117 241 264 36 1
|
||||||
|
c 107 12 117 334 264 81 1
|
||||||
|
c 107 12 117 299 264 35 1
|
||||||
|
|||||||
@ -13,30 +13,30 @@ a 004 0 0 0
|
|||||||
a 005 0 0 0
|
a 005 0 0 0
|
||||||
a 006 0 0 0
|
a 006 0 0 0
|
||||||
a 007 0 0 0
|
a 007 0 0 0
|
||||||
c 000 14 285 25 226 30 1 ATLAS SETTINGS
|
c 000 14 0 0 226 30 1 ATLAS SETTINGS
|
||||||
c 001 0 300 90 50 20 1 Algorythm
|
c 001 0 15 65 50 20 1 Algorythm
|
||||||
c 002 0 300 120 51 20 1 Heuristics
|
c 002 0 15 95 51 20 1 Heuristics
|
||||||
c 003 0 300 150 38 20 1 Padding
|
c 003 0 15 125 38 20 1 Padding
|
||||||
c 004 10 300 180 20 20 1 SAMPLE TEXT
|
c 004 10 15 155 20 20 1 SAMPLE TEXT
|
||||||
c 005 10 300 210 20 20 1 SAMPLE TEXT
|
c 005 10 15 185 20 20 1 SAMPLE TEXT
|
||||||
c 006 10 300 240 20 20 1 SAMPLE TEXT
|
c 006 10 15 215 20 20 1 SAMPLE TEXT
|
||||||
c 007 0 340 185 62 20 1 Trim sprites
|
c 007 0 55 160 62 20 1 Trim sprites
|
||||||
c 008 0 340 215 111 20 1 Allow sprites rotation
|
c 008 0 55 190 111 20 1 Allow sprites rotation
|
||||||
c 009 0 340 245 92 20 1 Remove duplicates
|
c 009 0 55 220 92 20 1 Remove duplicates
|
||||||
c 010 9 365 85 130 20 1 SAMPLE TEXT
|
c 010 9 80 60 130 20 1 SAMPLE TEXT
|
||||||
c 011 9 365 115 130 20 1 SAMPLE TEXT
|
c 011 9 80 90 130 20 1 SAMPLE TEXT
|
||||||
c 012 8 365 145 130 20 1 SAMPLE TEXT
|
c 012 8 80 120 130 20 1 SAMPLE TEXT
|
||||||
c 013 12 290 70 215 200 1 Size
|
c 013 12 5 45 215 200 1 Size
|
||||||
c 014 0 300 310 20 20 1 Size
|
c 014 0 15 285 20 20 1 Size
|
||||||
c 015 11 340 305 70 20 1
|
c 015 11 55 280 75 20 1 SAMPLE TEXT
|
||||||
c 016 11 425 305 70 20 1
|
c 016 11 140 280 70 20 1 SAMPLE TEXT
|
||||||
c 017 10 300 340 20 20 1 SAMPLE TEXT
|
c 017 10 15 315 20 20 1 SAMPLE TEXT
|
||||||
c 018 10 300 370 20 20 1 SAMPLE TEXT
|
c 018 10 15 345 20 20 1 SAMPLE TEXT
|
||||||
c 019 0 335 345 56 20 1 Force POT
|
c 019 0 50 320 56 20 1 Force POT
|
||||||
c 020 0 335 375 76 20 1 Force squared
|
c 020 0 50 350 76 20 1 Force squared
|
||||||
c 021 0 300 408 61 20 1 Pixel format
|
c 021 0 15 383 61 20 1 Pixel format
|
||||||
c 022 9 375 403 120 20 1 SAMPLE TEXT
|
c 022 9 90 378 120 20 1 SAMPLE TEXT
|
||||||
c 023 10 300 430 20 20 1 SAMPLE TEXT
|
c 023 10 15 405 20 20 1 SAMPLE TEXT
|
||||||
c 024 0 335 435 58 20 1 Clear alpha
|
c 024 0 50 410 58 20 1 Clear alpha
|
||||||
c 025 1 300 460 195 25 1 Export
|
c 025 1 15 435 195 25 1 Export
|
||||||
c 026 12 290 290 215 205 1 Texture
|
c 026 12 5 265 215 205 1 Texture
|
||||||
|
|||||||
@ -50,6 +50,7 @@ typedef enum {
|
|||||||
GROUPBOX,
|
GROUPBOX,
|
||||||
WINDOWBOX,
|
WINDOWBOX,
|
||||||
DUMMYREC,
|
DUMMYREC,
|
||||||
|
DROPDOWNBOX,
|
||||||
STATUSBAR,
|
STATUSBAR,
|
||||||
LISTVIEW,
|
LISTVIEW,
|
||||||
COLORPICKER
|
COLORPICKER
|
||||||
@ -84,9 +85,9 @@ static GuiControl layout[MAX_GUI_CONTROLS] = { 0 };
|
|||||||
static AnchorPoint anchors[MAX_ANCHOR_POINTS];
|
static AnchorPoint anchors[MAX_ANCHOR_POINTS];
|
||||||
static int controlsCounter = 0;
|
static int controlsCounter = 0;
|
||||||
|
|
||||||
const char *controlTypeName[] = { "LABEL", "BUTTON", "IMAGEBUTTON", "TOGGLE", "TOGGLEGROUP", "SLIDER", "SLIDERBAR", "PROGRESSBAR", "SPINNER", "COMBOBOX", "CHECKBOX", "TEXTBOX", "GROUPBOX", "WINDOWBOX", "DUMMYREC", "STATUSBAR", "LISTVIEW", "COLORPICKER" };
|
const char *controlTypeName[] = { "LABEL", "BUTTON", "IMAGEBUTTON", "TOGGLE", "TOGGLEGROUP", "SLIDER", "SLIDERBAR", "PROGRESSBAR", "SPINNER", "COMBOBOX", "CHECKBOX", "TEXTBOX", "GROUPBOX", "WINDOWBOX", "DUMMYREC", "DROPDOWNBOX", "STATUSBAR", "LISTVIEW", "COLORPICKER" };
|
||||||
const char *controlTypeNameLow[] = { "Label", "Button", "ImageButton", "Toggle", "ToggleGroup", "Slider", "SliderBar", "ProgressBar", "Spinner", "ComboBox", "CheckBox", "TextBox", "GroupBox", "WindowBox", "DummyRec", "StatusBar", "ListView", "ColorPicker" };
|
const char *controlTypeNameLow[] = { "Label", "Button", "ImageButton", "Toggle", "ToggleGroup", "Slider", "SliderBar", "ProgressBar", "Spinner", "ComboBox", "CheckBox", "TextBox", "GroupBox", "WindowBox", "DummyRec", "DropdownBox", "StatusBar", "ListView", "ColorPicker" };
|
||||||
const char *controlTypeNameShort[] = { "lbl", "btn", "ibtn", "tggl", "tgroup", "sldr", "sldrb", "prgssb", "spnr", "combox", "chkbox", "txtbox", "grpbox", "wdwbox", "dmyrc", "stsb", "lstvw", "clrpckr" };
|
const char *controlTypeNameShort[] = { "lbl", "btn", "ibtn", "tggl", "tgroup", "sldr", "sldrb", "prgssb", "spnr", "combox", "chkbox", "txtbox", "grpbox", "wdwbox", "dmyrc", "ddwnbox", "stsb", "lstvw", "clrpckr" };
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module specific Functions Declaration
|
// Module specific Functions Declaration
|
||||||
@ -94,7 +95,7 @@ const char *controlTypeNameShort[] = { "lbl", "btn", "ibtn", "tggl", "tgroup", "
|
|||||||
static void DrawGrid2D(int divsX, int divsY); // Draw 2d grid with horizontal and vertical lines depending on the screen size
|
static void DrawGrid2D(int divsX, int divsY); // Draw 2d grid with horizontal and vertical lines depending on the screen size
|
||||||
static void SaveLayoutRGL(const char *fileName, bool binary); // Save gui layout project information
|
static void SaveLayoutRGL(const char *fileName, bool binary); // Save gui layout project information
|
||||||
static void LoadLayoutRGL(const char *fileName); // Load gui layout project information
|
static void LoadLayoutRGL(const char *fileName); // Load gui layout project information
|
||||||
static void GenerateLayoutCode(const char *fileName); // Generate C code for gui layout
|
static void GenerateLayoutCode(const char *fileName , bool noStaticData); // Generate C code for gui layout
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Main Entry point
|
// Main Entry point
|
||||||
@ -139,7 +140,7 @@ int main()
|
|||||||
char **droppedFiles = { 0 };
|
char **droppedFiles = { 0 };
|
||||||
|
|
||||||
// Used to draw the preview of selectedControl
|
// Used to draw the preview of selectedControl
|
||||||
Rectangle defaultRec[18] = {
|
Rectangle defaultRec[19] = {
|
||||||
(Rectangle){ 0, 0, 80, 20}, // LABEL
|
(Rectangle){ 0, 0, 80, 20}, // LABEL
|
||||||
(Rectangle){ 0, 0, 100, 30}, // BUTTON
|
(Rectangle){ 0, 0, 100, 30}, // BUTTON
|
||||||
(Rectangle){ 0, 0, 120, 40}, // IMAGEBUTTON
|
(Rectangle){ 0, 0, 120, 40}, // IMAGEBUTTON
|
||||||
@ -155,6 +156,7 @@ int main()
|
|||||||
(Rectangle){ 0, 0, 120, 40}, // GROUPBOX
|
(Rectangle){ 0, 0, 120, 40}, // GROUPBOX
|
||||||
(Rectangle){ 0, 0, 120, 48}, // WINDOWBOX
|
(Rectangle){ 0, 0, 120, 48}, // WINDOWBOX
|
||||||
(Rectangle){ 0, 0, 100, 100}, // DUMMYREC
|
(Rectangle){ 0, 0, 100, 100}, // DUMMYREC
|
||||||
|
(Rectangle){ 0, 0, 120, 20}, // DROPDOWNBOX
|
||||||
(Rectangle){ 0, 0, 200, 30}, // STATUSBAR
|
(Rectangle){ 0, 0, 200, 30}, // STATUSBAR
|
||||||
(Rectangle){ 0, 0, 120, 250}, // LISTVIEW
|
(Rectangle){ 0, 0, 120, 250}, // LISTVIEW
|
||||||
(Rectangle){ 0, 0, 120, 120} // COLORPICKER
|
(Rectangle){ 0, 0, 120, 120} // COLORPICKER
|
||||||
@ -172,7 +174,7 @@ int main()
|
|||||||
const char *list[3] = { "ONE", "TWO", "THREE" };
|
const char *list[3] = { "ONE", "TWO", "THREE" };
|
||||||
|
|
||||||
|
|
||||||
const char *guiControls[18] = {
|
const char *guiControls[19] = {
|
||||||
"LABEL",
|
"LABEL",
|
||||||
"BUTTON",
|
"BUTTON",
|
||||||
"IMAGEBUTTON",
|
"IMAGEBUTTON",
|
||||||
@ -188,6 +190,7 @@ int main()
|
|||||||
"GROUPBOX",
|
"GROUPBOX",
|
||||||
"WINDOWBOX",
|
"WINDOWBOX",
|
||||||
"DUMMYREC",
|
"DUMMYREC",
|
||||||
|
"DROPDOWNBOX",
|
||||||
"STATUSBAR",
|
"STATUSBAR",
|
||||||
"LISTVIEW",
|
"LISTVIEW",
|
||||||
"COLORPICKER"
|
"COLORPICKER"
|
||||||
@ -711,7 +714,6 @@ int main()
|
|||||||
controlDrag = false;
|
controlDrag = false;
|
||||||
selectedAnchor = -1;
|
selectedAnchor = -1;
|
||||||
anchorMode = false;
|
anchorMode = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Moves the anchor to the mouse position
|
// Moves the anchor to the mouse position
|
||||||
@ -751,7 +753,6 @@ int main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Enable anchor mode editing
|
// Enable anchor mode editing
|
||||||
if (IsKeyDown(KEY_A) && !textEditMode && (layout[selectedControl].type != TEXTBOX)) anchorMode = true;
|
if (IsKeyDown(KEY_A) && !textEditMode && (layout[selectedControl].type != TEXTBOX)) anchorMode = true;
|
||||||
|
|
||||||
@ -827,6 +828,8 @@ int main()
|
|||||||
layout[controlsCounter].id = controlsCounter;
|
layout[controlsCounter].id = controlsCounter;
|
||||||
layout[controlsCounter].type = layout[selectedControl].type;
|
layout[controlsCounter].type = layout[selectedControl].type;
|
||||||
layout[controlsCounter].rec = layout[selectedControl].rec;
|
layout[controlsCounter].rec = layout[selectedControl].rec;
|
||||||
|
layout[controlsCounter].rec.x += 5;
|
||||||
|
layout[controlsCounter].rec.y += 5;
|
||||||
strcpy(layout[controlsCounter].text, layout[selectedControl].text);
|
strcpy(layout[controlsCounter].text, layout[selectedControl].text);
|
||||||
layout[controlsCounter].ap = layout[selectedControl].ap; // Default anchor point (0, 0)
|
layout[controlsCounter].ap = layout[selectedControl].ap; // Default anchor point (0, 0)
|
||||||
|
|
||||||
@ -859,7 +862,7 @@ int main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsKeyDown(KEY_LEFT_CONTROL) && IsKeyPressed(KEY_ENTER)) GenerateLayoutCode("test_layout.c");
|
if (IsKeyDown(KEY_LEFT_CONTROL) && IsKeyPressed(KEY_ENTER)) GenerateLayoutCode("test_layout.c", true);
|
||||||
|
|
||||||
// Tracemap texture control logic
|
// Tracemap texture control logic
|
||||||
if (tracemap.id > 0)
|
if (tracemap.id > 0)
|
||||||
@ -960,6 +963,7 @@ int main()
|
|||||||
case GROUPBOX: GuiGroupBox((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, layout[i].text); break;
|
case GROUPBOX: GuiGroupBox((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, layout[i].text); break;
|
||||||
case WINDOWBOX: GuiWindowBox((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, layout[i].text); break;
|
case WINDOWBOX: GuiWindowBox((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, layout[i].text); break;
|
||||||
case DUMMYREC: GuiDummyRec((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, layout[i].text); break;
|
case DUMMYREC: GuiDummyRec((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, layout[i].text); break;
|
||||||
|
case DROPDOWNBOX: GuiDropdownBox((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, list, 3, 2); break;
|
||||||
case STATUSBAR: GuiStatusBar((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, layout[i].text, 15); break;
|
case STATUSBAR: GuiStatusBar((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, layout[i].text, 15); break;
|
||||||
case LISTVIEW: GuiListView((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, guiControls, 14, 1); break;
|
case LISTVIEW: GuiListView((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, guiControls, 14, 1); break;
|
||||||
case COLORPICKER: GuiColorPicker((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, RED); break;
|
case COLORPICKER: GuiColorPicker((Rectangle){ layout[i].ap->x + layout[i].rec.x, layout[i].ap->y + layout[i].rec.y, layout[i].rec.width, layout[i].rec.height }, RED); break;
|
||||||
@ -993,6 +997,7 @@ int main()
|
|||||||
case GROUPBOX: GuiGroupBox(defaultRec[selectedTypeDraw], "GROUP BOX"); break;
|
case GROUPBOX: GuiGroupBox(defaultRec[selectedTypeDraw], "GROUP BOX"); break;
|
||||||
case WINDOWBOX: GuiWindowBox(defaultRec[selectedTypeDraw], "WINDOW BOX"); break;
|
case WINDOWBOX: GuiWindowBox(defaultRec[selectedTypeDraw], "WINDOW BOX"); break;
|
||||||
case DUMMYREC: GuiDummyRec(defaultRec[selectedTypeDraw], "DUMMY REC"); break;
|
case DUMMYREC: GuiDummyRec(defaultRec[selectedTypeDraw], "DUMMY REC"); break;
|
||||||
|
case DROPDOWNBOX: GuiDropdownBox(defaultRec[selectedTypeDraw], list, 3, 2); break;
|
||||||
case STATUSBAR: GuiStatusBar(defaultRec[selectedTypeDraw], "STATUS BAR", 15); break;
|
case STATUSBAR: GuiStatusBar(defaultRec[selectedTypeDraw], "STATUS BAR", 15); break;
|
||||||
case LISTVIEW: GuiListView(defaultRec[selectedTypeDraw], guiControls, 14, 1); break;
|
case LISTVIEW: GuiListView(defaultRec[selectedTypeDraw], guiControls, 14, 1); break;
|
||||||
case COLORPICKER: GuiColorPicker(defaultRec[selectedTypeDraw], RED); break;
|
case COLORPICKER: GuiColorPicker(defaultRec[selectedTypeDraw], RED); break;
|
||||||
@ -1023,36 +1028,36 @@ int main()
|
|||||||
{
|
{
|
||||||
// Draw the anchor that is currently moving
|
// Draw the anchor that is currently moving
|
||||||
DrawCircle(anchors[i].x, anchors[i].y, ANCHOR_RADIUS, Fade(ORANGE, 0.5f));
|
DrawCircle(anchors[i].x, anchors[i].y, ANCHOR_RADIUS, Fade(ORANGE, 0.5f));
|
||||||
DrawRectangle(anchors[i].x - ANCHOR_RADIUS - 5, anchors[i].y, ANCHOR_RADIUS*2 + 10, 1, ORANGE);
|
DrawRectangle(anchors[i].x - ANCHOR_RADIUS - 5, anchors[i].y - 1, ANCHOR_RADIUS*2 + 10, 1, ORANGE);
|
||||||
DrawRectangle(anchors[i].x, anchors[i].y - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, ORANGE);
|
DrawRectangle(anchors[i].x - 1, anchors[i].y - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, ORANGE);
|
||||||
}
|
}
|
||||||
else if (anchors[i].hidding && anchors[i].id == selectedAnchor)
|
else if (anchors[i].hidding && anchors[i].id == selectedAnchor)
|
||||||
{
|
{
|
||||||
// Draw idle anchor
|
// Draw idle anchor
|
||||||
DrawCircle(anchors[i].x, anchors[i].y, ANCHOR_RADIUS, Fade(BLUE, 0.5f));
|
DrawCircle(anchors[i].x, anchors[i].y, ANCHOR_RADIUS, Fade(BLUE, 0.5f));
|
||||||
DrawRectangle(anchors[i].x - ANCHOR_RADIUS - 5, anchors[i].y, ANCHOR_RADIUS*2 + 10, 1, BLUE);
|
DrawRectangle(anchors[i].x - ANCHOR_RADIUS - 5, anchors[i].y - 1, ANCHOR_RADIUS*2 + 10, 1, BLUE);
|
||||||
DrawRectangle(anchors[i].x, anchors[i].y - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, BLUE);
|
DrawRectangle(anchors[i].x - 1, anchors[i].y - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, BLUE);
|
||||||
}
|
}
|
||||||
else if (anchors[i].id == selectedAnchor)
|
else if (anchors[i].id == selectedAnchor)
|
||||||
{
|
{
|
||||||
// Draw the selected anchor
|
// Draw the selected anchor
|
||||||
DrawCircle(anchors[i].x, anchors[i].y, ANCHOR_RADIUS, Fade(RED, 0.5f));
|
DrawCircle(anchors[i].x, anchors[i].y, ANCHOR_RADIUS, Fade(RED, 0.5f));
|
||||||
DrawRectangle(anchors[i].x - ANCHOR_RADIUS - 5, anchors[i].y, ANCHOR_RADIUS*2 + 10, 1, RED);
|
DrawRectangle(anchors[i].x - ANCHOR_RADIUS - 5, anchors[i].y - 1, ANCHOR_RADIUS*2 + 10, 1, RED);
|
||||||
DrawRectangle(anchors[i].x, anchors[i].y - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, RED);
|
DrawRectangle(anchors[i].x - 1, anchors[i].y - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, RED);
|
||||||
}
|
}
|
||||||
else if (anchors[i].hidding)
|
else if (anchors[i].hidding)
|
||||||
{
|
{
|
||||||
// Draw idle anchor
|
// Draw idle anchor
|
||||||
DrawCircleLines(anchors[i].x, anchors[i].y, ANCHOR_RADIUS, Fade(BLUE, 0.5f));
|
DrawCircleLines(anchors[i].x, anchors[i].y, ANCHOR_RADIUS, Fade(BLUE, 0.5f));
|
||||||
DrawRectangle(anchors[i].x - ANCHOR_RADIUS - 5, anchors[i].y, ANCHOR_RADIUS*2 + 10, 1, BLUE);
|
DrawRectangle(anchors[i].x - ANCHOR_RADIUS - 5, anchors[i].y - 1, ANCHOR_RADIUS*2 + 10, 1, BLUE);
|
||||||
DrawRectangle(anchors[i].x, anchors[i].y - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, BLUE);
|
DrawRectangle(anchors[i].x - 1, anchors[i].y - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, BLUE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Draw idle anchor
|
// Draw idle anchor
|
||||||
DrawCircleLines(anchors[i].x, anchors[i].y, ANCHOR_RADIUS, Fade(RED, 0.5f));
|
DrawCircleLines(anchors[i].x, anchors[i].y, ANCHOR_RADIUS, Fade(RED, 0.5f));
|
||||||
DrawRectangle(anchors[i].x - ANCHOR_RADIUS - 5, anchors[i].y, ANCHOR_RADIUS*2 + 10, 1, RED);
|
DrawRectangle(anchors[i].x - ANCHOR_RADIUS - 5, anchors[i].y - 1, ANCHOR_RADIUS*2 + 10, 1, RED);
|
||||||
DrawRectangle(anchors[i].x, anchors[i].y - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, RED);
|
DrawRectangle(anchors[i].x - 1, anchors[i].y - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, RED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1068,8 +1073,8 @@ int main()
|
|||||||
if (anchorMode)
|
if (anchorMode)
|
||||||
{
|
{
|
||||||
DrawCircleLines(mouseX, mouseY, ANCHOR_RADIUS, Fade(RED, 0.5f));
|
DrawCircleLines(mouseX, mouseY, ANCHOR_RADIUS, Fade(RED, 0.5f));
|
||||||
DrawRectangle(mouseX - ANCHOR_RADIUS - 5, mouseY, ANCHOR_RADIUS*2 + 10, 1, RED);
|
DrawRectangle(mouseX - ANCHOR_RADIUS - 5, mouseY - 1, ANCHOR_RADIUS*2 + 10, 1, RED);
|
||||||
DrawRectangle(mouseX, mouseY - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, RED);
|
DrawRectangle(mouseX - 1 , mouseY - ANCHOR_RADIUS - 5, 1, ANCHOR_RADIUS*2 + 10, RED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1352,7 +1357,7 @@ static void LoadLayoutRGL(const char *fileName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate C code for gui layout
|
// Generate C code for gui layout
|
||||||
static void GenerateLayoutCode(const char *fileName)
|
static void GenerateLayoutCode(const char *fileName , bool noStaticData)
|
||||||
{
|
{
|
||||||
#define RGL_TOOL_NAME "rGuiLayout"
|
#define RGL_TOOL_NAME "rGuiLayout"
|
||||||
#define RGL_TOOL_DESCRIPTION "tool_name"
|
#define RGL_TOOL_DESCRIPTION "tool_name"
|
||||||
@ -1430,6 +1435,7 @@ static void GenerateLayoutCode(const char *fileName)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DROPDOWNBOX:
|
||||||
case COMBOBOX:
|
case COMBOBOX:
|
||||||
case LISTVIEW:
|
case LISTVIEW:
|
||||||
case TOGGLEGROUP:
|
case TOGGLEGROUP:
|
||||||
@ -1483,6 +1489,8 @@ static void GenerateLayoutCode(const char *fileName)
|
|||||||
|
|
||||||
fprintf(ftool, "\n");
|
fprintf(ftool, "\n");
|
||||||
|
|
||||||
|
if (!noStaticData)
|
||||||
|
{
|
||||||
// Define controls rectangles
|
// Define controls rectangles
|
||||||
fprintf(ftool, " // Define controls rectangles\n");
|
fprintf(ftool, " // Define controls rectangles\n");
|
||||||
fprintf(ftool, " Rectangle layoutRecs[%i] = {\n", controlsCounter);
|
fprintf(ftool, " Rectangle layoutRecs[%i] = {\n", controlsCounter);
|
||||||
@ -1494,6 +1502,7 @@ static void GenerateLayoutCode(const char *fileName)
|
|||||||
if (i == controlsCounter - 1) fprintf(ftool, "\t\t// %s %03i\n };\n\n", controlTypeName[layout[i].type], i);
|
if (i == controlsCounter - 1) fprintf(ftool, "\t\t// %s %03i\n };\n\n", controlTypeName[layout[i].type], i);
|
||||||
else fprintf(ftool, ",\t\t// %s %03i\n", controlTypeName[layout[i].type], i);
|
else fprintf(ftool, ",\t\t// %s %03i\n", controlTypeName[layout[i].type], i);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fprintf(ftool, " SetTargetFPS(60);\n");
|
fprintf(ftool, " SetTargetFPS(60);\n");
|
||||||
fprintf(ftool, " //--------------------------------------------------------------------------------------\n\n");
|
fprintf(ftool, " //--------------------------------------------------------------------------------------\n\n");
|
||||||
@ -1512,6 +1521,38 @@ static void GenerateLayoutCode(const char *fileName)
|
|||||||
fprintf(ftool, "\t\t\t// Draw all controls\n");
|
fprintf(ftool, "\t\t\t// Draw all controls\n");
|
||||||
|
|
||||||
// Draw all controls
|
// Draw all controls
|
||||||
|
if (noStaticData)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < controlsCounter; i++)
|
||||||
|
{
|
||||||
|
switch (layout[i].type)
|
||||||
|
{
|
||||||
|
case LABEL: fprintf(ftool, "\t\t\tGuiLabel((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, \"%s\");\n\n", "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, layout[i].text); break;
|
||||||
|
case BUTTON: fprintf(ftool, "\t\t\tif (GuiButton((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, \"%s\")) Button%03i(); \n\n", "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, layout[i].text, i); break;
|
||||||
|
case IMAGEBUTTON: fprintf(ftool, "\t\t\tif (GuiImageButtonEx((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, texture, (Rectangle){ 0, 0, texture.width/3, texture.height/6 }, \"%s\")) ImageButton%03i(); \n\n", "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, layout[i].text, i); break;
|
||||||
|
case TOGGLE: fprintf(ftool, "\t\t\t%s%03i = GuiToggleButton((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, \"%s\", %s%03i); \n\n", controlTypeNameShort[layout[i].type], i, "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, layout[i].text, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
case TOGGLEGROUP: fprintf(ftool, "\t\t\t%sActive%03i = GuiToggleGroup((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, %sList%03i, %sCount%03i, %sActive%03i); \n\n", controlTypeNameShort[layout[i].type], i, "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
case SLIDER: fprintf(ftool, "\t\t\t%sValue%03i = GuiSlider((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, %sValue%03i, %sMinValue%03i, %sMaxValue%03i);\n\n", controlTypeNameShort[layout[i].type], i, "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
case SLIDERBAR: fprintf(ftool, "\t\t\t%sValue%03i = GuiSliderBar((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, %sValue%03i, %sMinValue%03i, %sMaxValue%03i);\n\n", controlTypeNameShort[layout[i].type], i, "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
case PROGRESSBAR: fprintf(ftool, "\t\t\t%sValue%03i = GuiProgressBar((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, %sValue%03i, %sMinValue%03i, %sMaxValue%03i);\n\n", controlTypeNameShort[layout[i].type], i, "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
case SPINNER: fprintf(ftool, "\t\t\t%sValue%03i = GuiSpinner((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, %sValue%03i, %sMinValue%03i, %sMaxValue%03i);\n\n", controlTypeNameShort[layout[i].type], i, "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
case COMBOBOX: fprintf(ftool, "\t\t\t%sActive%03i = GuiComboBox((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, %sList%03i, %sCount%03i, %sActive%03i); \n\n", controlTypeNameShort[layout[i].type], i, "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
case CHECKBOX: fprintf(ftool, "\t\t\t%s%03i = GuiCheckBox((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, %s%03i); \n\n", controlTypeNameShort[layout[i].type], i, "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
case LISTVIEW: fprintf(ftool, "\t\t\t%sActive%03i = GuiListView((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, %sList%03i, %sCount%03i, %sActive%03i); \n\n", controlTypeNameShort[layout[i].type], i, "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
case TEXTBOX: fprintf(ftool, "\t\t\tGuiTextBox((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, %s%03i, %sSize%03i);\n\n", "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
case GROUPBOX: fprintf(ftool, "\t\t\tGuiGroupBox((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, \"%s\");\n\n", "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, layout[i].text); break;
|
||||||
|
case WINDOWBOX: fprintf(ftool, "\t\t\tGuiWindowBox((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, \"%s\");\n\n", "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, layout[i].text); break;
|
||||||
|
case DUMMYREC: fprintf(ftool, "\t\t\tGuiDummyRec((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, \"%s\");\n\n", "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, layout[i].text); break;
|
||||||
|
case DROPDOWNBOX: fprintf(ftool, "\t\t\t%sActive%03i = GuiDropdownBox((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, %sList%03i, %sCount%03i, %sActive%03i); \n\n", controlTypeNameShort[layout[i].type], i, "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
case STATUSBAR: fprintf(ftool, "\t\t\tGuiStatusBar((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, \"%s\", 10);\n\n", "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, layout[i].text); break;
|
||||||
|
case COLORPICKER: fprintf(ftool, "\t\t\t%sColor%03i = GuiColorPicker((Rectangle){ %s%02i%s + %i, %s%02i%s + %i, %i, %i }, %sColor%03i);\n\n", controlTypeNameShort[layout[i].type], i, "anchor", layout[i].ap->id, ".x", layout[i].rec.x, "anchor", layout[i].ap->id, ".y", layout[i].rec.y, layout[i].rec.width, layout[i].rec.height, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
for (int i = 0; i < controlsCounter; i++)
|
for (int i = 0; i < controlsCounter; i++)
|
||||||
{
|
{
|
||||||
switch (layout[i].type)
|
switch (layout[i].type)
|
||||||
@ -1532,12 +1573,16 @@ static void GenerateLayoutCode(const char *fileName)
|
|||||||
case GROUPBOX: fprintf(ftool, "\t\t\tGuiGroupBox(layoutRecs[%i], \"%s\");\n\n", i, layout[i].text); break;
|
case GROUPBOX: fprintf(ftool, "\t\t\tGuiGroupBox(layoutRecs[%i], \"%s\");\n\n", i, layout[i].text); break;
|
||||||
case WINDOWBOX: fprintf(ftool, "\t\t\tGuiWindowBox(layoutRecs[%i], \"%s\");\n\n", i, layout[i].text); break;
|
case WINDOWBOX: fprintf(ftool, "\t\t\tGuiWindowBox(layoutRecs[%i], \"%s\");\n\n", i, layout[i].text); break;
|
||||||
case DUMMYREC: fprintf(ftool, "\t\t\tGuiDummyRec(layoutRecs[%i], \"%s\");\n\n", i, layout[i].text); break;
|
case DUMMYREC: fprintf(ftool, "\t\t\tGuiDummyRec(layoutRecs[%i], \"%s\");\n\n", i, layout[i].text); break;
|
||||||
|
case DROPDOWNBOX: fprintf(ftool, "\t\t\t%sActive%03i = GuiDropdownBox(layoutRecs[%i], %sList%03i, %sCount%03i, %sActive%03i); \n\n", controlTypeNameShort[layout[i].type], i, i, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i, controlTypeNameShort[layout[i].type], i); break;
|
||||||
case STATUSBAR: fprintf(ftool, "\t\t\tGuiStatusBar(layoutRecs[%i], \"%s\", 10);\n\n", i, layout[i].text); break;
|
case STATUSBAR: fprintf(ftool, "\t\t\tGuiStatusBar(layoutRecs[%i], \"%s\", 10);\n\n", i, layout[i].text); break;
|
||||||
case COLORPICKER: fprintf(ftool, "\t\t\t%sColor%03i = GuiColorPicker(layoutRecs[%i], %sColor%03i);\n\n", controlTypeNameShort[layout[i].type], i, i, controlTypeNameShort[layout[i].type], i); break;
|
case COLORPICKER: fprintf(ftool, "\t\t\t%sColor%03i = GuiColorPicker(layoutRecs[%i], %sColor%03i);\n\n", controlTypeNameShort[layout[i].type], i, i, controlTypeNameShort[layout[i].type], i); break;
|
||||||
|
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fprintf(ftool, " EndDrawing();\n");
|
fprintf(ftool, " EndDrawing();\n");
|
||||||
fprintf(ftool, " //----------------------------------------------------------------------------------\n");
|
fprintf(ftool, " //----------------------------------------------------------------------------------\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user