Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ enum class MonitoredViewType {
EVENT_DIALOG_FIELD_ACTIONS,
EVENT_DIALOG_FIELD_CONDITIONS,
EVENT_DIALOG_FIELD_OPERATOR_ITEM_AND,
EVENT_DIALOG_FIELD_OPERATOR_ITEM_OR,
MAIN_MENU_BUTTON_CONFIG,
MAIN_MENU_BUTTON_PLAY,
SCENARIO_DIALOG_BUTTON_CREATE_EVENT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ internal class QuickClickGameEngine (
)
}
onGameCompleted?.invoke(isWon)
onGameCompleted = null
gameJob = null
}
}

override fun stop() {
Log.d(TAG, "Stop game")

onGameCompleted = null
gameJob?.cancel()
gameJob = null

Expand Down
2 changes: 1 addition & 1 deletion core/common/ui/src/main/res/drawable/ic_action_system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:scaleY="0.4">

<path
android:fillColor="@android:color/white"
android:fillColor="@android:color/black"
android:pathData="M15.5417 1.66669C15.1833 1.66669 14.8417 1.76669 14.5333 1.94169L3.21667 8.74169C2.775 9.00002 2.5 9.48335 2.5 10C2.5 10.5167 2.775 11 3.21667 11.2584L14.5333 18.05C14.8417 18.2334 15.1833 18.325 15.5417 18.325C16.625 18.325 17.5 17.45 17.5 16.3667V3.62502C17.5 2.54169 16.625 1.66669 15.5417 1.66669Z" />

</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ class EventDialog(
viewModel.monitorViews(
conditionsField = viewBinding.layoutConditionSelector,
conditionOperatorAndView = viewBinding.fieldConditionsOperator.dualStateButton.buttonLeft,
conditionOperatorOrView = viewBinding.fieldConditionsOperator.dualStateButton.buttonRight,
actionsField = viewBinding.layoutActionsSelector,
saveButton = viewBinding.layoutTopBar.buttonSave,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,11 @@ class EventDialogViewModel @Inject constructor(
}
}

fun monitorViews(conditionsField: View, conditionOperatorAndView: View, actionsField: View, saveButton: View) {
fun monitorViews(conditionsField: View, conditionOperatorAndView: View, conditionOperatorOrView: View, actionsField: View, saveButton: View) {
monitoredViewsManager.apply {
attach(MonitoredViewType.EVENT_DIALOG_FIELD_CONDITIONS, conditionsField)
attach(MonitoredViewType.EVENT_DIALOG_FIELD_OPERATOR_ITEM_AND, conditionOperatorAndView)
attach(MonitoredViewType.EVENT_DIALOG_FIELD_OPERATOR_ITEM_OR, conditionOperatorOrView)
attach(MonitoredViewType.EVENT_DIALOG_FIELD_ACTIONS, actionsField)
attach(MonitoredViewType.EVENT_DIALOG_BUTTON_SAVE, saveButton)
}
Expand All @@ -184,6 +185,7 @@ class EventDialogViewModel @Inject constructor(
fun stopViewMonitoring() {
monitoredViewsManager.apply {
detach(MonitoredViewType.EVENT_DIALOG_BUTTON_SAVE)
detach(MonitoredViewType.EVENT_DIALOG_FIELD_OPERATOR_ITEM_OR)
detach(MonitoredViewType.EVENT_DIALOG_FIELD_OPERATOR_ITEM_AND)
detach(MonitoredViewType.EVENT_DIALOG_FIELD_ACTIONS)
detach(MonitoredViewType.EVENT_DIALOG_FIELD_CONDITIONS)
Expand Down
2 changes: 1 addition & 1 deletion feature/smart-config/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
<string name="field_condition_selection_desc_and_operator_not_found">لم يتم تحديد أي شرط</string>

<string name="field_condition_selection_title_or_operator">انقر على أول حالة تم اكتشافها</string>
<string name="field_condition_selection_desc_or_operator">تم ضبط الحدث على "شرط واحدولا يمكنك تحديد شرط محدد</string>
<string name="field_condition_selection_desc_or_operator">تم ضبط عامل الشرط للحدث على \"OR\سيحدث النقر على أول شرط يتم اكتشافه</string>

<string name="field_click_position_desc">انقر على %1$d، %2$d</string>

Expand Down
2 changes: 1 addition & 1 deletion feature/smart-config/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
<string name="field_condition_selection_desc_and_operator_not_found">Ninguna condición seleccionada</string>

<string name="field_condition_selection_title_or_operator">Haga clic en la primera condición detectada</string>
<string name="field_condition_selection_desc_or_operator">El evento está configurado en "Una condición", no puedes seleccionar una específica</string>
<string name="field_condition_selection_desc_or_operator">El operador de condición del evento está configurado en \"OR\", el clic ocurrirá en la primera condición detectada</string>

<string name="field_click_position_desc">Haga clic en %1$d, %2$d</string>

Expand Down
2 changes: 1 addition & 1 deletion feature/smart-config/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<string name="item_click_details_on_condition">Pendant %1$s sur %2$s</string>
<string name="field_condition_selection_desc_and_operator">%1$s</string>
<string name="field_condition_selection_desc_and_operator_not_found">Pas de condition sélectionnée</string>
<string name="field_condition_selection_desc_or_operator">L\'évènement est défini sur "Une condition", vous ne pouvez pas en spécifier une</string>
<string name="field_condition_selection_desc_or_operator">L\'opérateur de condition de l\'évènement est défini sur \"OR\", le clic se produira sur la première condition détectée</string>
<string name="field_click_position_desc">Clic simple sur %1$d, %2$d</string>
<string name="field_select_detection_area_desc">Dans [%1$d, %2$d] [%3$d, %4$d]</string>
<string name="item_intent_desc">Intéragir avec une autre application</string>
Expand Down
2 changes: 1 addition & 1 deletion feature/smart-config/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<string name="item_click_details_on_condition">Durante %1$s su %2$s</string>
<string name="field_condition_selection_desc_and_operator">%1$s</string>
<string name="field_condition_selection_desc_and_operator_not_found">Nessuna condizione selezionata</string>
<string name="field_condition_selection_desc_or_operator">L\'evento è impostato su Una condizione, non è possibile selezionarne uno specifico</string>
<string name="field_condition_selection_desc_or_operator">L\'operatore di condizione dell\'evento è impostato su \"OR\", il clic avverrà sulla prima condizione rilevata</string>
<string name="field_click_position_desc">Clicca %1$d, %2$d</string>
<string name="field_select_detection_area_desc">Tra [%1$d, %2$d] [%3$d, %4$d]</string>
<string name="item_intent_desc">Interagisci con un\'altra applicazione</string>
Expand Down
2 changes: 1 addition & 1 deletion feature/smart-config/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<string name="field_condition_selection_desc_and_operator">%1$s</string>
<string name="field_condition_selection_desc_and_operator_not_found">条件が選択されていません</string>
<string name="field_condition_selection_title_or_operator">最初に検出された条件をクリックします</string>
<string name="field_condition_selection_desc_or_operator">イベントは「1 つの条件」に設定されており、特定の条件を選択することはできません</string>
<string name="field_condition_selection_desc_or_operator">イベントの条件演算子が \"OR\" に設定されており、最初に検出された条件でクリックが発生します</string>
<string name="field_click_position_desc">%1$d、%2$d をクリックします</string>
<string name="field_click_offset_title">クリックオフセット</string>
<string name="field_click_offset_desc_none">なし</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
<string name="field_condition_selection_desc_and_operator_not_found">Nenhuma condição selecionada</string>

<string name="field_condition_selection_title_or_operator">Clique na primeira condição detectada</string>
<string name="field_condition_selection_desc_or_operator">Evento está definido como "Uma Condição", você não pode selecionar uma específica</string>
<string name="field_condition_selection_desc_or_operator">O operador de condição do evento está definido como \"OR\", o clique ocorrerá na primeira condição detectada</string>

<string name="field_click_position_desc">Clique em %1$d, %2$d</string>

Expand Down
2 changes: 1 addition & 1 deletion feature/smart-config/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
<string name="field_condition_selection_desc_and_operator_not_found">Условие не выбрано</string>

<string name="field_condition_selection_title_or_operator">Нажать на первое обнаруженное условие</string>
<string name="field_condition_selection_desc_or_operator">Событие настроено на «Одно условие», нельзя выбрать конкретное</string>
<string name="field_condition_selection_desc_or_operator">Оператор условия события установлен на \"OR\", клик произойдёт по первому обнаруженному условию</string>

<string name="field_click_position_desc">Нажать на %1$d, %2$d</string>

Expand Down
2 changes: 1 addition & 1 deletion feature/smart-config/src/main/res/values-uk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
<string name="field_condition_selection_desc_and_operator_not_found">Жодної умови не обрано</string>

<string name="field_condition_selection_title_or_operator">Клікнути на першій виявленій умові</string>
<string name="field_condition_selection_desc_or_operator">Подія встановлена на "Одна умова", ви не можете обрати конкретну</string>
<string name="field_condition_selection_desc_or_operator">Оператор умови події встановлено на \"OR\", клік відбудеться на першій виявленій умові</string>

<string name="field_click_position_desc">Клікнути на %1$d, %2$d</string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<string name="item_click_details_on_condition">于 %2$s 持续 %1$s</string>
<string name="field_condition_selection_desc_and_operator">%1$s</string>
<string name="field_condition_selection_desc_and_operator_not_found">未选择条件</string>
<string name="field_condition_selection_desc_or_operator">事件设置为“一个条件”,您无法选择特定条件</string>
<string name="field_condition_selection_desc_or_operator">事件的条件运算符设置为 “OR”,点击将发生在第一个检测到的条件上</string>
<string name="field_click_position_desc">点击 (%1$d, %2$d)</string>
<string name="field_select_detection_area_desc">在[%1$d,%2$d] [%3$d,%4$d]中</string>
<string name="item_intent_desc">调用其他的应用程序</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<string name="item_click_details_on_condition">於 %2$s 持續 %1$s</string>
<string name="field_condition_selection_desc_and_operator">%1$s</string>
<string name="field_condition_selection_desc_and_operator_not_found">未選擇條件</string>
<string name="field_condition_selection_desc_or_operator">事件設置為「一個條件」,您無法選擇特定條件</string>
<string name="field_condition_selection_desc_or_operator">事件的條件運算子設定為 \"OR\",點擊將發生在第一個偵測到的條件上</string>
<string name="field_click_position_desc">點擊 (%1$d, %2$d)</string>
<string name="field_select_detection_area_desc">在[%1$d,%2$d] [%3$d,%4$d]中</string>
<string name="item_intent_desc">調用其他的應用程式</string>
Expand Down
2 changes: 1 addition & 1 deletion feature/smart-config/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
<string name="field_condition_selection_desc_and_operator_not_found">No condition selected</string>

<string name="field_condition_selection_title_or_operator">Click on the first detected condition</string>
<string name="field_condition_selection_desc_or_operator">Event is set to "One Condition", you can\'t select a specific one</string>
<string name="field_condition_selection_desc_or_operator">Event\'s condition operator is set to \"OR\", click will happen on the first detected condition</string>

<string name="field_click_position_desc">Click on %1$d, %2$d</string>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package com.buzbuz.smartautoclicker.feature.tutorial.data.items.root.basics.acti

import com.buzbuz.smartautoclicker.feature.tutorial.R
import com.buzbuz.smartautoclicker.feature.tutorial.domain.model.TutorialCategory
import com.buzbuz.smartautoclicker.feature.tutorial.domain.model.TutorialSlideshow

internal fun getActionsCategory() =
TutorialCategory(
Expand All @@ -26,5 +27,16 @@ internal fun getActionsCategory() =
shortDescriptionRes = R.string.tutorial_category_action_desc_short,
longDescriptionRes = R.string.tutorial_category_action_desc_long,
iconRes = R.drawable.ic_click,
content = listOf(),
content = listOf(
TutorialCategory.Content.Category(TutorialCategory.Type.CLICK_ACTION),
TutorialCategory.Content.Category(TutorialCategory.Type.SWIPE_ACTION),
TutorialCategory.Content.Category(TutorialCategory.Type.PAUSE_ACTION),
TutorialCategory.Content.Category(TutorialCategory.Type.WRITE_TEXT_ACTION),
TutorialCategory.Content.Category(TutorialCategory.Type.SYSTEM_ACTION),
TutorialCategory.Content.Category(TutorialCategory.Type.CHANGE_COUNTER_ACTION),
TutorialCategory.Content.Category(TutorialCategory.Type.TOGGLE_EVENT_ACTION),
TutorialCategory.Content.Category(TutorialCategory.Type.NOTIFICATION_ACTION),
TutorialCategory.Content.Category(TutorialCategory.Type.INTENT_ACTION),
TutorialCategory.Content.Slideshow(TutorialSlideshow.Type.ACTIONS_LIST),
),
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (C) 2026 Kevin Buzeau
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.buzbuz.smartautoclicker.feature.tutorial.data.items.root.basics.actions

import com.buzbuz.smartautoclicker.feature.tutorial.R
import com.buzbuz.smartautoclicker.feature.tutorial.domain.model.TutorialSlideshow

internal fun getActionsListSlideshow() =
TutorialSlideshow(
type = TutorialSlideshow.Type.ACTIONS_LIST,
nameRes = R.string.tutorial_slideshow_actions_list_title,
shortDescriptionRes = R.string.tutorial_slideshow_actions_list_desc,
slideshowItems = listOf(
TutorialSlideshow.SlideshowItem(
tutorialTextRes = R.string.tutorial_slideshow_actions_list_step_1_text,
tutorialImage = R.drawable.tutorial_instructions_action_order,
tutorialImageFormat = TutorialSlideshow.ImageFormat.IMAGE_LARGE,
),
),
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (C) 2026 Kevin Buzeau
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.buzbuz.smartautoclicker.feature.tutorial.data.items.root.basics.actions.changecounter

import com.buzbuz.smartautoclicker.feature.tutorial.R
import com.buzbuz.smartautoclicker.feature.tutorial.domain.model.TutorialCategory
import com.buzbuz.smartautoclicker.feature.tutorial.domain.model.TutorialSlideshow

internal fun getChangeCounterActionCategory() =
TutorialCategory(
type = TutorialCategory.Type.CHANGE_COUNTER_ACTION,
nameRes = R.string.tutorial_category_change_counter_action_name,
shortDescriptionRes = R.string.tutorial_category_change_counter_action_desc_short,
longDescriptionRes = R.string.tutorial_category_change_counter_action_desc_long,
iconRes = R.drawable.ic_change_counter,
content = listOf(
TutorialCategory.Content.Slideshow(TutorialSlideshow.Type.CHANGE_COUNTER_ACTION),
),
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (C) 2026 Kevin Buzeau
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.buzbuz.smartautoclicker.feature.tutorial.data.items.root.basics.actions.changecounter

import com.buzbuz.smartautoclicker.feature.tutorial.R
import com.buzbuz.smartautoclicker.feature.tutorial.domain.model.TutorialSlideshow

internal fun getChangeCounterActionSlideshow() =
TutorialSlideshow(
type = TutorialSlideshow.Type.CHANGE_COUNTER_ACTION,
nameRes = R.string.tutorial_slideshow_change_counter_action_title,
shortDescriptionRes = R.string.tutorial_slideshow_change_counter_action_desc,
slideshowItems = listOf(
TutorialSlideshow.SlideshowItem(
tutorialTextRes = R.string.tutorial_slideshow_change_counter_action_step_1_text,
tutorialImage = R.drawable.ic_numbers,
tutorialImageFormat = TutorialSlideshow.ImageFormat.ICON,
),
TutorialSlideshow.SlideshowItem(
tutorialTextRes = R.string.tutorial_slideshow_change_counter_action_step_2_text,
tutorialImage = R.drawable.ic_change_counter,
tutorialImageFormat = TutorialSlideshow.ImageFormat.ICON,
),
),
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright (C) 2026 Kevin Buzeau
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.buzbuz.smartautoclicker.feature.tutorial.data.items.root.basics.actions.changeeventstate

import com.buzbuz.smartautoclicker.feature.tutorial.R
import com.buzbuz.smartautoclicker.feature.tutorial.domain.model.TutorialCategory
import com.buzbuz.smartautoclicker.feature.tutorial.domain.model.TutorialSlideshow

internal fun getChangeEventStateActionCategory() =
TutorialCategory(
type = TutorialCategory.Type.TOGGLE_EVENT_ACTION,
nameRes = R.string.tutorial_category_change_event_state_action_name,
shortDescriptionRes = R.string.tutorial_category_change_event_state_action_desc_short,
longDescriptionRes = R.string.tutorial_category_change_event_state_action_desc_long,
iconRes = R.drawable.ic_toggle_event,
content = listOf(
TutorialCategory.Content.Slideshow(TutorialSlideshow.Type.TOGGLE_EVENT_ACTION),
),
)
Loading