mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-23 06:32:26 +01:00
Merge pull request #1621 from danielyxie/dev
added button as editable color
This commit is contained in:
commit
ee3ae4f44a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -137,6 +137,7 @@ interface IDefaultSettings {
|
|||||||
disabled: string;
|
disabled: string;
|
||||||
backgroundprimary: string;
|
backgroundprimary: string;
|
||||||
backgroundsecondary: string;
|
backgroundsecondary: string;
|
||||||
|
button: string;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,6 +214,7 @@ export const defaultSettings: IDefaultSettings = {
|
|||||||
disabled: "#66cfbc",
|
disabled: "#66cfbc",
|
||||||
backgroundprimary: "#000",
|
backgroundprimary: "#000",
|
||||||
backgroundsecondary: "#000",
|
backgroundsecondary: "#000",
|
||||||
|
button: "#333",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -277,6 +279,7 @@ export const Settings: ISettings & ISelfInitializer & ISelfLoading = {
|
|||||||
disabled: defaultSettings.theme.disabled,
|
disabled: defaultSettings.theme.disabled,
|
||||||
backgroundprimary: defaultSettings.theme.backgroundprimary,
|
backgroundprimary: defaultSettings.theme.backgroundprimary,
|
||||||
backgroundsecondary: defaultSettings.theme.backgroundsecondary,
|
backgroundsecondary: defaultSettings.theme.backgroundsecondary,
|
||||||
|
button: defaultSettings.theme.button,
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
Object.assign(Settings, defaultSettings);
|
Object.assign(Settings, defaultSettings);
|
||||||
|
@ -17,6 +17,7 @@ declare module "@mui/material/styles" {
|
|||||||
rep: React.CSSProperties["color"];
|
rep: React.CSSProperties["color"];
|
||||||
backgroundprimary: React.CSSProperties["color"];
|
backgroundprimary: React.CSSProperties["color"];
|
||||||
backgroundsecondary: React.CSSProperties["color"];
|
backgroundsecondary: React.CSSProperties["color"];
|
||||||
|
button: React.CSSProperties["color"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
interface ThemeOptions {
|
interface ThemeOptions {
|
||||||
@ -30,6 +31,7 @@ declare module "@mui/material/styles" {
|
|||||||
rep: React.CSSProperties["color"];
|
rep: React.CSSProperties["color"];
|
||||||
backgroundprimary: React.CSSProperties["color"];
|
backgroundprimary: React.CSSProperties["color"];
|
||||||
backgroundsecondary: React.CSSProperties["color"];
|
backgroundsecondary: React.CSSProperties["color"];
|
||||||
|
button: React.CSSProperties["color"];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,6 +50,7 @@ export function refreshTheme(): void {
|
|||||||
rep: Settings.theme.rep,
|
rep: Settings.theme.rep,
|
||||||
backgroundprimary: Settings.theme.backgroundprimary,
|
backgroundprimary: Settings.theme.backgroundprimary,
|
||||||
backgroundsecondary: Settings.theme.backgroundsecondary,
|
backgroundsecondary: Settings.theme.backgroundsecondary,
|
||||||
|
button: Settings.theme.button,
|
||||||
},
|
},
|
||||||
palette: {
|
palette: {
|
||||||
primary: {
|
primary: {
|
||||||
@ -140,7 +143,7 @@ export function refreshTheme(): void {
|
|||||||
MuiButton: {
|
MuiButton: {
|
||||||
styleOverrides: {
|
styleOverrides: {
|
||||||
root: {
|
root: {
|
||||||
backgroundColor: "#333",
|
backgroundColor: Settings.theme.button,
|
||||||
border: "1px solid " + Settings.theme.well,
|
border: "1px solid " + Settings.theme.well,
|
||||||
// color: Settings.theme.primary,
|
// color: Settings.theme.primary,
|
||||||
"&:hover": {
|
"&:hover": {
|
||||||
|
@ -241,6 +241,12 @@ export function ThemeEditorModal(props: IProps): React.ReactElement {
|
|||||||
color={customTheme["backgroundsecondary"]}
|
color={customTheme["backgroundsecondary"]}
|
||||||
defaultColor={defaultSettings.theme["backgroundsecondary"]}
|
defaultColor={defaultSettings.theme["backgroundsecondary"]}
|
||||||
/>
|
/>
|
||||||
|
<ColorEditor
|
||||||
|
name="button"
|
||||||
|
onColorChange={onColorChange}
|
||||||
|
color={customTheme["button"]}
|
||||||
|
defaultColor={defaultSettings.theme["button"]}
|
||||||
|
/>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<ColorEditor
|
<ColorEditor
|
||||||
|
Loading…
Reference in New Issue
Block a user