mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-26 14:51:52 +03:00
parent
fdcfd5996b
commit
e027d5c3e8
@ -499,6 +499,23 @@ VariableItem* variable_item_list_add(
|
||||
return item;
|
||||
}
|
||||
|
||||
VariableItem* variable_item_list_get(VariableItemList* variable_item_list, uint8_t position) {
|
||||
VariableItem* item = NULL;
|
||||
furi_assert(variable_item_list);
|
||||
|
||||
with_view_model(
|
||||
variable_item_list->view,
|
||||
VariableItemListModel * model,
|
||||
{
|
||||
if(position < VariableItemArray_size(model->items)) {
|
||||
item = VariableItemArray_get(model->items, position);
|
||||
}
|
||||
},
|
||||
true);
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
void variable_item_list_set_enter_callback(
|
||||
VariableItemList* variable_item_list,
|
||||
VariableItemListEnterCallback callback,
|
||||
|
@ -59,6 +59,15 @@ VariableItem* variable_item_list_add(
|
||||
VariableItemChangeCallback change_callback,
|
||||
void* context);
|
||||
|
||||
/** Get item in VariableItemList
|
||||
*
|
||||
* @param variable_item_list VariableItemList instance
|
||||
* @param position index of the item to get
|
||||
*
|
||||
* @return VariableItem* item instance
|
||||
*/
|
||||
VariableItem* variable_item_list_get(VariableItemList* variable_item_list, uint8_t position);
|
||||
|
||||
/** Set enter callback
|
||||
*
|
||||
* @param variable_item_list VariableItemList instance
|
||||
|
@ -3166,6 +3166,7 @@ Function,+,variable_item_get_current_value_index,uint8_t,VariableItem*
|
||||
Function,+,variable_item_list_add,VariableItem*,"VariableItemList*, const char*, uint8_t, VariableItemChangeCallback, void*"
|
||||
Function,+,variable_item_list_alloc,VariableItemList*,
|
||||
Function,+,variable_item_list_free,void,VariableItemList*
|
||||
Function,+,variable_item_list_get,VariableItem*,"VariableItemList*, uint8_t"
|
||||
Function,+,variable_item_list_get_selected_item_index,uint8_t,VariableItemList*
|
||||
Function,+,variable_item_list_get_view,View*,VariableItemList*
|
||||
Function,+,variable_item_list_reset,void,VariableItemList*
|
||||
|
|
Loading…
Reference in New Issue
Block a user