MapLegend.uss 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. .legend-scroll-container {
  2. position: absolute;
  3. top: 20px;
  4. left: 20px;
  5. max-height: 70vh;
  6. max-width: 320px;
  7. min-width: 280px;
  8. width: 320px;
  9. z-index: 1000; /* Ensure it appears above other UI elements */
  10. }
  11. .legend-container {
  12. background-color: rgba(0, 0, 0, 0.9);
  13. border-radius: 10px;
  14. padding: 15px;
  15. min-width: 280px;
  16. border-width: 2px;
  17. border-color: rgba(255, 255, 255, 0.3);
  18. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* Add shadow for better visibility */
  19. }
  20. .legend-title {
  21. font-size: 18px;
  22. color: white;
  23. font-style: bold;
  24. margin-bottom: 10px;
  25. text-align: center;
  26. }
  27. .legend-items {
  28. margin-bottom: 15px;
  29. }
  30. .legend-item {
  31. flex-direction: row;
  32. align-items: center;
  33. margin-bottom: 5px;
  34. }
  35. .color-box {
  36. width: 20px;
  37. height: 20px;
  38. margin-right: 10px;
  39. border-radius: 3px;
  40. border-width: 1px;
  41. border-color: rgba(255, 255, 255, 0.5);
  42. }
  43. .legend-text {
  44. color: white;
  45. font-size: 14px;
  46. flex-grow: 1;
  47. }
  48. .controls-info {
  49. border-top-width: 1px;
  50. border-top-color: rgba(255, 255, 255, 0.3);
  51. padding-top: 10px;
  52. }
  53. .controls-title {
  54. font-size: 16px;
  55. color: white;
  56. font-style: bold;
  57. margin-bottom: 5px;
  58. }
  59. .controls-text {
  60. color: rgba(255, 255, 255, 0.8);
  61. font-size: 12px;
  62. margin-bottom: 2px;
  63. }
  64. /* Color definitions matching your WorldMapGenerator colors */
  65. .ocean-color {
  66. background-color: rgb(0, 0, 255); /* Blue */
  67. }
  68. .river-color {
  69. background-color: rgb(0, 255, 255); /* Cyan */
  70. }
  71. .plain-color {
  72. background-color: rgb(0, 128, 0); /* Green */
  73. }
  74. .forest-color {
  75. background-color: rgb(51, 179, 51); /* Dark green (0.2, 0.7, 0.2) */
  76. }
  77. .mountain-color {
  78. background-color: rgb(128, 128, 128); /* Gray */
  79. }
  80. .town-color {
  81. background-color: rgb(204, 102, 51); /* Orange-brown (0.8, 0.4, 0.2) */
  82. }
  83. .village-color {
  84. background-color: rgb(230, 179, 102); /* Light brown (0.9, 0.7, 0.4) */
  85. }
  86. .road-color {
  87. background-color: rgb(153, 128, 77); /* Brown (0.6, 0.5, 0.3) */
  88. }
  89. .dock-color {
  90. background-color: rgb(102, 77, 51); /* Dark brown (0.4, 0.3, 0.2) */
  91. }