tytd-2019/source/colors.c

115 lines
4.1 KiB
C
Raw Normal View History

2022-04-17 11:39:48 +00:00
#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(){
2022-04-17 11:41:25 +00:00
SetColor(RGBA(255,255,0,255),DOWNLOAD_BACKGROUND);
2022-04-17 11:39:48 +00:00
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;
}
2022-04-17 11:46:26 +00:00
//init scheme set colors
2022-04-17 11:39:48 +00:00
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;
}
}
2022-04-17 11:46:26 +00:00
//cycle through schemes
2022-04-17 11:39:48 +00:00
int AddScheme(int val){
if (val<(s-1)){
return val+1;
}
return 0;
}