作者有話說
作爲LZ寫的第一個軟件作品,LZ對它還是比滿意的。雖然在編寫的過程中遇到了不少的問題,但它還是完成了。只要沒有出現太大的問題,以後應該是沒有更新了,大家放心用這個版本就行了。
Ps:原本準備慢慢更新的,結果五一假期直接把它肝出來了。
crosshair 完全版介紹
解決準星偏移
使用基於窗口尺寸的中心點座標,而不是相對位置:
screen = QDesktopWidget().primaryScreen().geometry()
screen_center = QPoint(self.width()//2, self.height()//2)
適配全屏模式
將窗口設置爲全屏尺寸,覆蓋整個主顯示器區域,確保在全屏模式下不會被遮擋:
screen = QDesktopWidget().primaryScreen().geometry()
self.setGeometry(screen)
添加定時器週期刷新窗口層級,防止被遊戲覆蓋:
self.timer = QTimer(self)
self.timer.timeout.connect(self.keep_on_top)
self.timer.start(500)
滿足更精準的配置需求
文件讀取支持float:
config = configparser.ConfigParser()
if config.read("config.ini", encoding="utf-8"):
self.shape = config.get("Crosshair", "shape")
color_str = config.get("Crosshair", "color")
self.color = QColor(color_str) if QColor(color_str).isValid() else QColor("#FF0000")
self.size = config.getfloat("Crosshair", "size")
self.thickness = config.getfloat("Crosshair", "thickness")
self.circle_radius = config.getfloat("Crosshair", "radius")
self.gap = config.getfloat("Crosshair", "gap")
self.refresh_interval = config.getint("Crosshair", "refresh_interval")
更好的準星類型:
if self.shape == "cross":
self.draw_cross(painter, center)
elif self.shape == "circle":
self.draw_circle(painter, center)
elif self.shape == "dot":
self.draw_dot(painter, center)
elif self.shape == "t":
self.draw_t(painter, center)
else:
self.draw_cross(painter, center)
更多的準星顏色:
def set_color_preview(self, color):
pal = self.color_preview.palette()
pal.setColor(QPalette.Window, color)
self.color_preview.setPalette(pal)
全新的UI
由pyqt5-designer提供支持:
class CrosshairConfigUI(QWidget):
configUpdated = pyqtSignal()
def __init__(self, crosshair_widget):
super().__init__()
self.crosshair = crosshair_widget
self.init_ui()
self.load_initial_values()
def init_ui(self):
self.setWindowTitle("外置準星配置器")
self.setFixedSize(400, 500)......
crosshair 完全版使用效果
crosshair完全版的系統佔用
與1.3相比,內存佔用到了80MB左右
十字(cross)
點(dot)
圓圈(circle)
T型(t)
與1.3版本相比,去掉了三角型,優化了十字,新增了T型
UI樣式
作者沒話說
提供快速下載網站,是自己的雲服務器,沒有接防護,請不要攻擊它,LZ會哭的
下載鏈接(2025年11月22日雲服務器到期,網站鏈接失效,訪問網站時把https改爲http)
網站鏈接:http://8.148.6.81/
夸克鏈接:https://pan.quark.cn/s/79342a16fb82
更多遊戲資訊請關註:電玩幫遊戲資訊專區
電玩幫圖文攻略 www.vgover.com