Skip to content

Commit

Permalink
Merge pull request #124 from crashkonijn/feature/improved-editor-read…
Browse files Browse the repository at this point in the history
…ability

Feature: Improved editor readability (especially in light mode)
  • Loading branch information
crashkonijn authored Nov 30, 2023
2 parents ecaa5f5 + d471ee9 commit 0cebdde
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private void RenderAction(VisualElement root, IAgent agent, IActionBase action)

private string GetText(ICondition condition, bool value)
{
var color = value ? "green" : "red";
var color = value ? "#1A9018" : "#DD1C1A";

return $" <color={color}>{condition.WorldKey.Name} {GetText(condition.Comparison)} {condition.Amount}</color>";
}
Expand Down
4 changes: 2 additions & 2 deletions Package/Editor/CrashKonijn.Goap.Editor/Styles/Generic.uss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}

#card {
background-color: var(--unity-colors-box-background);
background-color: var(--unity-colors-tooltip-background);
border-radius: 5px;
border-width: 1px;
border-color: var(--unity-colors-default-border);
Expand All @@ -21,7 +21,7 @@
}

.card {
background-color: var(--unity-colors-highlight-background-inactive);
background-color: var(--unity-colors-tooltip-background);
border-radius: 5px;
border-width: 1px;
border-color: var(--unity-colors-default-border);
Expand Down
11 changes: 6 additions & 5 deletions Package/Editor/CrashKonijn.Goap.Editor/Styles/NodeViewer.uss
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,29 @@
}

#node-viewer {

}

#node-viewer__node {
position: absolute;
padding: 10px;
border-width: 1px;
border-radius: 5px;
background-color: #2d2d2d;
background-color: var(--unity-colors-tooltip-background);
min-height: 150px;
}

.node-viewer__node--normal {
border-width: 1px;
border-color: #b0b0b0;
}

.node-viewer__node--active {
border-color: #14b214;
border-color: #1A9018;
border-width: 2px;
}

.node-viewer__node--path {
border-color: #009dff;
border-width: 2px;
}

#node-viewer__node__label {
Expand Down Expand Up @@ -59,5 +60,5 @@
}

#card {
background-color: #2d2d2d;
background-color: var(--unity-colors-tooltip-background);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#right-panel {
background-color: var(--unity-colors-alternated_rows-background);
background-image: url('project://database/Packages/com.crashkonijn.goap/Editor/CrashKonijn.Goap.Editor/Textures/background_grid.png');
background-position: 0 0;
background-repeat: repeat;
Expand Down

0 comments on commit 0cebdde

Please sign in to comment.