Hacknet-Extension-Tutorial


commit
b5ae79e
parent
6ddffd0
author
FBIK.
date
2025-11-01 14:10:02 +0000 UTC
Merge pull request #25 from maix2012/main

docs : [Themes] 添加了主题所有元素的说明
3 files changed,  +201, -0
A Assets/Themes/Backgrounds/RiptideGreen.png
+0, -0
A Assets/Themes/Chronomia.xml
+80, -0
 1@@ -0,0 +1,80 @@
 2+<?xml version="1.0" encoding="UTF-8"?>
 3+<CustomTheme>
 4+  <!-- 窗口样式 -->
 5+  <themeLayoutName>blue</themeLayoutName>
 6+
 7+  <!-- This is a path to the background image file. It should be 1920x1080, and a .jpg or .png file.
 8+  If this is left out, the theme will automatically generate a dynamic background for the theme-->
 9+  <backgroundImagePath>Themes/Backgrounds/RiptideGreen.png</backgroundImagePath>
10+  
11+  <!-- Main Colors - these will define the main feel of the theme -->
12+  <!-- Color of nodes on the netmap, and many other derived colors. -->
13+  <!-- 管理员身份提示色 -->
14+  <defaultHighlightColor>4,0,255</defaultHighlightColor>
15+  <!-- 顶部系统栏 -->
16+  <defaultTopBarColor>30,111,233</defaultTopBarColor>
17+  <!-- This is used for the outlines of the module windows -->
18+  <!-- 模块描边 -->
19+  <moduleColorSolidDefault>53,59,238</moduleColorSolidDefault>
20+  <!-- 模块填充 -->
21+  <moduleColorStrong>0,0,0,120</moduleColorStrong>
22+  <!-- 全屏背景色 -->
23+  <moduleColorBacking>0,0,0,120</moduleColorBacking>
24+
25+  <!-- EXE顶部栏 -->
26+  <exeModuleTopBar>0,128,255,150</exeModuleTopBar>
27+  <!-- EXE标题文本 -->
28+  <exeModuleTitleText>200,200,200,255</exeModuleTitleText>
29+
30+  <!-- Extra Options -->
31+  <!-- 可视化界面按钮颜色 -->
32+  <warningColor>99,95,100</warningColor>
33+  <!-- 可视化界面登录按钮颜色 -->
34+  <subtleTextColor>120,120,120</subtleTextColor>
35+  <!-- 搜索框背景/邮件按钮等颜色 -->
36+  <darkBackgroundColor>8,8,8</darkBackgroundColor>
37+  <!-- use ram / 登录 模块背景色 -->
38+  <indentBackgroundColor>12,12,12</indentBackgroundColor>
39+  <!-- 节点之间连接线的颜色 -->
40+  <outlineColor>68,68,68</outlineColor>
41+  <!-- 断开/取消 按钮颜色、端口被锁住的颜色 -->
42+  <lockedColor>255,0,0,199</lockedColor>
43+  <!-- 显示端口不可破解的背景色 -->
44+  <brightLockedColor>160,0,0</brightLockedColor>
45+  <!-- sshcrack.exe小方格过度颜色、成功登录后成功两个字颜色等 -->
46+  <brightUnlockedColor>0,160,0</brightUnlockedColor>
47+  <!-- 端口解锁后的颜色 -->
48+  <unlockedColor>39,65,36</unlockedColor>
49+  <!-- MessageBoard使用 -->
50+  <lightGray>180,180,180</lightGray>
51+  <!-- 过载节点颜色[指RAM上的] 运行Shell时节点的颜色,以及您在[probe或nmap]看到的[检测到代理]和[检测到防火墙]的颜色 -->
52+  <shellColor>222,201,24</shellColor>
53+  <!-- shell过载按钮侧边颜色(经测试,按钮不够宽显示不出来侧边) -->
54+  <shellButtonColor>105,167,188</shellButtonColor>
55+  <!-- 模块bar文字色 -->
56+  <semiTransText>120,120,120,0</semiTransText>
57+  <!-- 终端文本颜色 -->
58+  <terminalTextColor>213,245,255</terminalTextColor>
59+  <!-- 顶部系统栏文本颜色 -->
60+  <topBarTextColor>255,255,255,150</topBarTextColor>
61+  <!-- 破解端口界面斜条纹颜色 -->
62+  <superLightWhite>2,2,2,30</superLightWhite>
63+  <!-- 当前连接的节点颜色 -->
64+  <connectedNodeHighlight>222,0,0,195</connectedNodeHighlight>
65+  <!-- 鼠标放到netmap节点上后显示右侧文字的颜色 -->
66+  <netmapToolTipColor>213,245,255,0</netmapToolTipColor>
67+  <!-- 鼠标放到netmap节点上后显示右侧文字的背景 -->
68+  <netmapToolTipBackground>0,0,0,70</netmapToolTipBackground>
69+  <!-- 顶部栏icon颜色 -->
70+  <topBarIconsColor>255,255,255</topBarIconsColor>
71+  <!-- 控制玩家计算机节点的颜色 -->
72+  <thisComputerNode>95,220,83</thisComputerNode>
73+  <!-- 搜索线的颜色 -->
74+  <scanlinesColor>255,255,255,15</scanlinesColor>
75+  
76+  <!-- AlienFX Colors used for Alienware (and other) hardware with variable LED lights that Hacknet can set dynamically -->
77+  <AFX_KeyboardMiddle>0,120,255</AFX_KeyboardMiddle>
78+  <AFX_KeyboardOuter>255,150,0</AFX_KeyboardOuter>
79+  <AFX_WordLogo>0,120,255</AFX_WordLogo>
80+  <AFX_Other>0,100,255</AFX_Other>
81+</CustomTheme>
A Content/Themes.md
+121, -0
  1@@ -0,0 +1,121 @@
  2+# Themes(主题)
  3+
  4+在Hacknet中,Themes用于给玩家使用的主题
  5+
  6+一个Themes文件的结构如下:
  7+```xml
  8+<?xml version="1.0" encoding="UTF-8"?>
  9+<CustomTheme>
 10+  <!-- 窗口样式 -->
 11+  <themeLayoutName>blue</themeLayoutName>
 12+
 13+  <!-- This is a path to the background image file. It should be 1920x1080, and a .jpg or .png file.
 14+  If this is left out, the theme will automatically generate a dynamic background for the theme-->
 15+  <backgroundImagePath>Themes/Backgrounds/XXX.png</backgroundImagePath>
 16+  
 17+  <!-- Main Colors - these will define the main feel of the theme -->
 18+  <!-- Color of nodes on the netmap, and many other derived colors. -->
 19+  <!-- 管理员身份提示色 -->
 20+  <defaultHighlightColor>230,235,50</defaultHighlightColor>
 21+  <!-- 顶部系统栏 -->
 22+  <defaultTopBarColor>40,88,160,125</defaultTopBarColor>
 23+  <!-- This is used for the outlines of the module windows -->
 24+  <!-- 模块描边 -->
 25+  <moduleColorSolidDefault>110,240,230</moduleColorSolidDefault>
 26+  <!-- 模块填充 -->
 27+  <moduleColorStrong>0,0,0,120</moduleColorStrong>
 28+  <!-- 全屏背景色 -->
 29+  <moduleColorBacking>0,0,0,120</moduleColorBacking>
 30+
 31+  <!-- EXE顶部栏 -->
 32+  <exeModuleTopBar>0,128,255,150</exeModuleTopBar>
 33+  <!-- EXE标题文本 -->
 34+  <exeModuleTitleText>200,200,200,255</exeModuleTitleText>
 35+
 36+  <!-- Extra Options -->
 37+  <!-- 可视化界面按钮颜色 -->
 38+  <warningColor>165,50,205</warningColor>
 39+  <!-- 可视化界面登录按钮颜色 -->
 40+  <subtleTextColor>150,30,180</subtleTextColor>
 41+  <!-- 搜索框背景/邮件按钮等颜色 -->
 42+  <darkBackgroundColor>8,8,8</darkBackgroundColor>
 43+  <!-- use ram / 登录 模块背景色 -->
 44+  <indentBackgroundColor>12,12,12</indentBackgroundColor>
 45+  <!-- 节点之间连接线的颜色 -->
 46+  <outlineColor>68,68,68</outlineColor>
 47+  <!-- 断开/取消 按钮颜色、端口被锁住的颜色 -->
 48+  <lockedColor>65,16,16,200</lockedColor>
 49+  <!-- 显示端口不可破解的背景色 -->
 50+  <brightLockedColor>160,0,0</brightLockedColor>
 51+  <!-- sshcrack.exe小方格过度颜色、成功登录后成功两个字颜色等 -->
 52+  <brightUnlockedColor>0,160,0</brightUnlockedColor>
 53+  <!-- 端口解锁后的颜色 -->
 54+  <unlockedColor>39,65,36</unlockedColor>
 55+  <!-- MessageBoard使用 -->
 56+  <lightGray>180,180,180</lightGray>
 57+  <!-- 过载节点颜色[指RAM上的] 运行Shell时节点的颜色,以及您在[probe或nmap]看到的[检测到代理]和[检测到防火墙]的颜色 -->
 58+  <shellColor>222,201,24</shellColor>
 59+  <!-- shell过载按钮侧边颜色(经测试,按钮不够宽显示不出来侧边) -->
 60+  <shellButtonColor>105,167,188</shellButtonColor>
 61+  <!-- 模块bar文字色 -->
 62+  <semiTransText>120,120,120,0</semiTransText>
 63+  <!-- 终端文本颜色 -->
 64+  <terminalTextColor>213,245,255</terminalTextColor>
 65+  <!-- 顶部系统栏文本颜色 -->
 66+  <topBarTextColor>255,255,255,150</topBarTextColor>
 67+  <!-- 破解端口界面斜条纹颜色 -->
 68+  <superLightWhite>2,2,2,30</superLightWhite>
 69+  <!-- 当前连接的节点颜色 -->
 70+  <connectedNodeHighlight>222,0,0,195</connectedNodeHighlight>
 71+  <!-- 鼠标放到netmap节点上后显示右侧文字的颜色 -->
 72+  <netmapToolTipColor>213,245,255,0</netmapToolTipColor>
 73+  <!-- 鼠标放到netmap节点上后显示右侧文字的背景 -->
 74+  <netmapToolTipBackground>0,0,0,70</netmapToolTipBackground>
 75+  <!-- 顶部栏icon颜色 -->
 76+  <topBarIconsColor>255,255,255</topBarIconsColor>
 77+  <!-- 控制玩家计算机节点的颜色 -->
 78+  <thisComputerNode>95,220,83</thisComputerNode>
 79+  <!-- 搜索线的颜色 -->
 80+  <scanlinesColor>255,255,255,15</scanlinesColor>
 81+  
 82+  <!-- AlienFX Colors used for Alienware (and other) hardware with variable LED lights that Hacknet can set dynamically -->
 83+  <AFX_KeyboardMiddle>0,120,255</AFX_KeyboardMiddle>
 84+  <AFX_KeyboardOuter>255,150,0</AFX_KeyboardOuter>
 85+  <AFX_WordLogo>0,120,255</AFX_WordLogo>
 86+  <AFX_Other>0,100,255</AFX_Other>
 87+</CustomTheme>
 88+```
 89+一个Theme有以下几个部分:
 90+- themeLayoutName 窗口样式(布局)
 91+- backgroundImagePath 主题背景路径
 92+- defaultHighlightColor 连接节点时Display窗口顶部显示的"您是本系统的管理员"
 93+- defaultTopBarColor 顶部的系统栏显示的颜色
 94+- moduleColorSolidDefault 每个模块的描边颜色
 95+- moduleColorStrong 每个模块填充的颜色
 96+- moduleColorBacking 全屏背景色
 97+- exeModuleTopBar exe程序顶部栏的颜色
 98+- exeModuleTitleText exe标题文本颜色
 99+- warningColor 可视化界面颜色(Trace时闪的颜色)
100+- subtleTextColor 登录按钮的颜色
101+- darkBackgroundColor 搜索框背景/邮件按钮等颜色
102+- indentBackgroundColor 顶部内存条显示占用(USED :RAM ??/??)的背景颜色
103+- outlineColor 节点之间的连接线颜色
104+- lockedColor 端口锁定状态的背景颜色(也是断开/取消的背景色)
105+- brightLockedColor 显示端口不可破解的背景色
106+- brightUnlockedColor ssh的小方格过渡颜色
107+- unlockedColor 端口开放背景色
108+- lightGray MessageBoard主题颜色
109+- shellColor 允许shell时节点的颜色
110+- shellButtonColor shell过载按钮左边框颜色
111+- semiTransText 模块bar文字色
112+- terminalTextColor 终端文本颜色
113+- topBarTextColor 顶部系统栏颜色
114+- superLightWhite 斜条纹颜色
115+- connectedNodeHighlight 当前连接的节点颜色
116+- netmapToolTipColor 把鼠标放在节点上显示的节点名颜色
117+- topBarIconsColor 顶部栏icon颜色
118+- thisComputerNode 本地计算机节点颜色
119+- scanlinesColor 搜索线的颜色
120+## 示例文件
121+可参考[Chronomia.xml](./../Assets/Themes/Chronomia.xml)
122+