Font, Softer Breast (#19)
* add breast parameter editer * add pre-config, add scale set * support disable replace font
This commit is contained in:
parent
ca0e6e6a9a
commit
f5a88a9127
@ -323,6 +323,7 @@ namespace GakumasLocal::HookMain {
|
||||
|
||||
std::unordered_set<void*> updatedFontPtrs{};
|
||||
void UpdateFont(void* TMP_Text_this) {
|
||||
if (!Config::replaceFont) return;
|
||||
static auto get_font = Il2cppUtils::GetMethod("Unity.TextMeshPro.dll",
|
||||
"TMPro", "TMP_Text", "get_font");
|
||||
static auto set_font = Il2cppUtils::GetMethod("Unity.TextMeshPro.dll",
|
||||
@ -341,6 +342,7 @@ namespace GakumasLocal::HookMain {
|
||||
updatedFontPtrs.emplace(fontAsset);
|
||||
UpdateFontAssetData->Invoke<void>(fontAsset);
|
||||
}
|
||||
if (updatedFontPtrs.size() > 200) updatedFontPtrs.clear();
|
||||
}
|
||||
set_font->Invoke<void>(TMP_Text_this, fontAsset);
|
||||
}
|
||||
@ -644,6 +646,11 @@ namespace GakumasLocal::HookMain {
|
||||
}
|
||||
|
||||
DEFINE_HOOK(void, CampusActorController_LateUpdate, (void* _this, void* mtd)) {
|
||||
static auto CampusActorController_klass = Il2cppUtils::GetClass("campus-submodule.Runtime.dll",
|
||||
"Campus.Common", "CampusActorController");
|
||||
static auto rootBody_field = CampusActorController_klass->Get<UnityResolve::Field>("_rootBody");
|
||||
static auto parentKlass = UnityResolve::Invoke<void*>("il2cpp_class_get_parent", CampusActorController_klass->address);
|
||||
|
||||
if (!Config::enableFreeCamera || (GKCamera::GetCameraMode() == GKCamera::CameraMode::FREE)) {
|
||||
if (needRestoreHides) {
|
||||
needRestoreHides = false;
|
||||
@ -653,10 +660,6 @@ namespace GakumasLocal::HookMain {
|
||||
return CampusActorController_LateUpdate_Orig(_this, mtd);
|
||||
}
|
||||
|
||||
static auto CampusActorController_klass = Il2cppUtils::GetClass("campus-submodule.Runtime.dll",
|
||||
"Campus.Common", "CampusActorController");
|
||||
static auto rootBody_field = CampusActorController_klass->Get<UnityResolve::Field>("_rootBody");
|
||||
static auto parentKlass = UnityResolve::Invoke<void*>("il2cpp_class_get_parent", CampusActorController_klass->address);
|
||||
static auto GetHumanBodyBoneTransform_mtd = Il2cppUtils::il2cpp_class_get_method_from_name(parentKlass, "GetHumanBodyBoneTransform", 1);
|
||||
static auto GetHumanBodyBoneTransform = reinterpret_cast<UnityResolve::UnityType::Transform* (*)(void*, int)>(
|
||||
GetHumanBodyBoneTransform_mtd->methodPointer
|
||||
@ -711,6 +714,90 @@ namespace GakumasLocal::HookMain {
|
||||
CampusActorController_LateUpdate_Orig(_this, mtd);
|
||||
}
|
||||
|
||||
void UpdateSwingBreastBonesData(void* initializeData) {
|
||||
if (!Config::enableBreastParam) return;
|
||||
static auto CampusActorAnimationInitializeData_klass = Il2cppUtils::GetClass("campus-submodule.Runtime.dll", "ActorAnimation",
|
||||
"CampusActorAnimationInitializeData");
|
||||
static auto ActorSwingBreastBone_klass = Il2cppUtils::GetClass("ActorAnimation.Runtime.dll", "ActorAnimation",
|
||||
"ActorSwingBreastBone");
|
||||
static auto LimitInfo_klass = Il2cppUtils::GetClass("ActorAnimation.Runtime.dll", "ActorAnimation",
|
||||
"LimitInfo");
|
||||
|
||||
static auto Data_swingBreastBones_field = CampusActorAnimationInitializeData_klass->Get<UnityResolve::Field>("swingBreastBones");
|
||||
static auto damping_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("damping");
|
||||
static auto stiffness_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("stiffness");
|
||||
static auto spring_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("spring");
|
||||
static auto pendulum_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("pendulum");
|
||||
static auto pendulumRange_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("pendulumRange");
|
||||
static auto average_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("average");
|
||||
static auto rootWeight_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("rootWeight");
|
||||
static auto useArmCorrection_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("useArmCorrection");
|
||||
static auto isDirty_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("<isDirty>k__BackingField");
|
||||
static auto leftBreast_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("leftBreast");
|
||||
static auto rightBreast_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("rightBreast");
|
||||
static auto leftBreastEnd_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("leftBreastEnd");
|
||||
static auto rightBreastEnd_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("rightBreastEnd");
|
||||
static auto limitInfo_field = ActorSwingBreastBone_klass->Get<UnityResolve::Field>("limitInfo");
|
||||
|
||||
static auto limitInfo_useLimit_field = LimitInfo_klass->Get<UnityResolve::Field>("useLimit");
|
||||
|
||||
auto swingBreastBones = Il2cppUtils::ClassGetFieldValue
|
||||
<UnityResolve::UnityType::List<UnityResolve::UnityType::MonoBehaviour*>*>(initializeData, Data_swingBreastBones_field);
|
||||
|
||||
auto boneArr = swingBreastBones->ToArray();
|
||||
for (int i = 0; i < boneArr->max_length; i++) {
|
||||
auto bone = boneArr->At(i);
|
||||
if (!bone) continue;
|
||||
|
||||
auto damping = Il2cppUtils::ClassGetFieldValue<float>(bone, damping_field);
|
||||
auto stiffness = Il2cppUtils::ClassGetFieldValue<float>(bone, stiffness_field);
|
||||
auto spring = Il2cppUtils::ClassGetFieldValue<float>(bone, spring_field);
|
||||
auto pendulum = Il2cppUtils::ClassGetFieldValue<float>(bone, pendulum_field);
|
||||
auto pendulumRange = Il2cppUtils::ClassGetFieldValue<float>(bone, pendulumRange_field);
|
||||
auto average = Il2cppUtils::ClassGetFieldValue<float>(bone, average_field);
|
||||
auto rootWeight = Il2cppUtils::ClassGetFieldValue<float>(bone, rootWeight_field);
|
||||
auto useArmCorrection = Il2cppUtils::ClassGetFieldValue<bool>(bone, useArmCorrection_field);
|
||||
auto isDirty = Il2cppUtils::ClassGetFieldValue<bool>(bone, isDirty_field);
|
||||
|
||||
auto limitInfo = Il2cppUtils::ClassGetFieldValue<void*>(bone, limitInfo_field);
|
||||
auto useLimit = Il2cppUtils::ClassGetFieldValue<int>(limitInfo, limitInfo_useLimit_field);
|
||||
|
||||
if (Config::bUseScale) {
|
||||
auto leftBreast = Il2cppUtils::ClassGetFieldValue<UnityResolve::UnityType::Transform*>(bone, leftBreast_field);
|
||||
auto rightBreast = Il2cppUtils::ClassGetFieldValue<UnityResolve::UnityType::Transform*>(bone, rightBreast_field);
|
||||
auto leftBreastEnd = Il2cppUtils::ClassGetFieldValue<UnityResolve::UnityType::Transform*>(bone, leftBreastEnd_field);
|
||||
auto rightBreastEnd = Il2cppUtils::ClassGetFieldValue<UnityResolve::UnityType::Transform*>(bone, rightBreastEnd_field);
|
||||
|
||||
const auto setScale = UnityResolve::UnityType::Vector3(Config::bScale, Config::bScale, Config::bScale);
|
||||
leftBreast->SetLocalScale(setScale);
|
||||
rightBreast->SetLocalScale(setScale);
|
||||
leftBreastEnd->SetLocalScale(setScale);
|
||||
rightBreastEnd->SetLocalScale(setScale);
|
||||
}
|
||||
|
||||
Log::DebugFmt("orig bone: damping: %f, stiffness: %f, spring: %f, pendulum: %f, "
|
||||
"pendulumRange: %f, average: %f, rootWeight: %f, useLimit: %d, useArmCorrection: %d, isDirty: %d",
|
||||
damping, stiffness, spring, pendulum, pendulumRange, average, rootWeight, useLimit, useArmCorrection, isDirty);
|
||||
|
||||
Il2cppUtils::ClassSetFieldValue(limitInfo, limitInfo_useLimit_field, Config::bUseLimit);
|
||||
Il2cppUtils::ClassSetFieldValue(bone, damping_field, Config::bDamping);
|
||||
Il2cppUtils::ClassSetFieldValue(bone, stiffness_field, Config::bStiffness);
|
||||
Il2cppUtils::ClassSetFieldValue(bone, spring_field, Config::bSpring);
|
||||
Il2cppUtils::ClassSetFieldValue(bone, pendulum_field, Config::bPendulum);
|
||||
Il2cppUtils::ClassSetFieldValue(bone, pendulumRange_field, Config::bPendulumRange);
|
||||
Il2cppUtils::ClassSetFieldValue(bone, average_field, Config::bAverage);
|
||||
Il2cppUtils::ClassSetFieldValue(bone, rootWeight_field, Config::bRootWeight);
|
||||
Il2cppUtils::ClassSetFieldValue(bone, useArmCorrection_field, Config::bUseArmCorrection);
|
||||
// Il2cppUtils::ClassSetFieldValue(bone, isDirty_field, Config::bIsDirty);
|
||||
}
|
||||
// Log::DebugFmt("\n");
|
||||
}
|
||||
|
||||
DEFINE_HOOK(void, CampusActorAnimation_Setup, (void* _this, void* rootTrans, void* initializeData)) {
|
||||
UpdateSwingBreastBonesData(initializeData);
|
||||
return CampusActorAnimation_Setup_Orig(_this, rootTrans, initializeData);
|
||||
}
|
||||
|
||||
void StartInjectFunctions() {
|
||||
const auto hookInstaller = Plugin::GetInstance().GetHookInstaller();
|
||||
UnityResolve::Init(xdl_open(hookInstaller->m_il2cppLibraryPath.c_str(), RTLD_NOW), UnityResolve::Mode::Il2Cpp);
|
||||
@ -797,6 +884,10 @@ namespace GakumasLocal::HookMain {
|
||||
Log::DebugFmt("CampusActorController.%s at %p", i->name.c_str(), i->function);
|
||||
}*/
|
||||
|
||||
ADD_HOOK(CampusActorAnimation_Setup,
|
||||
Il2cppUtils::GetMethodPointer("campus-submodule.Runtime.dll", "Campus.Common",
|
||||
"CampusActorAnimation", "Setup"));
|
||||
|
||||
ADD_HOOK(CampusQualityManager_set_TargetFrameRate,
|
||||
Il2cppUtils::GetMethodPointer("campus-submodule.Runtime.dll", "Campus.Common",
|
||||
"CampusQualityManager", "set_TargetFrameRate"));
|
||||
|
@ -157,7 +157,7 @@ namespace Il2cppUtils {
|
||||
|
||||
template <typename RType>
|
||||
auto ClassSetFieldValue(void* obj, UnityResolve::Field* field, RType value) -> void {
|
||||
return *reinterpret_cast<RType*>(reinterpret_cast<uintptr_t>(obj) + field->offset) = value;
|
||||
*reinterpret_cast<RType*>(reinterpret_cast<uintptr_t>(obj) + field->offset) = value;
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,6 +7,7 @@ namespace GakumasLocal::Config {
|
||||
|
||||
bool dbgMode = false;
|
||||
bool enabled = true;
|
||||
bool replaceFont = true;
|
||||
bool forceExportResource = true;
|
||||
bool textTest = false;
|
||||
int gameOrientation = 0;
|
||||
@ -27,6 +28,19 @@ namespace GakumasLocal::Config {
|
||||
int reflectionQualityLevel = 4;
|
||||
int lodQualityLevel = 4;
|
||||
|
||||
bool enableBreastParam = false;
|
||||
int bUseLimit = 1;
|
||||
float bDamping = 0.33f;
|
||||
float bStiffness = 0.08f;
|
||||
float bSpring = 1.0f;
|
||||
float bPendulum = 0.055f;
|
||||
float bPendulumRange = 0.15f;
|
||||
float bAverage = 0.20f;
|
||||
float bRootWeight = 0.5f;
|
||||
bool bUseArmCorrection = true;
|
||||
bool bUseScale = false;
|
||||
float bScale = 1.0f;
|
||||
|
||||
void LoadConfig(const std::string& configStr) {
|
||||
try {
|
||||
const auto config = nlohmann::json::parse(configStr);
|
||||
@ -35,6 +49,7 @@ namespace GakumasLocal::Config {
|
||||
|
||||
GetConfigItem(dbgMode);
|
||||
GetConfigItem(enabled);
|
||||
GetConfigItem(replaceFont);
|
||||
GetConfigItem(forceExportResource);
|
||||
GetConfigItem(gameOrientation);
|
||||
GetConfigItem(textTest);
|
||||
@ -52,6 +67,18 @@ namespace GakumasLocal::Config {
|
||||
GetConfigItem(maxBufferPixel);
|
||||
GetConfigItem(reflectionQualityLevel);
|
||||
GetConfigItem(lodQualityLevel);
|
||||
GetConfigItem(enableBreastParam);
|
||||
GetConfigItem(bUseLimit);
|
||||
GetConfigItem(bDamping);
|
||||
GetConfigItem(bStiffness);
|
||||
GetConfigItem(bSpring);
|
||||
GetConfigItem(bPendulum);
|
||||
GetConfigItem(bPendulumRange);
|
||||
GetConfigItem(bAverage);
|
||||
GetConfigItem(bRootWeight);
|
||||
GetConfigItem(bUseArmCorrection);
|
||||
GetConfigItem(bUseScale);
|
||||
GetConfigItem(bScale);
|
||||
|
||||
}
|
||||
catch (std::exception& e) {
|
||||
|
@ -5,6 +5,7 @@ namespace GakumasLocal::Config {
|
||||
|
||||
extern bool dbgMode;
|
||||
extern bool enabled;
|
||||
extern bool replaceFont;
|
||||
extern bool forceExportResource;
|
||||
extern int gameOrientation;
|
||||
extern bool textTest;
|
||||
@ -26,5 +27,18 @@ namespace GakumasLocal::Config {
|
||||
extern int reflectionQualityLevel;
|
||||
extern int lodQualityLevel;
|
||||
|
||||
extern bool enableBreastParam;
|
||||
extern int bUseLimit;
|
||||
extern float bDamping;
|
||||
extern float bStiffness;
|
||||
extern float bSpring;
|
||||
extern float bPendulum;
|
||||
extern float bPendulumRange;
|
||||
extern float bAverage;
|
||||
extern float bRootWeight;
|
||||
extern bool bUseArmCorrection;
|
||||
extern bool bUseScale;
|
||||
extern float bScale;
|
||||
|
||||
void LoadConfig(const std::string& configStr);
|
||||
}
|
||||
|
@ -0,0 +1,382 @@
|
||||
package io.github.chinosk.gakumas.localify
|
||||
|
||||
import android.view.KeyEvent
|
||||
import io.github.chinosk.gakumas.localify.databinding.ActivityMainBinding
|
||||
|
||||
|
||||
interface ConfigListener {
|
||||
fun onClickStartGame()
|
||||
fun onEnabledChanged(value: Boolean)
|
||||
fun onForceExportResourceChanged(value: Boolean)
|
||||
fun onTextTestChanged(value: Boolean)
|
||||
fun onReplaceFontChanged(value: Boolean)
|
||||
fun onEnableFreeCameraChanged(value: Boolean)
|
||||
fun onTargetFpsChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onUnlockAllLiveChanged(value: Boolean)
|
||||
fun onLiveCustomeDressChanged(value: Boolean)
|
||||
fun onLiveCustomeHeadIdChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onLiveCustomeCostumeIdChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onUseCustomeGraphicSettingsChanged(value: Boolean)
|
||||
fun onRenderScaleChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onQualitySettingsLevelChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onVolumeIndexChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onMaxBufferPixelChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onChangePresetQuality(level: Int)
|
||||
fun onReflectionQualityLevelChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onLodQualityLevelChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onGameOrientationChanged(checkedId: Int)
|
||||
fun onDumpTextChanged(value: Boolean)
|
||||
|
||||
fun onEnableBreastParamChanged(value: Boolean)
|
||||
fun onBDampingChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onBStiffnessChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onBSpringChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onBPendulumChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onBPendulumRangeChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onBAverageChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onBRootWeightChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onBUseLimitChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onBScaleChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onBUseArmCorrectionChanged(value: Boolean)
|
||||
fun onBUseScaleChanged(value: Boolean)
|
||||
fun onBClickPresetChanged(index: Int)
|
||||
}
|
||||
|
||||
|
||||
interface ConfigUpdateListener: ConfigListener {
|
||||
var binding: ActivityMainBinding
|
||||
|
||||
fun pushKeyEvent(event: KeyEvent): Boolean
|
||||
fun getConfigContent(): String
|
||||
fun checkConfigAndUpdateView()
|
||||
fun saveConfig()
|
||||
|
||||
|
||||
override fun onEnabledChanged(value: Boolean) {
|
||||
binding.config!!.enabled = value
|
||||
saveConfig()
|
||||
pushKeyEvent(KeyEvent(1145, 29))
|
||||
}
|
||||
|
||||
override fun onForceExportResourceChanged(value: Boolean) {
|
||||
binding.config!!.forceExportResource = value
|
||||
saveConfig()
|
||||
pushKeyEvent(KeyEvent(1145, 30))
|
||||
}
|
||||
|
||||
override fun onReplaceFontChanged(value: Boolean) {
|
||||
binding.config!!.replaceFont = value
|
||||
saveConfig()
|
||||
pushKeyEvent(KeyEvent(1145, 30))
|
||||
}
|
||||
|
||||
override fun onTextTestChanged(value: Boolean) {
|
||||
binding.config!!.textTest = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onDumpTextChanged(value: Boolean) {
|
||||
binding.config!!.dumpText = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onEnableFreeCameraChanged(value: Boolean) {
|
||||
binding.config!!.enableFreeCamera = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onUnlockAllLiveChanged(value: Boolean) {
|
||||
binding.config!!.unlockAllLive = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onTargetFpsChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
try {
|
||||
val valueStr = s.toString()
|
||||
|
||||
val value = if (valueStr == "") {
|
||||
0
|
||||
} else {
|
||||
valueStr.toInt()
|
||||
}
|
||||
binding.config!!.targetFrameRate = value
|
||||
saveConfig()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
override fun onLiveCustomeDressChanged(value: Boolean) {
|
||||
binding.config!!.enableLiveCustomeDress = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onLiveCustomeCostumeIdChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.liveCustomeCostumeId = s.toString()
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onUseCustomeGraphicSettingsChanged(value: Boolean) {
|
||||
binding.config!!.useCustomeGraphicSettings = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onRenderScaleChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.renderScale = try {
|
||||
s.toString().toFloat()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0.0f
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onQualitySettingsLevelChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.qualitySettingsLevel = try {
|
||||
s.toString().toInt()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onVolumeIndexChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.volumeIndex = try {
|
||||
s.toString().toInt()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onMaxBufferPixelChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.maxBufferPixel = try {
|
||||
s.toString().toInt()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onLiveCustomeHeadIdChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.liveCustomeHeadId = s.toString()
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onReflectionQualityLevelChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.reflectionQualityLevel = try {
|
||||
val value = s.toString().toInt()
|
||||
if (value > 5) 5 else value
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onLodQualityLevelChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.lodQualityLevel = try {
|
||||
val value = s.toString().toInt()
|
||||
if (value > 5) 5 else value
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onChangePresetQuality(level: Int) {
|
||||
when (level) {
|
||||
0 -> {
|
||||
binding.config!!.renderScale = 0.5f
|
||||
binding.config!!.qualitySettingsLevel = 1
|
||||
binding.config!!.volumeIndex = 0
|
||||
binding.config!!.maxBufferPixel = 1024
|
||||
binding.config!!.lodQualityLevel = 1
|
||||
binding.config!!.reflectionQualityLevel = 1
|
||||
}
|
||||
1 -> {
|
||||
binding.config!!.renderScale = 0.59f
|
||||
binding.config!!.qualitySettingsLevel = 1
|
||||
binding.config!!.volumeIndex = 1
|
||||
binding.config!!.maxBufferPixel = 1440
|
||||
binding.config!!.lodQualityLevel = 2
|
||||
binding.config!!.reflectionQualityLevel = 2
|
||||
}
|
||||
2 -> {
|
||||
binding.config!!.renderScale = 0.67f
|
||||
binding.config!!.qualitySettingsLevel = 2
|
||||
binding.config!!.volumeIndex = 2
|
||||
binding.config!!.maxBufferPixel = 2538
|
||||
binding.config!!.lodQualityLevel = 3
|
||||
binding.config!!.reflectionQualityLevel = 3
|
||||
}
|
||||
3 -> {
|
||||
binding.config!!.renderScale = 0.77f
|
||||
binding.config!!.qualitySettingsLevel = 3
|
||||
binding.config!!.volumeIndex = 3
|
||||
binding.config!!.maxBufferPixel = 3384
|
||||
binding.config!!.lodQualityLevel = 4
|
||||
binding.config!!.reflectionQualityLevel = 4
|
||||
}
|
||||
4 -> {
|
||||
binding.config!!.renderScale = 1.0f
|
||||
binding.config!!.qualitySettingsLevel = 5
|
||||
binding.config!!.volumeIndex = 4
|
||||
binding.config!!.maxBufferPixel = 8190
|
||||
binding.config!!.lodQualityLevel = 5
|
||||
binding.config!!.reflectionQualityLevel = 5
|
||||
}
|
||||
}
|
||||
checkConfigAndUpdateView()
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onGameOrientationChanged(checkedId: Int) {
|
||||
when (checkedId) {
|
||||
R.id.radioButtonGameDefault -> binding.config!!.gameOrientation = 0
|
||||
R.id.radioButtonGamePortrait -> binding.config!!.gameOrientation = 1
|
||||
R.id.radioButtonGameLandscape -> binding.config!!.gameOrientation = 2
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onEnableBreastParamChanged(value: Boolean) {
|
||||
binding.config!!.enableBreastParam = value
|
||||
saveConfig()
|
||||
checkConfigAndUpdateView()
|
||||
}
|
||||
|
||||
override fun onBUseArmCorrectionChanged(value: Boolean) {
|
||||
binding.config!!.bUseArmCorrection = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onBUseScaleChanged(value: Boolean) {
|
||||
binding.config!!.bUseScale = value
|
||||
saveConfig()
|
||||
checkConfigAndUpdateView()
|
||||
}
|
||||
|
||||
override fun onBDampingChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.bDamping = try {
|
||||
s.toString().toFloat()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0f
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onBStiffnessChanged(s: CharSequence, start: Int, before: Int, count: Int){
|
||||
binding.config!!.bStiffness = try {
|
||||
s.toString().toFloat()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0f
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onBSpringChanged(s: CharSequence, start: Int, before: Int, count: Int){
|
||||
binding.config!!.bSpring = try {
|
||||
s.toString().toFloat()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0f
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onBPendulumChanged(s: CharSequence, start: Int, before: Int, count: Int){
|
||||
binding.config!!.bPendulum = try {
|
||||
s.toString().toFloat()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0f
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onBPendulumRangeChanged(s: CharSequence, start: Int, before: Int, count: Int){
|
||||
binding.config!!.bPendulumRange = try {
|
||||
s.toString().toFloat()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0f
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onBAverageChanged(s: CharSequence, start: Int, before: Int, count: Int){
|
||||
binding.config!!.bAverage = try {
|
||||
s.toString().toFloat()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0f
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onBRootWeightChanged(s: CharSequence, start: Int, before: Int, count: Int){
|
||||
binding.config!!.bRootWeight = try {
|
||||
s.toString().toFloat()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0f
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onBUseLimitChanged(s: CharSequence, start: Int, before: Int, count: Int){
|
||||
binding.config!!.bUseLimit = try {
|
||||
s.toString().toInt()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onBScaleChanged(s: CharSequence, start: Int, before: Int, count: Int){
|
||||
binding.config!!.bScale = try {
|
||||
s.toString().toFloat()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0f
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
override fun onBClickPresetChanged(index: Int) {
|
||||
val setData: FloatArray = when (index) {
|
||||
// 0.33, 0.08, 0.7, 0.12, 0.25, 0.2, 0.8, 0, noUseArm 啥玩意
|
||||
0 -> floatArrayOf(0.33f, 0.07f, 0.7f, 0.06f, 0.25f, 0.2f, 0.5f, 1f)
|
||||
1 -> floatArrayOf(0.365f, 0.06f, 0.62f, 0.07f, 0.25f, 0.2f, 0.5f, 1f)
|
||||
2 -> floatArrayOf(0.4f, 0.065f, 0.55f, 0.075f, 0.25f, 0.2f, 0.5f, 1f)
|
||||
3 -> floatArrayOf(0.4f, 0.065f, 0.55f, 0.075f, 0.25f, 0.2f, 0.5f, 0f)
|
||||
4 -> floatArrayOf(0.4f, 0.06f, 0.4f, 0.075f, 0.55f, 0.2f, 0.8f, 0f)
|
||||
|
||||
5 -> floatArrayOf(0.33f, 0.08f, 0.8f, 0.12f, 0.55f, 0.2f, 1.0f, 0f)
|
||||
|
||||
else -> floatArrayOf(0.33f, 0.08f, 1.0f, 0.055f, 0.15f, 0.2f, 0.5f, 1f)
|
||||
}
|
||||
|
||||
binding.config!!.bDamping = setData[0]
|
||||
binding.config!!.bStiffness = setData[1]
|
||||
binding.config!!.bSpring = setData[2]
|
||||
binding.config!!.bPendulum = setData[3]
|
||||
binding.config!!.bPendulumRange = setData[4]
|
||||
binding.config!!.bAverage = setData[5]
|
||||
binding.config!!.bRootWeight = setData[6]
|
||||
binding.config!!.bUseLimit = setData[7].toInt()
|
||||
binding.config!!.bUseArmCorrection = true
|
||||
|
||||
checkConfigAndUpdateView()
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
}
|
@ -23,31 +23,8 @@ import io.github.chinosk.gakumas.localify.models.GakumasConfig
|
||||
import java.io.File
|
||||
|
||||
|
||||
interface ConfigListener {
|
||||
fun onClickStartGame()
|
||||
fun onEnabledChanged(value: Boolean)
|
||||
fun onForceExportResourceChanged(value: Boolean)
|
||||
fun onTextTestChanged(value: Boolean)
|
||||
fun onEnableFreeCameraChanged(value: Boolean)
|
||||
fun onTargetFpsChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onUnlockAllLiveChanged(value: Boolean)
|
||||
fun onLiveCustomeDressChanged(value: Boolean)
|
||||
fun onLiveCustomeHeadIdChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onLiveCustomeCostumeIdChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onUseCustomeGraphicSettingsChanged(value: Boolean)
|
||||
fun onRenderScaleChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onQualitySettingsLevelChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onVolumeIndexChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onMaxBufferPixelChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onChangePresetQuality(level: Int)
|
||||
fun onReflectionQualityLevelChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onLodQualityLevelChanged(s: CharSequence, start: Int, before: Int, count: Int)
|
||||
fun onGameOrientationChanged(checkedId: Int)
|
||||
fun onDumpTextChanged(value: Boolean)
|
||||
}
|
||||
|
||||
class MainActivity : AppCompatActivity(), ConfigListener {
|
||||
private lateinit var binding: ActivityMainBinding
|
||||
class MainActivity : AppCompatActivity(), ConfigUpdateListener {
|
||||
override lateinit var binding: ActivityMainBinding
|
||||
private val TAG = "GakumasLocalify"
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
@ -80,6 +57,15 @@ class MainActivity : AppCompatActivity(), ConfigListener {
|
||||
})
|
||||
}
|
||||
|
||||
override fun onClickStartGame() {
|
||||
val intent = Intent().apply {
|
||||
setClassName("com.bandainamcoent.idolmaster_gakuen", "com.google.firebase.MessagingUnityPlayerActivity")
|
||||
putExtra("gkmsData", getConfigContent())
|
||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
}
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
private fun onScrollChanged() {
|
||||
val fab: FloatingActionButton = findViewById(R.id.fabStartGame)
|
||||
val startGameButton: MaterialButton = findViewById(R.id.StartGameButton)
|
||||
@ -108,7 +94,7 @@ class MainActivity : AppCompatActivity(), ConfigListener {
|
||||
Toast.makeText(this, message, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
private fun getConfigContent(): String {
|
||||
override fun getConfigContent(): String {
|
||||
val configFile = File(filesDir, "gkms-config.json")
|
||||
return if (configFile.exists()) {
|
||||
configFile.readText()
|
||||
@ -119,6 +105,11 @@ class MainActivity : AppCompatActivity(), ConfigListener {
|
||||
}
|
||||
}
|
||||
|
||||
override fun saveConfig() {
|
||||
val configFile = File(filesDir, "gkms-config.json")
|
||||
configFile.writeText(Gson().toJson(binding.config!!))
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun showVersion() {
|
||||
val titleLabel = findViewById<TextView>(R.id.textViewTitle)
|
||||
@ -150,212 +141,15 @@ class MainActivity : AppCompatActivity(), ConfigListener {
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
private fun saveConfig() {
|
||||
val configFile = File(filesDir, "gkms-config.json")
|
||||
configFile.writeText(Gson().toJson(binding.config!!))
|
||||
}
|
||||
|
||||
override fun onEnabledChanged(value: Boolean) {
|
||||
binding.config!!.enabled = value
|
||||
saveConfig()
|
||||
dispatchKeyEvent(KeyEvent(1145, 29))
|
||||
}
|
||||
|
||||
override fun onForceExportResourceChanged(value: Boolean) {
|
||||
binding.config!!.forceExportResource = value
|
||||
saveConfig()
|
||||
dispatchKeyEvent(KeyEvent(1145, 30))
|
||||
}
|
||||
|
||||
override fun onTextTestChanged(value: Boolean) {
|
||||
binding.config!!.textTest = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onDumpTextChanged(value: Boolean) {
|
||||
binding.config!!.dumpText = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onEnableFreeCameraChanged(value: Boolean) {
|
||||
binding.config!!.enableFreeCamera = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onUnlockAllLiveChanged(value: Boolean) {
|
||||
binding.config!!.unlockAllLive = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onTargetFpsChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
try {
|
||||
val valueStr = s.toString()
|
||||
|
||||
val value = if (valueStr == "") {
|
||||
0
|
||||
} else {
|
||||
valueStr.toInt()
|
||||
}
|
||||
binding.config!!.targetFrameRate = value
|
||||
saveConfig()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
override fun onLiveCustomeDressChanged(value: Boolean) {
|
||||
binding.config!!.enableLiveCustomeDress = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onLiveCustomeCostumeIdChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.liveCustomeCostumeId = s.toString()
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onUseCustomeGraphicSettingsChanged(value: Boolean) {
|
||||
binding.config!!.useCustomeGraphicSettings = value
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onRenderScaleChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.renderScale = try {
|
||||
s.toString().toFloat()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0.0f
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onQualitySettingsLevelChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.qualitySettingsLevel = try {
|
||||
s.toString().toInt()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onVolumeIndexChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.volumeIndex = try {
|
||||
s.toString().toInt()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onMaxBufferPixelChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.maxBufferPixel = try {
|
||||
s.toString().toInt()
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onLiveCustomeHeadIdChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.liveCustomeHeadId = s.toString()
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onClickStartGame() {
|
||||
val intent = Intent().apply {
|
||||
setClassName("com.bandainamcoent.idolmaster_gakuen", "com.google.firebase.MessagingUnityPlayerActivity")
|
||||
putExtra("gkmsData", getConfigContent())
|
||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
}
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
override fun onReflectionQualityLevelChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.reflectionQualityLevel = try {
|
||||
val value = s.toString().toInt()
|
||||
if (value > 5) 5 else value
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onLodQualityLevelChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||
binding.config!!.lodQualityLevel = try {
|
||||
val value = s.toString().toInt()
|
||||
if (value > 5) 5 else value
|
||||
}
|
||||
catch (e: Exception) {
|
||||
0
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onChangePresetQuality(level: Int) {
|
||||
when (level) {
|
||||
0 -> {
|
||||
binding.config!!.renderScale = 0.5f
|
||||
binding.config!!.qualitySettingsLevel = 1
|
||||
binding.config!!.volumeIndex = 0
|
||||
binding.config!!.maxBufferPixel = 1024
|
||||
binding.config!!.lodQualityLevel = 1
|
||||
binding.config!!.reflectionQualityLevel = 1
|
||||
}
|
||||
1 -> {
|
||||
binding.config!!.renderScale = 0.59f
|
||||
binding.config!!.qualitySettingsLevel = 1
|
||||
binding.config!!.volumeIndex = 1
|
||||
binding.config!!.maxBufferPixel = 1440
|
||||
binding.config!!.lodQualityLevel = 2
|
||||
binding.config!!.reflectionQualityLevel = 2
|
||||
}
|
||||
2 -> {
|
||||
binding.config!!.renderScale = 0.67f
|
||||
binding.config!!.qualitySettingsLevel = 2
|
||||
binding.config!!.volumeIndex = 2
|
||||
binding.config!!.maxBufferPixel = 2538
|
||||
binding.config!!.lodQualityLevel = 3
|
||||
binding.config!!.reflectionQualityLevel = 3
|
||||
}
|
||||
3 -> {
|
||||
binding.config!!.renderScale = 0.77f
|
||||
binding.config!!.qualitySettingsLevel = 3
|
||||
binding.config!!.volumeIndex = 3
|
||||
binding.config!!.maxBufferPixel = 3384
|
||||
binding.config!!.lodQualityLevel = 4
|
||||
binding.config!!.reflectionQualityLevel = 4
|
||||
}
|
||||
4 -> {
|
||||
binding.config!!.renderScale = 1.0f
|
||||
binding.config!!.qualitySettingsLevel = 5
|
||||
binding.config!!.volumeIndex = 4
|
||||
binding.config!!.maxBufferPixel = 8190
|
||||
binding.config!!.lodQualityLevel = 5
|
||||
binding.config!!.reflectionQualityLevel = 5
|
||||
}
|
||||
}
|
||||
checkConfigAndUpdateView()
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
override fun onGameOrientationChanged(checkedId: Int) {
|
||||
when (checkedId) {
|
||||
R.id.radioButtonGameDefault -> binding.config!!.gameOrientation = 0
|
||||
R.id.radioButtonGamePortrait -> binding.config!!.gameOrientation = 1
|
||||
R.id.radioButtonGameLandscape -> binding.config!!.gameOrientation = 2
|
||||
}
|
||||
saveConfig()
|
||||
}
|
||||
|
||||
private fun checkConfigAndUpdateView() {
|
||||
override fun checkConfigAndUpdateView() {
|
||||
binding.config = binding.config
|
||||
binding.notifyChange()
|
||||
}
|
||||
|
||||
override fun pushKeyEvent(event: KeyEvent): Boolean {
|
||||
return dispatchKeyEvent(event)
|
||||
}
|
||||
|
||||
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
|
||||
// Log.d(TAG, "${event.keyCode}, ${event.action}")
|
||||
if (MainKeyEventDispatcher.checkDbgKey(event.keyCode, event.action)) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
package io.github.chinosk.gakumas.localify.models
|
||||
|
||||
import androidx.databinding.BaseObservable
|
||||
|
||||
data class GakumasConfig (
|
||||
var dbgMode: Boolean = false,
|
||||
var enabled: Boolean = true,
|
||||
var replaceFont: Boolean = true,
|
||||
var textTest: Boolean = false,
|
||||
var dumpText: Boolean = false,
|
||||
var gameOrientation: Int = 0,
|
||||
@ -23,4 +23,17 @@ data class GakumasConfig (
|
||||
var maxBufferPixel: Int = 3384,
|
||||
var reflectionQualityLevel: Int = 4, // 0~5
|
||||
var lodQualityLevel: Int = 4, // 0~5
|
||||
|
||||
var enableBreastParam: Boolean = false,
|
||||
var bUseLimit: Int = 1,
|
||||
var bDamping: Float = 0.33f,
|
||||
var bStiffness: Float = 0.08f,
|
||||
var bSpring: Float = 1.0f,
|
||||
var bPendulum: Float = 0.055f,
|
||||
var bPendulumRange: Float = 0.15f,
|
||||
var bAverage: Float = 0.20f,
|
||||
var bRootWeight: Float = 0.5f,
|
||||
var bUseArmCorrection: Boolean = true,
|
||||
var bUseScale: Boolean = false,
|
||||
var bScale: Float = 1.0f
|
||||
)
|
||||
|
@ -77,6 +77,19 @@
|
||||
android:text="@string/enable_plugin" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/replaceFontSwitch"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:checked="@={config.replaceFont}"
|
||||
android:onCheckedChanged="@{(view, value) -> listener.onReplaceFontChanged(value)}"
|
||||
android:text="@string/replace_font" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
@ -587,6 +600,385 @@
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="4sp"
|
||||
android:background="@drawable/table_row_border">
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="10sp"
|
||||
android:paddingRight="10sp"
|
||||
android:paddingBottom="10sp"
|
||||
android:stretchColumns="0">
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:id="@+id/SwitchEnableBreastParam"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:checked="@={config.enableBreastParam}"
|
||||
android:onCheckedChanged="@{(view, value) -> listener.onEnableBreastParamChanged(value)}"
|
||||
android:text="@string/enable_breast_param" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="@{config.enableBreastParam ? android.view.View.VISIBLE : android.view.View.GONE}">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_margin="1sp"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="1sp"
|
||||
android:onClick="@{() -> listener.onBClickPresetChanged(5)}"
|
||||
android:text="\??" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_margin="1sp"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="1sp"
|
||||
android:onClick="@{() -> listener.onBClickPresetChanged(4)}"
|
||||
android:text="+5" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_margin="1sp"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="1sp"
|
||||
android:onClick="@{() -> listener.onBClickPresetChanged(3)}"
|
||||
android:text="+4" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_margin="1sp"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="1sp"
|
||||
android:onClick="@{() -> listener.onBClickPresetChanged(2)}"
|
||||
android:text="+3" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:minWidth="1sp"
|
||||
android:onClick="@{() -> listener.onBClickPresetChanged(1)}"
|
||||
android:text="+2" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="1sp"
|
||||
android:minWidth="1sp"
|
||||
android:onClick="@{() -> listener.onBClickPresetChanged(0)}"
|
||||
android:text="+1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="@{config.enableBreastParam ? android.view.View.VISIBLE : android.view.View.GONE}">
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="2">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/damping"
|
||||
app:boxBackgroundColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:onTextChanged="@{(s, st, b, a) -> listener.onBDampingChanged(s, st, b, a)}"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:text="@={`` + config.bDamping}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/stiffness"
|
||||
app:boxBackgroundColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:onTextChanged="@{(s, st, b, a) -> listener.onBStiffnessChanged(s, st, b, a)}"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:text="@={`` + config.bStiffness}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="2">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/spring"
|
||||
app:boxBackgroundColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:onTextChanged="@{(s, st, b, a) -> listener.onBSpringChanged(s, st, b, a)}"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:text="@={`` + config.bSpring}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/pendulum"
|
||||
app:boxBackgroundColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:onTextChanged="@{(s, st, b, a) -> listener.onBPendulumChanged(s, st, b, a)}"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:text="@={`` + config.bPendulum}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="2">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/pendulumrange"
|
||||
app:boxBackgroundColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:onTextChanged="@{(s, st, b, a) -> listener.onBPendulumRangeChanged(s, st, b, a)}"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:text="@={`` + config.bPendulumRange}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/average"
|
||||
app:boxBackgroundColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:onTextChanged="@{(s, st, b, a) -> listener.onBAverageChanged(s, st, b, a)}"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:text="@={`` + config.bAverage}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:weightSum="2">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/rootweight"
|
||||
app:boxBackgroundColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:onTextChanged="@{(s, st, b, a) -> listener.onBRootWeightChanged(s, st, b, a)}"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:text="@={`` + config.bRootWeight}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/uselimit_0_1"
|
||||
app:boxBackgroundColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="10"
|
||||
android:inputType="number"
|
||||
android:onTextChanged="@{(s, st, b, a) -> listener.onBUseLimitChanged(s, st, b, a)}"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:text="@={`` + config.bUseLimit}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="@{config.enableBreastParam ? android.view.View.VISIBLE : android.view.View.GONE}">
|
||||
|
||||
<TableLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="3"
|
||||
android:background="@android:color/transparent"
|
||||
android:hint="@string/breast_scale"
|
||||
app:boxBackgroundColor="@android:color/transparent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:ems="10"
|
||||
android:inputType="numberDecimal|numberSigned"
|
||||
android:onTextChanged="@{(s, st, b, a) -> listener.onBScaleChanged(s, st, b, a)}"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="0dp"
|
||||
android:paddingBottom="0dp"
|
||||
android:text="@={`` + config.bScale}" />
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
<com.google.android.material.checkbox.MaterialCheckBox
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:checked="@={config.bUseScale}"
|
||||
android:onCheckedChanged="@{(view, value) -> listener.onBUseScaleChanged(value)}"
|
||||
android:text="@string/usescale" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="@{config.enableBreastParam ? android.view.View.VISIBLE : android.view.View.GONE}">
|
||||
|
||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:checked="@={config.bUseArmCorrection}"
|
||||
android:onCheckedChanged="@{(view, value) -> listener.onBUseArmCorrectionChanged(value)}"
|
||||
android:text="@string/usearmcorrection" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
</TableLayout>
|
||||
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
@ -2,6 +2,7 @@
|
||||
<string name="app_name">Gakumas Localify</string>
|
||||
<string name="gakumas_localify">Gakumas Localify</string>
|
||||
<string name="enable_plugin">启用插件 (不可热重载)</string>
|
||||
<string name="replace_font">替换字体</string>
|
||||
<string name="enable_free_camera">启用自由视角(可热重载; 需使用实体键盘)</string>
|
||||
<string name="start_game">以上述配置启动游戏/重载配置</string>
|
||||
<string name="setFpsTitle">最大 FPS (0 为保持游戏原设置)</string>
|
||||
@ -23,4 +24,17 @@
|
||||
<string name="orientation_portrait">竖屏</string>
|
||||
<string name="orientation_landscape">横屏</string>
|
||||
<string name="orientation_lock">方向锁定</string>
|
||||
<string name="enable_breast_param">启用胸部参数</string>
|
||||
<string name="damping">阻尼 (Damping)</string>
|
||||
<string name="stiffness">刚度 (Stiffness)</string>
|
||||
<string name="spring">弹簧系数 (Spring)</string>
|
||||
<string name="pendulum">钟摆系数 (Pendulum)</string>
|
||||
<string name="pendulumrange">钟摆范围 (PendulumRange)</string>
|
||||
<string name="average">Average</string>
|
||||
<string name="rootweight">RootWeight</string>
|
||||
<string name="uselimit_0_1">限制范围 (0/1)</string>
|
||||
<string name="usearmcorrection">使用手臂矫正</string>
|
||||
<string name="isdirty">IsDirty</string>
|
||||
<string name="usescale">应用缩放</string>
|
||||
<string name="breast_scale">胸部缩放倍率</string>
|
||||
</resources>
|
@ -2,6 +2,7 @@
|
||||
<string name="app_name">Gakumas Localify</string>
|
||||
<string name="gakumas_localify">Gakumas Localify</string>
|
||||
<string name="enable_plugin">Enable Plugin (Not Hot Reloadable)</string>
|
||||
<string name="replace_font">Replace Font</string>
|
||||
<string name="enable_free_camera">Enable Free Camera</string>
|
||||
<string name="start_game">Start Game / Hot Reload Config</string>
|
||||
<string name="setFpsTitle">Max FPS (0 is Use Original Settings)</string>
|
||||
@ -23,5 +24,18 @@
|
||||
<string name="orientation_portrait">Portrait</string>
|
||||
<string name="orientation_landscape">Landscape</string>
|
||||
<string name="orientation_lock">Orientation Lock</string>
|
||||
<string name="enable_breast_param">Enable Breast Param</string>
|
||||
<string name="damping">Damping</string>
|
||||
<string name="stiffness">Stiffness</string>
|
||||
<string name="spring">Spring</string>
|
||||
<string name="pendulum">Pendulum</string>
|
||||
<string name="pendulumrange">Pendulum Range</string>
|
||||
<string name="average">Average</string>
|
||||
<string name="rootweight">Root Weight</string>
|
||||
<string name="uselimit_0_1">Use Limit (0/1)</string>
|
||||
<string name="usearmcorrection">Use Arm Correction</string>
|
||||
<string name="isdirty">IsDirty</string>
|
||||
<string name="usescale">Use Breast Scale</string>
|
||||
<string name="breast_scale">Breast Scale</string>
|
||||
|
||||
</resources>
|
Loading…
x
Reference in New Issue
Block a user