IF virtual.hasColorDisplay
THEN {
bpp:
INT ← UserProfile.Number[key: "ChipNDale.ColorStartBits", default: -1];
-- strategy is
-- -1 don't touch
-- 0 take bitmode as is and initialize, if possible
-- >0 do bitmode and initialize, if possible
pos: WindowManager.ScreenPos ← left;
IF Rope.Equal["right", UserProfile.Token[key: "ColorDisplay.Side"], FALSE] THEN pos ← right;
SetColorBPP[bpp: bpp, pos: pos];
CDSequencer.ImplementCommand[$ColorDisplayMenuC, ColorMenuComm,, doQueue];
CDSequencer.ImplementCommand[$CedarColorDisplay, ResetCedarColorsComm,, doQueue];
CDMenus.CreateEntry[$DisplayMenu, "reset cedar", $CedarColorDisplay];
CDMenus.CreateEntry[$DisplayMenu, "color-menu", $ColorDisplayMenuC];
Commander.Register[
key: "CDColor",
proc: ColorCommand,
doc: "ChipNDale color setup"
];
};