Skip to content

Commit

Permalink
Highlights in the vessel report if a node is a relay or not
Browse files Browse the repository at this point in the history
Now the icon shows a dish if it's a relay or a vessel if it's not
Fixes #10
  • Loading branch information
rockfactory committed Feb 25, 2024
1 parent 5e4d659 commit 455e5bf
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 4 deletions.
Binary file modified plugin_template/assets/bundles/commnext_ui.bundle
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
127 changes: 127 additions & 0 deletions src/CommNext.Unity/CommNext.Unity/Assets/Images/AntennaIcon.png.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions src/CommNext.Unity/CommNext.Unity/Assets/UI/CommNextStyles.uss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
--text-color: rgb(192, 199, 213);
--inbound: rgb(142, 167, 255);
--outbound: rgb(181, 88, 220);

--band-k: rgb(112, 100, 255);
--band-ka: rgb(214, 38, 235);
--band-v: rgb(43, 217, 148);
Expand Down Expand Up @@ -553,9 +552,6 @@
border-radius: 3px;
width: 16px;
height: 16px;

/*background-image: url('project://database/Assets/Images/TooltipBg.png?fileID=21300000&guid=5dc9e7533cd57af4291c5817bb6d671f&type=3#TooltipBg');*/
/*-unity-background-image-tint-color: rgb(36, 41, 51);*/
padding-left: 2px;
padding-right: 2px;
padding-top: 2px;
Expand All @@ -566,3 +562,13 @@
.band__icon--darker {
background-color: rgb(20, 24, 31);
}

.antenna__icon {
flex-grow: 0;
background-image: url('project://database/Assets/Images/AntennaIcon.png?fileID=21300000&guid=acd0cc9db6229554d9c462be11b8b9d5&type=3#AntennaIcon');
-unity-background-scale-mode: scale-to-fit;
flex-shrink: 0;
background-size: 16px 16px;
width: 16px;
height: 16px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -147,5 +147,6 @@ public void Bind(NetworkNode currentNode, NetworkConnection connection)
_signalStrengthTooltip.TooltipText = signalStrength.ToString("P0");

_connectionIcon.style.unityBackgroundImageTintColor = connection.IsConnected ? ActiveColor : InactiveColor;
_connectionIcon.ToggleClassesIf(otherNode.IsRelay, ["relay__icon"], ["antenna__icon"]);
}
}

0 comments on commit 455e5bf

Please sign in to comment.