Feature : color palette

- Fixed : manager UI is redrawn after save
- the Selected palette is saved as a user preference
- default background is now the dark one
- the selected palette is not reset after closing palette manager
This commit is contained in:
jdescottes
2014-03-30 14:56:31 +02:00
parent 4947cc4820
commit 231ae9e165
7 changed files with 35 additions and 18 deletions

View File

@@ -4,10 +4,12 @@
ns.UserSettings = {
GRID_WIDTH : 'GRID_WIDTH',
CANVAS_BACKGROUND : 'CANVAS_BACKGROUND',
SELECTED_PALETTE : 'SELECTED_PALETTE',
KEY_TO_DEFAULT_VALUE_MAP_ : {
'GRID_WIDTH' : 0,
'CANVAS_BACKGROUND' : 'medium-canvas-background'
'CANVAS_BACKGROUND' : 'lowcont-dark-canvas-background',
'SELECTED_PALETTE' : Constants.NO_PALETTE_ID
},
/**

View File

@@ -37,7 +37,7 @@ if (typeof Function.prototype.bind !== "function") {
if (r > 255 || g > 255 || b > 255) {
throw "Invalid color component";
}
return ((r << 16) | (g << 8) | b).toString(16);
};