_Bool messages_mright(MESSAGES *m) { static UI_STRING_ID menu_copy[] = {STR_COPY, STR_COPY_WITH_NAMES}; if(m->iover == MSG_IDX_MAX) { return 0; } MESSAGE* msg = (MESSAGE*)m->data->data[m->iover]; switch(msg->msg_type) { case MSG_TYPE_TEXT: case MSG_TYPE_ACTION_TEXT: { contextmenu_new(countof(menu_copy), menu_copy, contextmenu_messages_onselect); return 1; } } return 0; }
_Bool edit_mright(EDIT *edit) { static UI_STRING_ID menu_edit[] = {STR_CUT, STR_COPY, STR_PASTE, STR_DELETE, STR_SELECTALL}; if(edit->mouseover_char > edit->length) { edit->mouseover_char = edit->length; } if(edit->mouseover) { EDIT *active = active_edit; if(active != edit) { setactive(edit); edit_sel.start = edit_sel.p1 = edit_sel.p2 = edit->mouseover_char; edit_sel.length = 0; edit_select = 1; } contextmenu_new(countof(menu_edit), menu_edit, contextmenu_edit_onselect); return 1; } return 0; }
static void button_avatar_onright(void) { if (self_has_avatar()) { static UI_STRING_ID menu[] = {STR_REMOVE}; contextmenu_new(countof(menu), menu, contextmenu_avatar_onselect); } }