123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423 |
- #ifndef UI_LAYOUT_H_GUARD_
- #define UI_LAYOUT_H_GUARD_
- #include "raylib.h"
- typedef struct UILayout
- {
- char * layoutname;
- int screenWidth;
- int screenHeight;
- int textureW;
- int textureH;
- unsigned shortnamelen;
- /* Common elements */
- Rectangle statusbar;
- Rectangle line;
- Rectangle helphint;
- Rectangle helppanel;
- /* Ready screen */
- Rectangle dragndropprompt;
- Rectangle dragndropbox;
- Rectangle buttonLaunch;
- Rectangle buttonReset;
- /* Options */
- Rectangle optiongroup;
- Rectangle optionrecursive;
- Rectangle optiondhash256;
- Rectangle optionbiggerbetter;
- Rectangle optionthreshold;
- Rectangle optionresolution;
- Rectangle optionapply;
- Rectangle optionthreads;
- /* Sorting screen */
- Rectangle leftImage;
- Rectangle rightImage;
- Rectangle leftTopMeta;
- Rectangle rightTopMeta;
- Rectangle leftBottomMeta;
- Rectangle rightBottomMeta;
- Rectangle statsGroupSize;
- Rectangle statsGroupCount;
- Rectangle statsTotalDupes;
- Rectangle imagepaths;
- Rectangle buttonNext;
- Rectangle buttonDelLeft;
- Rectangle buttonDelRight;
- Rectangle buttonDelBoth;
- Rectangle buttonStopSorting;
- Rectangle compareRes;
- Rectangle compareResLeft;
- Rectangle compareResRight;
- Rectangle compareFsize;
- Rectangle compareFsizeLeft;
- Rectangle compareFsizeRight;
- Rectangle compareFtype;
- /* Processing screen */
- Rectangle progressbar;
- Rectangle progreessdesc;
- Rectangle buttonPause;
- } UILayout;
- const UILayout Ui720p =
- {
- #define L_W 1280
- #define L_H 720
- #define L_PICW 500
- #define L_PICH 500
- #define L_PROGRESS_HEIGHT 40
- #define L_STATUS_HEIGHT 25
- #define L_HELP_CORNER 10
- #define L_HELP_W 500
- #define L_HELP_H 310
- /* Meta */
- .layoutname = "1280x720",
- .screenWidth = L_W,
- .screenHeight = L_H,
- .textureW = L_PICW,
- .textureH = L_PICH,
- .shortnamelen = 100,
- /* Common elements */
- .statusbar = { 0, L_H - L_STATUS_HEIGHT, L_W, L_STATUS_HEIGHT },
- .line = { 0, 125, L_W, 10 },
- .helphint = { L_W - 95, 50, 57, 39 },
- .helppanel = { L_HELP_CORNER, L_H - L_HELP_H - L_HELP_CORNER - L_STATUS_HEIGHT, L_HELP_W, L_HELP_H },
- /* Ready screen */
- .dragndropprompt = { 10, 140, L_W - 20, 25 },
- .dragndropbox = { 30, 170, L_W - 54, L_H - 215 },
- .buttonLaunch = { L_W - 495, 35, 180, 80 },
- .buttonReset = { L_W - 300, 35, 180, 80 },
- /* Options */
- .optiongroup = { 10, 35, 600, 85 },
- .optionrecursive = { 20, 45, 15, 15 },
- .optiondhash256 = { 20, 70, 15, 15 },
- .optionbiggerbetter = { 20, 95, 15, 15 },
- .optionthreshold = { 200, 45, 400, 25 },
- .optionresolution = { 390, 85, 150, 25 },
- .optionapply = { 545, 85, 55, 25 },
- .optionthreads = { 260, 85, 125, 25 },
- /* Sorting screen: images */
- .leftImage = { 25, 160, L_PICW, L_PICH },
- .rightImage = { L_PICW + 255, 160, L_PICW, L_PICH },
- .leftTopMeta = { 25, 135, L_PICW, 25 },
- .rightTopMeta = { L_PICW + 255, 135, L_PICW, 25 },
- .leftBottomMeta = { 25, L_PICH + 160, L_PICW, 25 },
- .rightBottomMeta = { L_PICW + 255, L_PICH + 160, L_PICW, 25 },
- /* Sorting screen: stats */
- .statsGroupSize = { 20, 30, 180, 25 },
- .statsGroupCount = { 20, 60, 180, 25 },
- .statsTotalDupes = { 20, 90, 180, 25 },
- .imagepaths = { 215, 30, 750, 85 },
- /* Sorting screen: buttons */
- .buttonNext = { L_PICW + 30, 310, 220, 50 },
- .buttonDelLeft = { L_PICW + 30, 375, 90, 50 },
- .buttonDelRight = { L_PICW + 160, 375, 90, 50 },
- .buttonDelBoth = { L_PICW + 30, 440, 220, 50 },
- .buttonStopSorting = { L_W - 300, 35, 180, 80 },
- /* Sorting screen: comparing */
- .compareRes = { L_PICW + 30, 160, 220, 20 },
- .compareResLeft = { L_PICW + 30, 160, 20, 20 },
- .compareResRight = { L_PICW + 230, 160, 20, 20 },
- .compareFsize = { L_PICW + 30, 190, 220, 20 },
- .compareFsizeLeft = { L_PICW + 30, 190, 20, 20 },
- .compareFsizeRight = { L_PICW + 230, 190, 20, 20 },
- .compareFtype = { L_PICW + 32, 220, 216, 20 },
- /* Progress */
- .progressbar = { 0, L_H - L_PROGRESS_HEIGHT - L_STATUS_HEIGHT + 1, L_W, L_PROGRESS_HEIGHT },
- .progreessdesc = { 0, L_H / 2, L_W, 50 },
- .buttonPause = { L_W / 2 - 100, 35, 200, 80 },
- #undef L_W
- #undef L_H
- #undef L_PICW
- #undef L_PICH
- #undef L_PROGRESS_HEIGHT
- #undef L_STATUS_HEIGHT
- #undef L_HELP_CORNER
- #undef L_HELP_W
- #undef L_HELP_H
- };
- const UILayout Ui900p =
- {
- #define L_W 1600
- #define L_H 900
- #define L_PICW 663
- #define L_PICH 680
- #define L_PROGRESS_HEIGHT 40
- #define L_STATUS_HEIGHT 25
- #define L_HELP_CORNER 10
- #define L_HELP_W 500
- #define L_HELP_H 310
- /* Meta */
- .layoutname = "1600x900",
- .screenWidth = L_W,
- .screenHeight = L_H,
- .textureW = L_PICW,
- .textureH = L_PICH,
- .shortnamelen = 100,
- /* Common elements */
- .statusbar = { 0, L_H - L_STATUS_HEIGHT, L_W, L_STATUS_HEIGHT },
- .line = { 0, 125, L_W, 10 },
- .helphint = { L_W - 95, 50, 57, 39 },
- .helppanel = { L_HELP_CORNER, L_H - L_HELP_H - L_HELP_CORNER - L_STATUS_HEIGHT, L_HELP_W, L_HELP_H },
- /* Ready screen */
- .dragndropprompt = { 10, 140, L_W - 20, 25 },
- .dragndropbox = { 30, 170, L_W - 54, L_H - 215 },
- .buttonLaunch = { L_W - 495, 35, 180, 80 },
- .buttonReset = { L_W - 300, 35, 180, 80 },
- /* Options */
- .optiongroup = { 10, 35, 600, 85 },
- .optionrecursive = { 20, 45, 15, 15 },
- .optiondhash256 = { 20, 70, 15, 15 },
- .optionbiggerbetter = { 20, 95, 15, 15 },
- .optionthreshold = { 200, 45, 400, 25 },
- .optionresolution = { 390, 85, 150, 25 },
- .optionapply = { 545, 85, 55, 25 },
- .optionthreads = { 260, 85, 125, 25 },
- /* Sorting screen: images */
- .leftImage = { 25, 160, L_PICW, L_PICH },
- .rightImage = { L_PICW + 255, 160, L_PICW, L_PICH },
- .leftTopMeta = { 25, 135, L_PICW, 25 },
- .rightTopMeta = { L_PICW + 255, 135, L_PICW, 25 },
- .leftBottomMeta = { 25, L_PICH + 160, L_PICW, 25 },
- .rightBottomMeta = { L_PICW + 255, L_PICH + 160, L_PICW, 25 },
- /* Sorting screen: stats */
- .statsGroupSize = { 20, 30, 180, 25 },
- .statsGroupCount = { 20, 60, 180, 25 },
- .statsTotalDupes = { 20, 90, 180, 25 },
- .imagepaths = { 215, 30, 750, 85 },
- /* Sorting screen: buttons */
- .buttonNext = { L_PICW + 30, 310, 220, 50 },
- .buttonDelLeft = { L_PICW + 30, 375, 90, 50 },
- .buttonDelRight = { L_PICW + 160, 375, 90, 50 },
- .buttonDelBoth = { L_PICW + 30, 440, 220, 50 },
- .buttonStopSorting = { L_W - 300, 35, 180, 80 },
- /* Sorting screen: comparing */
- .compareRes = { L_PICW + 30, 160, 220, 20 },
- .compareResLeft = { L_PICW + 30, 160, 20, 20 },
- .compareResRight = { L_PICW + 230, 160, 20, 20 },
- .compareFsize = { L_PICW + 30, 190, 220, 20 },
- .compareFsizeLeft = { L_PICW + 30, 190, 20, 20 },
- .compareFsizeRight = { L_PICW + 230, 190, 20, 20 },
- .compareFtype = { L_PICW + 32, 220, 216, 20 },
- /* Progress */
- .progressbar = { 0, L_H - L_PROGRESS_HEIGHT - L_STATUS_HEIGHT + 1, L_W, L_PROGRESS_HEIGHT },
- .progreessdesc = { 0, L_H / 2, L_W, 50 },
- .buttonPause = { L_W / 2 - 100, 35, 200, 80 },
- #undef L_W
- #undef L_H
- #undef L_PICW
- #undef L_PICH
- #undef L_PROGRESS_HEIGHT
- #undef L_STATUS_HEIGHT
- #undef L_HELP_CORNER
- #undef L_HELP_W
- #undef L_HELP_H
- };
- const UILayout Ui1000p =
- {
- #define L_W 1900
- #define L_H 1000
- #define L_PICW 808
- #define L_PICH 780
- #define L_PROGRESS_HEIGHT 40
- #define L_STATUS_HEIGHT 25
- #define L_HELP_CORNER 10
- #define L_HELP_W 500
- #define L_HELP_H 310
- /* Meta */
- .layoutname = "1900x1000",
- .screenWidth = L_W,
- .screenHeight = L_H,
- .textureW = L_PICW,
- .textureH = L_PICH,
- .shortnamelen = 100,
- /* Common elements */
- .statusbar = { 0, L_H - L_STATUS_HEIGHT, L_W, L_STATUS_HEIGHT },
- .line = { 0, 125, L_W, 10 },
- .helphint = { L_W - 95, 50, 57, 39 },
- .helppanel = { L_HELP_CORNER, L_H - L_HELP_H - L_HELP_CORNER - L_STATUS_HEIGHT, L_HELP_W, L_HELP_H },
- /* Ready screen */
- .dragndropprompt = { 10, 140, L_W - 20, 25 },
- .dragndropbox = { 30, 170, L_W - 54, L_H - 215 },
- .buttonLaunch = { L_W - 495, 35, 180, 80 },
- .buttonReset = { L_W - 300, 35, 180, 80 },
- /* Options */
- .optiongroup = { 10, 35, 600, 85 },
- .optionrecursive = { 20, 45, 15, 15 },
- .optiondhash256 = { 20, 70, 15, 15 },
- .optionbiggerbetter = { 20, 95, 15, 15 },
- .optionthreshold = { 200, 45, 400, 25 },
- .optionresolution = { 390, 85, 150, 25 },
- .optionapply = { 545, 85, 55, 25 },
- .optionthreads = { 260, 85, 125, 25 },
- /* Sorting screen: images */
- .leftImage = { 25, 160, L_PICW, L_PICH },
- .rightImage = { L_PICW + 255, 160, L_PICW, L_PICH },
- .leftTopMeta = { 25, 135, L_PICW, 25 },
- .rightTopMeta = { L_PICW + 255, 135, L_PICW, 25 },
- .leftBottomMeta = { 25, L_PICH + 160, L_PICW, 25 },
- .rightBottomMeta = { L_PICW + 255, L_PICH + 160, L_PICW, 25 },
- /* Sorting screen: stats */
- .statsGroupSize = { 20, 30, 180, 25 },
- .statsGroupCount = { 20, 60, 180, 25 },
- .statsTotalDupes = { 20, 90, 180, 25 },
- .imagepaths = { 215, 30, 750, 85 },
- /* Sorting screen: buttons */
- .buttonNext = { L_PICW + 30, 310, 220, 50 },
- .buttonDelLeft = { L_PICW + 30, 375, 90, 50 },
- .buttonDelRight = { L_PICW + 160, 375, 90, 50 },
- .buttonDelBoth = { L_PICW + 30, 440, 220, 50 },
- .buttonStopSorting = { L_W - 300, 35, 180, 80 },
- /* Sorting screen: comparing */
- .compareRes = { L_PICW + 30, 160, 220, 20 },
- .compareResLeft = { L_PICW + 30, 160, 20, 20 },
- .compareResRight = { L_PICW + 230, 160, 20, 20 },
- .compareFsize = { L_PICW + 30, 190, 220, 20 },
- .compareFsizeLeft = { L_PICW + 30, 190, 20, 20 },
- .compareFsizeRight = { L_PICW + 230, 190, 20, 20 },
- .compareFtype = { L_PICW + 32, 220, 216, 20 },
- /* Progress */
- .progressbar = { 0, L_H - L_PROGRESS_HEIGHT - L_STATUS_HEIGHT + 1, L_W, L_PROGRESS_HEIGHT },
- .progreessdesc = { 0, L_H / 2, L_W, 50 },
- .buttonPause = { L_W / 2 - 100, 35, 200, 80 },
- #undef L_W
- #undef L_H
- #undef L_PICW
- #undef L_PICH
- #undef L_PROGRESS_HEIGHT
- #undef L_STATUS_HEIGHT
- #undef L_HELP_CORNER
- #undef L_HELP_W
- #undef L_HELP_H
- };
- const UILayout Ui1000w =
- {
- #define L_W 2500
- #define L_H 1000
- #define L_PICW 1110
- #define L_PICH 780
- #define L_PROGRESS_HEIGHT 40
- #define L_STATUS_HEIGHT 25
- #define L_HELP_CORNER 10
- #define L_HELP_W 500
- #define L_HELP_H 310
- /* Meta */
- .layoutname = "2500x1000",
- .screenWidth = L_W,
- .screenHeight = L_H,
- .textureW = L_PICW,
- .textureH = L_PICH,
- .shortnamelen = 100,
- /* Common elements */
- .statusbar = { 0, L_H - L_STATUS_HEIGHT, L_W, L_STATUS_HEIGHT },
- .line = { 0, 125, L_W, 10 },
- .helphint = { L_W - 95, 50, 57, 39 },
- .helppanel = { L_HELP_CORNER, L_H - L_HELP_H - L_HELP_CORNER - L_STATUS_HEIGHT, L_HELP_W, L_HELP_H },
- /* Ready screen */
- .dragndropprompt = { 10, 140, L_W - 20, 25 },
- .dragndropbox = { 30, 170, L_W - 54, L_H - 215 },
- .buttonLaunch = { L_W - 495, 35, 180, 80 },
- .buttonReset = { L_W - 300, 35, 180, 80 },
- /* Options */
- .optiongroup = { 10, 35, 600, 85 },
- .optionrecursive = { 20, 45, 15, 15 },
- .optiondhash256 = { 20, 70, 15, 15 },
- .optionbiggerbetter = { 20, 95, 15, 15 },
- .optionthreshold = { 200, 45, 400, 25 },
- .optionresolution = { 390, 85, 150, 25 },
- .optionapply = { 545, 85, 55, 25 },
- .optionthreads = { 260, 85, 125, 25 },
- /* Sorting screen: images */
- .leftImage = { 25, 160, L_PICW, L_PICH },
- .rightImage = { L_PICW + 255, 160, L_PICW, L_PICH },
- .leftTopMeta = { 25, 135, L_PICW, 25 },
- .rightTopMeta = { L_PICW + 255, 135, L_PICW, 25 },
- .leftBottomMeta = { 25, L_PICH + 160, L_PICW, 25 },
- .rightBottomMeta = { L_PICW + 255, L_PICH + 160, L_PICW, 25 },
- /* Sorting screen: stats */
- .statsGroupSize = { 20, 30, 180, 25 },
- .statsGroupCount = { 20, 60, 180, 25 },
- .statsTotalDupes = { 20, 90, 180, 25 },
- .imagepaths = { 215, 30, 750, 85 },
- /* Sorting screen: buttons */
- .buttonNext = { L_PICW + 30, 310, 220, 50 },
- .buttonDelLeft = { L_PICW + 30, 375, 90, 50 },
- .buttonDelRight = { L_PICW + 160, 375, 90, 50 },
- .buttonDelBoth = { L_PICW + 30, 440, 220, 50 },
- .buttonStopSorting = { L_W - 300, 35, 180, 80 },
- /* Sorting screen: comparing */
- .compareRes = { L_PICW + 30, 160, 220, 20 },
- .compareResLeft = { L_PICW + 30, 160, 20, 20 },
- .compareResRight = { L_PICW + 230, 160, 20, 20 },
- .compareFsize = { L_PICW + 30, 190, 220, 20 },
- .compareFsizeLeft = { L_PICW + 30, 190, 20, 20 },
- .compareFsizeRight = { L_PICW + 230, 190, 20, 20 },
- .compareFtype = { L_PICW + 32, 220, 216, 20 },
- /* Progress */
- .progressbar = { 0, L_H - L_PROGRESS_HEIGHT - L_STATUS_HEIGHT + 1, L_W, L_PROGRESS_HEIGHT },
- .progreessdesc = { 0, L_H / 2, L_W, 50 },
- .buttonPause = { L_W / 2 - 100, 35, 200, 80 },
- #undef L_W
- #undef L_H
- #undef L_PICW
- #undef L_PICH
- #undef L_PROGRESS_HEIGHT
- #undef L_STATUS_HEIGHT
- #undef L_HELP_CORNER
- #undef L_HELP_W
- #undef L_HELP_H
- };
- #define LAYOUTSDEF const UILayout AvailableLayouts[] = { Ui720p, Ui900p, Ui1000p, Ui1000w };
- #endif
|