mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
MNTM Settings: Add Skip Sliding Animations option for Lockscreen (#436)
* Add Fast Lock/Unlock The cover animation takes time and blocks input while animating, so add options to skip the animations. * Combine options into "Skip Sliding Animation" * Update changelog * Wording --------- Co-authored-by: WillyJL <me@willyjl.dev>
This commit is contained in:
@@ -110,6 +110,15 @@ static void
|
||||
app->save_settings = true;
|
||||
}
|
||||
|
||||
static void
|
||||
momentum_app_scene_interface_lockscreen_lockscreen_skip_animation_changed(VariableItem* item) {
|
||||
MomentumApp* app = variable_item_get_context(item);
|
||||
bool value = variable_item_get_current_value_index(item);
|
||||
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
|
||||
momentum_settings.lockscreen_skip_animation = value;
|
||||
app->save_settings = true;
|
||||
}
|
||||
|
||||
void momentum_app_scene_interface_lockscreen_on_enter(void* context) {
|
||||
MomentumApp* app = context;
|
||||
VariableItemList* var_item_list = app->var_item_list;
|
||||
@@ -220,6 +229,16 @@ void momentum_app_scene_interface_lockscreen_on_enter(void* context) {
|
||||
variable_item_set_current_value_text(
|
||||
item, momentum_settings.lockscreen_transparent ? "ON" : "OFF");
|
||||
|
||||
item = variable_item_list_add(
|
||||
var_item_list,
|
||||
"Skip Sliding Animation",
|
||||
2,
|
||||
momentum_app_scene_interface_lockscreen_lockscreen_skip_animation_changed,
|
||||
app);
|
||||
variable_item_set_current_value_index(item, momentum_settings.lockscreen_skip_animation);
|
||||
variable_item_set_current_value_text(
|
||||
item, momentum_settings.lockscreen_skip_animation ? "ON" : "OFF");
|
||||
|
||||
variable_item_list_set_enter_callback(
|
||||
var_item_list, momentum_app_scene_interface_lockscreen_var_item_list_callback, app);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user