diff --git a/Core/COM3D2.MaidFiddler.Plugin/Service/Service.GameMain.cs b/Core/COM3D2.MaidFiddler.Plugin/Service/Service.GameMain.cs index 3feb8b1..415e4f8 100644 --- a/Core/COM3D2.MaidFiddler.Plugin/Service/Service.GameMain.cs +++ b/Core/COM3D2.MaidFiddler.Plugin/Service/Service.GameMain.cs @@ -109,6 +109,8 @@ private Dictionary GetLockableMaidStatusValueInfo() return "int"; if (t.IsUnsignedInteger()) return "uint"; + if (t == typeof(bool)) + return "bool"; return "string"; }); } diff --git a/GUI/app_info.py b/GUI/app_info.py index 3609a7c..3231c68 100644 --- a/GUI/app_info.py +++ b/GUI/app_info.py @@ -1,4 +1,4 @@ -VERSION = "1.0.4.2" +VERSION = "1.0.4.3" CONTRIBUTORS = [ "@ghorsington -- original developer", diff --git a/GUI/maidfiddler/ui/tabs/maid_stats.py b/GUI/maidfiddler/ui/tabs/maid_stats.py index dd841b5..9abb006 100644 --- a/GUI/maidfiddler/ui/tabs/maid_stats.py +++ b/GUI/maidfiddler/ui/tabs/maid_stats.py @@ -1,7 +1,7 @@ from PyQt5.QtWidgets import QHeaderView, QTableWidgetItem, QLineEdit, QDoubleSpinBox, QSpinBox, QCheckBox, QWidget, QHBoxLayout, QGroupBox from PyQt5.QtCore import Qt, pyqtSignal from .ui_tab import UiTab -from maidfiddler.ui.qt_elements import NumberElement, TextElement +from maidfiddler.ui.qt_elements import NumberElement, TextElement, CheckboxElement from maidfiddler.util.translation import tr @@ -17,7 +17,8 @@ def __init__(self, ui): "uint": lambda: NumberElement(QSpinBox(), 0, 2**32), "int": lambda: NumberElement(QSpinBox()), "double": lambda: NumberElement(QDoubleSpinBox()), - "string": lambda: TextElement(QLineEdit()) + "string": lambda: TextElement(QLineEdit()), + "bool": lambda: CheckboxElement(QCheckBox()) } def update_ui(self): @@ -47,7 +48,11 @@ def update_ui(self): name = QTableWidgetItem(maid_prop) name.setWhatsThis(f"maid_props.{maid_prop}") line = self.type_generators[prop_type]() - line.qt_element.setStyleSheet("width: 15em;") + + if prop_type != "bool": + line.qt_element.setStyleSheet("width: 15em;") + else: + line.checkbox.setProperty("prop_name", maid_prop) checkbox = QCheckBox() widget = QWidget() @@ -144,6 +149,7 @@ def on_maid_selected(self): maid = self.maid_mgr.selected_maid for name, widgets in self.properties.items(): + print(f"Setting {name}") widgets[0].set_value(maid["properties"][name]) widgets[1].setCheckState( Qt.Checked if maid["prop_locks"][name] else Qt.Unchecked) diff --git a/GUI/translations/english.json b/GUI/translations/english.json index 3e98fe9..42abe88 100644 --- a/GUI/translations/english.json +++ b/GUI/translations/english.json @@ -208,7 +208,8 @@ "evaluation": "Evaluation", "totalEvaluations": "Total evaluations", "sales": "Sales", - "totalSales": "Total sales" + "totalSales": "Total sales", + "isNickNameCall": "Call by nickname" }, "maid_bonus_props": { "excite": "Excitement",