Further LLViewerMenu updates

This commit is contained in:
Lirusaito
2013-03-29 03:01:18 -04:00
parent dff59ab455
commit e44ba343a6
4 changed files with 678 additions and 583 deletions

View File

@@ -207,15 +207,16 @@ BOOL LLToolPie::pickAndShowMenu(BOOL always_show)
// touch behavior down below... // touch behavior down below...
break; break;
case CLICK_ACTION_SIT: case CLICK_ACTION_SIT:
if ((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting())
&& (!gSavedSettings.getBOOL("DisableClickSit"))) // agent not already sitting
{ {
handle_sit_or_stand(); if (!gSavedSettings.getBOOL("DisableClickSit"))
// put focus in world when sitting on an object if (isAgentAvatarValid() && !gAgentAvatarp->isSitting()) // agent not already sitting
gFocusMgr.setKeyboardFocus(NULL); {
return TRUE; handle_object_sit_or_stand();
} // else nothing (fall through to touch) // put focus in world when sitting on an object
gFocusMgr.setKeyboardFocus(NULL);
return TRUE;
} // else nothing (fall through to touch)
}
case CLICK_ACTION_PAY: case CLICK_ACTION_PAY:
if ((object && object->flagTakesMoney()) if ((object && object->flagTakesMoney())
|| (parent && parent->flagTakesMoney())) || (parent && parent->flagTakesMoney()))

File diff suppressed because it is too large Load Diff

View File

@@ -83,12 +83,12 @@ void confirm_replace_attachment(S32 option, void* user_data);
void handle_detach_from_avatar(void* user_data); void handle_detach_from_avatar(void* user_data);
void attach_label(std::string& label, void* user_data); void attach_label(std::string& label, void* user_data);
void detach_label(std::string& label, void* user_data); void detach_label(std::string& label, void* user_data);
BOOL object_selected_and_point_valid(void* user_data);
BOOL object_attached(void* user_data);
void handle_detach(void*); void handle_detach(void*);
// [SL:KB] - Patch: Inventory-AttachmentEdit - Checked: 2010-08-25 (Catznip-2.2.0a) | Added: Catznip-2.1.2a
void handle_attachment_edit(const LLUUID& idItem);
// [/SL:KB]
BOOL enable_god_full(void* user_data); BOOL enable_god_full(void* user_data);
BOOL enable_god_liaison(void* user_data); BOOL enable_god_liaison(void* user_data);
BOOL enable_god_customer_service(void* user_data);
BOOL enable_god_basic(void* user_data); BOOL enable_god_basic(void* user_data);
void set_underclothes_menu_options(); void set_underclothes_menu_options();
@@ -97,7 +97,9 @@ void exchange_callingcard(const LLUUID& dest_id);
void handle_gestures(void*); void handle_gestures(void*);
void handle_sit_down(void*); void handle_sit_down(void*);
void handle_object_build(void*); void handle_object_build(void*);
bool handle_object_open(); void handle_object_touch();
bool enable_object_open();
void handle_object_open();
bool visible_take_object(); bool visible_take_object();
bool enable_object_take_copy(); bool enable_object_take_copy();
@@ -112,6 +114,14 @@ void handle_look_at_selection(const LLSD& param);
void handle_object_return(); void handle_object_return();
void handle_object_delete(); void handle_object_delete();
// Takes avatar UUID, or if no UUID passed, uses last selected object
void handle_avatar_freeze(const LLSD& avatar_id);
// Takes avatar UUID, or if no UUID passed, uses last selected object
void handle_avatar_eject(const LLSD& avatar_id);
bool enable_freeze_eject(const LLSD& avatar_id);
// Can anyone take a free copy of the object? // Can anyone take a free copy of the object?
// *TODO: Move to separate file // *TODO: Move to separate file
bool anyone_copy_selection(LLSelectNode* nodep); bool anyone_copy_selection(LLSelectNode* nodep);
@@ -124,8 +134,9 @@ void handle_save_snapshot(void *);
void handle_toggle_flycam(); void handle_toggle_flycam();
void handle_fake_away_status(void*); void handle_fake_away_status(void*);
bool handle_sit_or_stand(); void handle_object_sit_or_stand();
bool handle_give_money_dialog(); void handle_give_money_dialog();
bool enable_pay_object();
bool enable_buy_object(); bool enable_buy_object();
bool handle_go_to(); bool handle_go_to();
@@ -158,19 +169,12 @@ extern LLViewerMenuHolderGL* gMenuHolder;
extern LLMenuBarGL* gLoginMenuBarView; extern LLMenuBarGL* gLoginMenuBarView;
// Pie menus // Pie menus
extern LLPieMenu *gPieSelf; extern LLPieMenu *gPieSelf;
extern LLPieMenu *gPieAvatar; extern LLPieMenu *gPieAvatar;
extern LLPieMenu *gPieObject; extern LLPieMenu *gPieObject;
extern LLPieMenu *gPieAttachment; extern LLPieMenu *gPieAttachment;
extern LLPieMenu *gPieLand; extern LLPieMenu *gPieLand;
extern LLPieMenu* gPieRate; extern LLPieMenu *gPieRate;
// Pie menus
extern LLPieMenu *gPieSelfSimple;
extern LLPieMenu *gPieAvatarSimple;
extern LLPieMenu *gPieObjectSimple;
extern LLPieMenu *gPieAttachmentSimple;
extern LLPieMenu *gPieLandSimple;
// Needed to build menus when attachment site list available // Needed to build menus when attachment site list available
extern LLMenuGL* gAttachSubMenu; extern LLMenuGL* gAttachSubMenu;

View File

@@ -77,6 +77,9 @@
LLPointer<LLVOAvatarSelf> gAgentAvatarp = NULL; LLPointer<LLVOAvatarSelf> gAgentAvatarp = NULL;
BOOL object_attached(void *user_data);
BOOL object_selected_and_point_valid(void *user_data);
BOOL isAgentAvatarValid() BOOL isAgentAvatarValid()
{ {
return (gAgentAvatarp.notNull() && gAgentAvatarp->isValid() && return (gAgentAvatarp.notNull() && gAgentAvatarp->isValid() &&