Skip to content
Snippets Groups Projects
Commit 796afc31 authored by deuce's avatar deuce
Browse files

After changing the palette for uifc, reset the colours used.

Have the scrollback set the palette as well.
parent 72d6eb6d
Branches
Tags
No related merge requests found
......@@ -5,6 +5,7 @@
#include <genwrap.h>
#include <uifc.h>
#include <ciolib.h>
#include <vidmodes.h>
#include "cterm.h"
#include "term.h"
......@@ -43,6 +44,7 @@ void viewscroll(void)
setfont(0, FALSE, 4);
drawwin();
top=cterm->backpos;
set_modepalette(palettes[COLOUR_PALETTE]);
gotoxy(1,1);
textattr(uifc.hclr|(uifc.bclr<<4)|BLINK);
for(i=0;(!i) && (!quitting);) {
......
......@@ -26,12 +26,13 @@ int orig_x;
int orig_y;
uint32_t orig_palette[16];
int init_uifc(BOOL scrn, BOOL bottom) {
int
init_uifc(BOOL scrn, BOOL bottom) {
int i;
struct text_info txtinfo;
char top[80];
gettextinfo(&txtinfo);
gettextinfo(&txtinfo);
if(!uifc_initialized) {
/* Set scrn_len to 0 to prevent textmode() call */
uifc.scrn_len=0;
......@@ -50,6 +51,13 @@ int init_uifc(BOOL scrn, BOOL bottom) {
uifc_initialized=UIFC_INIT;
get_modepalette(orig_palette);
set_modepalette(palettes[COLOUR_PALETTE]);
if ((cio_api.options & (CONIO_OPT_EXTENDED_PALETTE | CONIO_OPT_PALETTE_SETTING)) == (CONIO_OPT_EXTENDED_PALETTE | CONIO_OPT_PALETTE_SETTING)) {
uifc.bclr=BLUE;
uifc.hclr=YELLOW;
uifc.lclr=WHITE;
uifc.cclr=CYAN;
uifc.lbclr=BLUE|(LIGHTGRAY<<4); /* lightbar color */
}
}
if(scrn) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment