diff --git a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerMain.kt b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerMain.kt index 5cf96b0ec..c03a2e83d 100644 --- a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerMain.kt +++ b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerMain.kt @@ -23,6 +23,7 @@ import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Check +import androidx.compose.material.icons.filled.Delete import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.RadioButton @@ -90,9 +91,9 @@ fun SkillMakerMain( val currentIndex by vm.currentIndex ButtonWithIcon( - text = R.string.skill_maker_main_undo, - icon = icon(R.drawable.ic_undo), - onClick = { vm.onUndo() }, + text = R.string.skill_maker_main_delete_selected, + icon = icon(Icons.Default.Delete), + onClick = { vm.onDeleteSelected() }, enabled = currentIndex > 0, modifier = Modifier.padding(end = 5.dp) ) diff --git a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerViewModel.kt b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerViewModel.kt index 32a62b3f2..16b20b9de 100644 --- a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerViewModel.kt +++ b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerViewModel.kt @@ -97,7 +97,7 @@ class SkillMakerViewModel @Inject constructor( ++_currentIndex.value } - private fun undo() { + private fun deleteSelected() { model.skillCommand.removeAt(currentIndex.value) --_currentIndex.value } @@ -181,7 +181,7 @@ class SkillMakerViewModel @Inject constructor( _currentIndex.value = model.skillCommand.lastIndex while (last.let { l -> l is SkillMakerEntry.Next && l.action == AutoSkillAction.Atk.noOp() }) { - undo() + deleteSelected() } return getSkillCmdString() @@ -216,7 +216,7 @@ class SkillMakerViewModel @Inject constructor( lastAction.action is AutoSkillAction.MasterSkill && lastAction.action.skill == Skill.Master.C ) { - undo() + deleteSelected() } } @@ -257,14 +257,14 @@ class SkillMakerViewModel @Inject constructor( _enemyTarget.value = target } - private fun undoStageOrTurn() { + private fun deleteStageOrTurn() { // Decrement Battle/Turn count if (last is SkillMakerEntry.Next.Wave) { prevStage() } // Undo the Battle/Turn change - undo() + deleteSelected() revertToPreviousEnemyTarget() } @@ -273,24 +273,24 @@ class SkillMakerViewModel @Inject constructor( _currentIndex.value = model.skillCommand.lastIndex while (!isEmpty()) { - onUndo() + onDeleteSelected() } } - fun onUndo() { + fun onDeleteSelected() { if (!isEmpty()) { // Un-select target when (val last = last) { // Battle/Turn change is SkillMakerEntry.Next -> { - undoStageOrTurn() + deleteStageOrTurn() } is SkillMakerEntry.Action -> { if (last.action is AutoSkillAction.TargetEnemy) { - undo() + deleteSelected() revertToPreviousEnemyTarget() - } else undo() + } else deleteSelected() } // Do nothing is SkillMakerEntry.Start -> { diff --git a/app/src/main/res/values-b+zh+CN/localized.xml b/app/src/main/res/values-b+zh+CN/localized.xml index 53c4e2b55..36eff47fc 100644 --- a/app/src/main/res/values-b+zh+CN/localized.xml +++ b/app/src/main/res/values-b+zh+CN/localized.xml @@ -37,7 +37,6 @@ "敌人 %d" "战斗 %d" "御主技能" - "复原" "重设" "从者 %d" "攻击" diff --git a/app/src/main/res/values-b+zh+TW/localized.xml b/app/src/main/res/values-b+zh+TW/localized.xml index 013c29a74..afedb79d9 100644 --- a/app/src/main/res/values-b+zh+TW/localized.xml +++ b/app/src/main/res/values-b+zh+TW/localized.xml @@ -37,7 +37,6 @@ 敵人 %d BATTLE %d 御主技能 - 復原 重設 從者 %d Attack diff --git a/app/src/main/res/values-ja/localized.xml b/app/src/main/res/values-ja/localized.xml index e1b033aab..02effb44d 100644 --- a/app/src/main/res/values-ja/localized.xml +++ b/app/src/main/res/values-ja/localized.xml @@ -38,7 +38,6 @@ "Battle: %d" "マスター スキル" - "削除" "全削除" "サーヴァント %d" "Attack" diff --git a/app/src/main/res/values-ko/localized.xml b/app/src/main/res/values-ko/localized.xml index 46ec1a210..834699aee 100644 --- a/app/src/main/res/values-ko/localized.xml +++ b/app/src/main/res/values-ko/localized.xml @@ -38,7 +38,6 @@ "배틀: %d" "마스터 스킬" - "되돌리기" "초기화" "서번트 %d" "공격" diff --git a/app/src/main/res/values-vi/localized.xml b/app/src/main/res/values-vi/localized.xml index e4fc04a70..4cfa1b4bc 100644 --- a/app/src/main/res/values-vi/localized.xml +++ b/app/src/main/res/values-vi/localized.xml @@ -37,7 +37,6 @@ Bảo Khí" "Trận đấu: %d" "Kĩ năng Master" - "Làm lại" "Dọn sạch" "Servant %d" "Tấn công" diff --git a/app/src/main/res/values/localized.xml b/app/src/main/res/values/localized.xml index 5b37f0471..a908690ed 100644 --- a/app/src/main/res/values/localized.xml +++ b/app/src/main/res/values/localized.xml @@ -38,7 +38,7 @@ in same wave" "Battle: %d" "Master Skills" - "Undo" + "Delete selected" "Clear" "Servant %d" "Attack"