mirror of
https://github.com/thepaperpilot/Planar-Pioneers.git
synced 2024-11-24 09:21:45 +00:00
Don't capitalize all tree nodes
This commit is contained in:
parent
7a062bb360
commit
d93cc8c3ec
2 changed files with 2 additions and 10 deletions
|
@ -16,7 +16,7 @@ import player from "game/player";
|
|||
import settings from "game/settings";
|
||||
import type { DecimalSource } from "util/bignum";
|
||||
import Decimal, { format, formatSmall, formatTime } from "util/bignum";
|
||||
import type { WithRequired } from "util/common";
|
||||
import { WithRequired, camelToTitle } from "util/common";
|
||||
import type {
|
||||
Computable,
|
||||
GetComputableType,
|
||||
|
@ -177,11 +177,6 @@ export interface LayerTreeNodeOptions extends TreeNodeOptions {
|
|||
layerID: string;
|
||||
/** The color to display this tree node as */
|
||||
color: Computable<string>; // marking as required
|
||||
/**
|
||||
* The content to display in the tree node.
|
||||
* Defaults to the layer's ID
|
||||
*/
|
||||
display?: Computable<CoercableComponent>;
|
||||
/** Whether or not to append the layer to the tabs list.
|
||||
* If set to false, then the tree node will instead always remove all tabs to its right and then add the layer tab.
|
||||
* Defaults to true.
|
||||
|
@ -214,12 +209,10 @@ export function createLayerTreeNode<T extends LayerTreeNodeOptions>(
|
|||
): LayerTreeNode<T> {
|
||||
return createTreeNode(feature => {
|
||||
const options = optionsFunc.call(feature, feature);
|
||||
processComputable(options as T, "display");
|
||||
setDefault(options, "display", options.layerID);
|
||||
setDefault(options, "display", camelToTitle(options.layerID));
|
||||
processComputable(options as T, "append");
|
||||
return {
|
||||
...options,
|
||||
display: options.display,
|
||||
onClick: unref((options as unknown as GenericLayerTreeNode).append)
|
||||
? function () {
|
||||
if (player.tabs.includes(options.layerID)) {
|
||||
|
|
|
@ -113,7 +113,6 @@ export default defineComponent({
|
|||
color: rgba(0, 0, 0, 0.5);
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: -4px -4px 4px rgba(0, 0, 0, 0.25) inset, 0px 0px 20px var(--background);
|
||||
text-transform: capitalize;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue