mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
This adds both player and enemy income multiplier options. Note that previously the AI was only getting 75% of their income. I've changed that to give them their full income by default since the player can now influence it.
21 lines
575 B
Python
21 lines
575 B
Python
from typing import Optional
|
|
|
|
from PySide2.QtWidgets import QSpinBox
|
|
|
|
|
|
class TenthsSpinner(QSpinBox):
|
|
def __init__(self, minimum: Optional[int] = None,
|
|
maximum: Optional[int] = None,
|
|
initial: Optional[int] = None) -> None:
|
|
super().__init__()
|
|
|
|
if minimum is not None:
|
|
self.setMinimum(minimum)
|
|
if maximum is not None:
|
|
self.setMaximum(maximum)
|
|
if initial is not None:
|
|
self.setValue(initial)
|
|
|
|
def textFromValue(self, val: int) -> str:
|
|
return f"X {val / 10:.1f}"
|