diff --git a/pypipboyapp.py b/pypipboyapp.py
index f56aa94..a9edaa1 100644
--- a/pypipboyapp.py
+++ b/pypipboyapp.py
@@ -6,7 +6,7 @@
import importlib
import traceback
import logging.config
-from PyQt5 import QtWidgets, QtCore, uic
+from PyQt5 import QtGui, QtWidgets, QtCore, uic
from pypipboy.network import NetworkChannel
from pypipboy.datamanager import PipboyDataManager
from dialogs.selecthostdialog import SelectHostDialog
@@ -102,6 +102,11 @@ def __init__(self, args):
self._connectHostThread = None
self._iwcEndpoints = dict()
self._logger = logging.getLogger('pypipboyapp.main')
+
+ pipboyAppIcon = QtGui.QIcon()
+ pipboyAppIcon.addFile('ui\\res\\PyPipBoyApp-Launcher.ico')
+ self.setWindowIcon(pipboyAppIcon)
+
# run the application
diff --git a/ui/res/PyPipBoyApp-Launcher.ico b/ui/res/PyPipBoyApp-Launcher.ico
new file mode 100644
index 0000000..b7dac03
Binary files /dev/null and b/ui/res/PyPipBoyApp-Launcher.ico differ
diff --git a/widgets/hotkeys/hotkeys.py b/widgets/hotkeys/hotkeys.py
index 927e9fd..c2c95f1 100644
--- a/widgets/hotkeys/hotkeys.py
+++ b/widgets/hotkeys/hotkeys.py
@@ -217,14 +217,15 @@ def equipApparelFromSlot(self, slotIndex):
return
def toggleRadio(self):
+
if (self.currentRadioStation):
+ self._logger.debug('toggleRadio: currentstation: ' + self.currentRadioStation.child('text').value())
self.dataManager.rpcToggleRadioStation(self.currentRadioStation)
else:
self._logger.debug('toggleRadio: no current, trying station 0')
numStations = len(self.availableRadioStations)
if numStations > 0:
self.dataManager.rpcToggleRadioStation(self.availableRadioStations[0])
- self._logger.debug('toggleRadio: currentstation: ' + self.currentRadioStation.child('text').value())
return
diff --git a/widgets/map/globalmapwidget.py b/widgets/map/globalmapwidget.py
index f8cd4c1..4413602 100644
--- a/widgets/map/globalmapwidget.py
+++ b/widgets/map/globalmapwidget.py
@@ -491,7 +491,12 @@ def init(self, app, datamanager):
self.widget.mapFileComboBox.currentIndexChanged.connect(self._slotMapFileComboTriggered)
# Init color controls
self.widget.mapColorButton.clicked.connect(self._slotMapColorSelectionTriggered)
- self.widget.mapColorAutoToggle.setChecked(bool(int(self._app.settings.value('globalmapwidget/autoColour', 0))))
+ try:
+ self.widget.mapColorAutoToggle.setChecked(bool(int(self._app.settings.value('globalmapwidget/autoColour', 0))))
+ except ValueError:
+ self.widget.mapColorAutoToggle.setChecked(bool(self._app.settings.value('globalmapwidget/autoColour', False)))
+ #self.widget.mapColorAutoToggle.setChecked(False)
+
self.widget.mapColorAutoToggle.stateChanged.connect(self._slotMapColorAutoModeTriggered)
# Init stickyLabels Checkbox
self.stickyLabelsEnabled = False
@@ -776,7 +781,11 @@ def _slotMapColorAutoModeTriggered(self, value):
self._onPipColorChanged(None, None, None)
elif self.pipColor:
self.pipColor.unregisterValueUpdatedListener(self._onPipColorChanged)
- self.signalSetColor.emit(self.pipColor)
+ r = self.pipColor.child(0).value() * 255
+ g = self.pipColor.child(1).value() * 255
+ b = self.pipColor.child(2).value() * 255
+ pipColor = QtGui.QColor.fromRgb(r,g,b)
+ self.signalSetColor.emit(pipColor)
@QtCore.pyqtSlot()
diff --git a/widgets/smallplayerinfo/smallplayerinfowidget.py b/widgets/smallplayerinfo/smallplayerinfowidget.py
index 3c7960a..7c0be41 100644
--- a/widgets/smallplayerinfo/smallplayerinfowidget.py
+++ b/widgets/smallplayerinfo/smallplayerinfowidget.py
@@ -19,6 +19,7 @@ def __init__(self, handle, parent):
self.pipPlayerInfo = None
self.pipCurrWorldspace = None
self.pipStats = None
+ self.pipRadioInfo = None
self.maxHP = 0
self.curHP = 0
self.maxAP = 0
@@ -48,6 +49,10 @@ def _onPipRootObjectEvent(self, rootObject):
if (self.pipStats):
self.pipStats.registerValueUpdatedListener(self._onPipPlayerInfoUpdate, 1)
+ self.pipRadioInfo = rootObject.child('Radio')
+ if self.pipRadioInfo:
+ self.pipRadioInfo.registerValueUpdatedListener(self._onPipPlayerInfoUpdate, 2)
+
self._signalInfoUpdated.emit()
@@ -100,7 +105,6 @@ def _slotInfoUpdated(self):
if (effect.child('Name').value() == 'Rads'):
radChange += effect.child('Value').value()
-
radChangePrefix = ''
if (radChange > 0):
radChangePrefix = '+'
@@ -108,7 +112,15 @@ def _slotInfoUpdated(self):
self.widget.radChangeLabel.setText(radChangePrefix + str(round(radChange)))
self.widget.lblActiveEffects.setText(listEffectsSeperator.join(listEffects))
-
+ currentRadioStationName = 'Radio off'
+ if(self.pipRadioInfo):
+ for i in range(0, self.pipRadioInfo.childCount()):
+ station = self.pipRadioInfo.child(i)
+ if station.child('active').value():
+ currentRadioStationName = station.child('text').value()
+
+ self.widget.lblRadio.setText(currentRadioStationName)
+
maxHP = self.pipPlayerInfo.child('MaxHP')
if maxHP:
self.maxHP = maxHP.value()
diff --git a/widgets/smallplayerinfo/ui/smallplayerinfowidget.ui b/widgets/smallplayerinfo/ui/smallplayerinfowidget.ui
index c1ef228..ac56ec6 100644
--- a/widgets/smallplayerinfo/ui/smallplayerinfowidget.ui
+++ b/widgets/smallplayerinfo/ui/smallplayerinfowidget.ui
@@ -69,6 +69,27 @@
+ -
+
+
-
+
+
+
+ 10
+ 50
+ false
+
+
+
+ Off
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+
+
-
-