Profiles: add "on rotation" auto-execute event (#12612)

This commit is contained in:
hius07
2024-10-10 18:05:24 +03:00
committed by GitHub
parent 76deedfb73
commit 85591c75ce
5 changed files with 112 additions and 16 deletions

View File

@@ -90,11 +90,11 @@ local CreOptions = {
end
end,
-- For Dispatcher & onMakeDefault's sake
labels = {C_("Rotation", "⤹ 90°"), C_("Rotation", "↑ 0°"), C_("Rotation", "⤸ 90°"), C_("Rotation", "↓ 180°")},
labels = optionsutil.rotation_labels,
alternate = false,
values = {Screen.DEVICE_ROTATED_COUNTER_CLOCKWISE, Screen.DEVICE_ROTATED_UPRIGHT, Screen.DEVICE_ROTATED_CLOCKWISE, Screen.DEVICE_ROTATED_UPSIDE_DOWN},
values = optionsutil.rotation_modes,
default_value = Screen.DEVICE_ROTATED_UPRIGHT,
args = {Screen.DEVICE_ROTATED_COUNTER_CLOCKWISE, Screen.DEVICE_ROTATED_UPRIGHT, Screen.DEVICE_ROTATED_CLOCKWISE, Screen.DEVICE_ROTATED_UPSIDE_DOWN},
args = optionsutil.rotation_modes,
current_func = function() return Screen:getRotationMode() end,
event = "SetRotationMode",
name_text_hold_callback = optionsutil.showValues,