mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2025-12-08 22:13:30 +08:00
work in progress
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
## 更新日志
|
||||
* 1.0.1
|
||||
+ 修复了返回标题界面后设置按钮文本和提示信息不正确的问题
|
||||
+ 添加了一个补丁,修复了`矿物利用`升级到8000级以上时弹出警告的bug
|
||||
* 1.0.0
|
||||
+ 初始版本
|
||||
+ 从[MechaDronesTweaks](https://dsp.thunderstore.io/package/soarqin/MechaDronesTweaks/)和[CheatEnabler](https://dsp.thunderstore.io/package/soarqin/CheatEnabler/)移动了部分功能过来
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using BepInEx.Configuration;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
@@ -24,7 +25,7 @@ public class MySlider : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public static RectTransform CreateSlider(float x, float y, RectTransform parent, float value, float minValue, float maxValue, string format = "{0}", float width = 0f)
|
||||
public static MySlider CreateSlider(float x, float y, RectTransform parent, float value, float minValue, float maxValue, string format = "G", float width = 0f)
|
||||
{
|
||||
var optionWindow = UIRoot.instance.optionWindow;
|
||||
var src = optionWindow.audioVolumeComp;
|
||||
@@ -71,14 +72,14 @@ public class MySlider : MonoBehaviour
|
||||
sl.OnValueSet();
|
||||
sl.UpdateLabel();
|
||||
|
||||
return sl.rectTrans;
|
||||
return sl;
|
||||
}
|
||||
public void OnValueSet()
|
||||
{
|
||||
lock (this)
|
||||
{
|
||||
var sliderVal = _value;
|
||||
if (_value.Equals(slider.value)) return;
|
||||
if (sliderVal.Equals(slider.value)) return;
|
||||
if (sliderVal > slider.maxValue)
|
||||
{
|
||||
_value = sliderVal = slider.maxValue;
|
||||
|
||||
Reference in New Issue
Block a user