tytd-2019/source/colors.c

114 lines
4.0 KiB
C

#include "colors.h"
u32 colors[TOTALCOLORS];
int s=5;
void Green(){
SetColor(RGBA(0,128,0,255),DOWNLOAD_BACKGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_TEXTBOX_BACKGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_FOREGROUND_NO_SELECTOR);
SetColor(RGBA(0,0,255,255),DOWNLOAD_FOREGROUND_SELECTOR);
SetColor(RGBA(0,0,255,255),DOWNLOAD_KEYBOARD_UNSELECT);
SetColor(RGBA(0,0,0,255),DOWNLOAD_TEXTBOX_FOREGROUND);
SetColor(RGBA(255,12,255,255),DOWNLOAD_CURSOR);
SetColor(RGBA(127,0,127,255),DOWNLOAD_PROGRESSBAR_FOREGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_PROGRESSBAR_BACKGROUND);
SetColor(RGBA(0,0,255,255),DOWNLOAD_PROGRESSVAL);
SetColor(RGBA(255,0,0,255),DOWNLOAD_SELECTOR);
SetColor(RGBA(128,0,128,255),DOWNLOAD_KEYBOARD_OUTLINE);
}
void DefaultColors(){
SetColor(RGBA(255,0,0,255),DOWNLOAD_BACKGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_TEXTBOX_BACKGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_FOREGROUND_NO_SELECTOR);
SetColor(RGBA(0,0,255,255),DOWNLOAD_FOREGROUND_SELECTOR);
SetColor(RGBA(0,0,255,255),DOWNLOAD_KEYBOARD_UNSELECT);
SetColor(RGBA(0,0,0,255),DOWNLOAD_TEXTBOX_FOREGROUND);
SetColor(RGBA(255,12,255,255),DOWNLOAD_CURSOR);
SetColor(RGBA(127,0,127,255),DOWNLOAD_PROGRESSBAR_FOREGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_PROGRESSBAR_BACKGROUND);
SetColor(RGBA(0,0,255,255),DOWNLOAD_PROGRESSVAL);
SetColor(RGBA(0,255,0,255),DOWNLOAD_SELECTOR);
SetColor(RGBA(128,0,128,255),DOWNLOAD_KEYBOARD_OUTLINE);
}
void Yellow(){
SetColor(RGBA(128,128,0,255),DOWNLOAD_BACKGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_TEXTBOX_BACKGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_FOREGROUND_NO_SELECTOR);
SetColor(RGBA(0,0,255,255),DOWNLOAD_FOREGROUND_SELECTOR);
SetColor(RGBA(0,0,255,255),DOWNLOAD_KEYBOARD_UNSELECT);
SetColor(RGBA(0,0,0,255),DOWNLOAD_TEXTBOX_FOREGROUND);
SetColor(RGBA(255,12,255,255),DOWNLOAD_CURSOR);
SetColor(RGBA(127,0,127,255),DOWNLOAD_PROGRESSBAR_FOREGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_PROGRESSBAR_BACKGROUND);
SetColor(RGBA(0,0,255,255),DOWNLOAD_PROGRESSVAL);
SetColor(RGBA(255,0,0,255),DOWNLOAD_SELECTOR);
SetColor(RGBA(128,0,128,255),DOWNLOAD_KEYBOARD_OUTLINE);
}
void ShiftL1(){
SetColor(RGBA(0,0,255,255),DOWNLOAD_BACKGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_TEXTBOX_BACKGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_FOREGROUND_NO_SELECTOR);
SetColor(RGBA(0,255,0,255),DOWNLOAD_FOREGROUND_SELECTOR);
SetColor(RGBA(0,255,0,255),DOWNLOAD_KEYBOARD_UNSELECT);
SetColor(RGBA(0,0,0,255),DOWNLOAD_TEXTBOX_FOREGROUND);
SetColor(RGBA(12,255,255,255),DOWNLOAD_CURSOR);
SetColor(RGBA(0,127,127,255),DOWNLOAD_PROGRESSBAR_FOREGROUND);
SetColor(RGBA(255,255,255,255),DOWNLOAD_PROGRESSBAR_BACKGROUND);
SetColor(RGBA(0,255,0,255),DOWNLOAD_PROGRESSVAL);
SetColor(RGBA(255,0,0,255),DOWNLOAD_SELECTOR);
SetColor(RGBA(0,128,128,255),DOWNLOAD_KEYBOARD_OUTLINE);
}
void InvertedColors(){
SetColor(RGBA(0,255,255,255),DOWNLOAD_BACKGROUND);
SetColor(RGBA(0,0,0,255),DOWNLOAD_TEXTBOX_BACKGROUND);
SetColor(RGBA(0,0,0,255),DOWNLOAD_FOREGROUND_NO_SELECTOR);
SetColor(RGBA(255,255,0,255),DOWNLOAD_FOREGROUND_SELECTOR);
SetColor(RGBA(255,255,255,255),DOWNLOAD_KEYBOARD_UNSELECT);
SetColor(RGBA(255,255,255,255),DOWNLOAD_TEXTBOX_FOREGROUND);
SetColor(RGBA(0,243,0,255),DOWNLOAD_CURSOR);
SetColor(RGBA(128,255,128,255),DOWNLOAD_PROGRESSBAR_FOREGROUND);
SetColor(RGBA(0,0,0,255),DOWNLOAD_PROGRESSBAR_BACKGROUND);
SetColor(RGBA(255,255,0,255),DOWNLOAD_PROGRESSVAL);
SetColor(RGBA(255,0,255,255),DOWNLOAD_SELECTOR);
SetColor(RGBA(127,255,127,255),DOWNLOAD_KEYBOARD_OUTLINE);
}
u32 GetColor(int component){
return colors[component];
}
void SetColor(u32 color,int component){
colors[component] = color;
}
void InitColor(int scheme){
//Type Colors
switch(scheme){
case 0:
DefaultColors();
break;
case 1:
InvertedColors();
break;
case 2:
Green();
break;
case 3:
Yellow();
break;
default:
ShiftL1();
break;
}
}
int AddScheme(int val){
if (val<(s-1)){
return val+1;
}
return 0;
}