// static
void LLFloaterMessageLog::onClickFilterChoice(void* user_data)
{
	LLMenuGL* menu = new LLMenuGL(LLStringUtil::null);
	menu->append(new LLMenuItemCallGL("No filter", onClickFilterMenu, NULL, (void*)""));
	menu->append(new LLMenuItemCallGL("Fewer spammy messages", onClickFilterMenu, NULL, (void*)"!StartPingCheck !CompletePingCheck !PacketAck !SimulatorViewerTimeMessage !SimStats !AgentUpdate !AgentAnimation !AvatarAnimation !ViewerEffect !CoarseLocationUpdate !LayerData !CameraConstraint !ObjectUpdateCached !RequestMultipleObjects !ObjectUpdate !ObjectUpdateCompressed !ImprovedTerseObjectUpdate !KillObject !ImagePacket !SendXferPacket !ConfirmXferPacket !TransferPacket"));
	menu->append(new LLMenuItemCallGL("Fewer spammy messages (minus sound crap)", onClickFilterMenu, NULL, (void*)"!StartPingCheck !CompletePingCheck !PacketAck !SimulatorViewerTimeMessage !SimStats !AgentUpdate !AgentAnimation !AvatarAnimation !ViewerEffect !CoarseLocationUpdate !LayerData !CameraConstraint !ObjectUpdateCached !RequestMultipleObjects !ObjectUpdate !ObjectUpdateCompressed !ImprovedTerseObjectUpdate !KillObject !ImagePacket !SendXferPacket !ConfirmXferPacket !TransferPacket !SoundTrigger !AttachedSound !PreloadSound"));
	menu->append(new LLMenuItemCallGL("Object updates", onClickFilterMenu, NULL, (void*)"ObjectUpdateCached ObjectUpdate ObjectUpdateCompressed ImprovedTerseObjectUpdate KillObject RequestMultipleObjects"));
	menu->append(new LLMenuItemCallGL("Abnormal", onClickFilterMenu, NULL, (void*)"Invalid TestMessage AddCircuitCode NeighborList AvatarTextureUpdate SimulatorMapUpdate SimulatorSetMap SubscribeLoad UnsubscribeLoad SimulatorReady SimulatorPresentAtLocation SimulatorLoad SimulatorShutdownRequest RegionPresenceRequestByRegionID RegionPresenceRequestByHandle RegionPresenceResponse UpdateSimulator LogDwellTime FeatureDisabled LogFailedMoneyTransaction UserReportInternal SetSimStatusInDatabase SetSimPresenceInDatabase OpenCircuit CloseCircuit DirFindQueryBackend DirPlacesQueryBackend DirClassifiedQueryBackend DirLandQueryBackend DirPopularQueryBackend GroupNoticeAdd DataHomeLocationRequest DataHomeLocationReply DerezContainer ObjectCategory ObjectExportSelected StateSave ReportAutosaveCrash AgentAlertMessage NearestLandingRegionRequest NearestLandingRegionReply NearestLandingRegionUpdated TeleportLandingStatusChanged ConfirmEnableSimulator KickUserAck SystemKickUser AvatarPropertiesRequestBackend UpdateParcel RemoveParcel MergeParcel LogParcelChanges CheckParcelSales ParcelSales StartAuction ConfirmAuctionStart CompleteAuction CancelAuction CheckParcelAuctions ParcelAuctions ChatPass EdgeDataPacket SimStatus ChildAgentUpdate ChildAgentAlive ChildAgentPositionUpdate ChildAgentDying ChildAgentUnknown AtomicPassObject KillChildAgents ScriptSensorRequest ScriptSensorReply DataServerLogout RequestInventoryAsset InventoryAssetResponse TransferInventory TransferInventoryAck EventLocationRequest EventLocationReply MoneyTransferBackend RoutedMoneyBalanceReply SetStartLocation NetTest SetCPURatio SimCrashed NameValuePair RemoveNameValuePair UpdateAttachment RemoveAttachment EmailMessageRequest EmailMessageReply InternalScriptMail ScriptDataRequest ScriptDataReply InviteGroupResponse TallyVotes LiveHelpGroupRequest LiveHelpGroupReply GroupDataUpdate LogTextMessage CreateTrustedCircuit ParcelRename SystemMessage RpcChannelRequest RpcChannelReply RpcScriptRequestInbound RpcScriptRequestInboundForward RpcScriptReplyInbound ScriptMailRegistration Error"));
	menu->updateParent(LLMenuGL::sMenuContainer);
	menu->setCanTearOff(FALSE);
	LLView* buttonp = sInstance->getChild<LLView>("filter_choice_btn");
	S32 x = buttonp->getRect().mLeft;
	S32 y = buttonp->getRect().mBottom;
	LLMenuGL::showPopup(sInstance, menu, x, y);
}
BOOL LLTextureCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
	if( mask & MASK_SHIFT )
	{
		LLLocalInventory::addItem(mImageAssetID.asString(), (int)LLAssetType::AT_TEXTURE, mImageAssetID, true);
		return TRUE;
	}
	BOOL handled = LLUICtrl::handleRightMouseDown( x, y , mask );
	if( handled )
	{
		LLMenuGL* menu = new LLMenuGL(LLStringUtil::null);
		menu->append(new LLMenuItemCallGL("Open", LLTextureCtrl::handleClickOpenTexture, NULL, this));
		menu->append(new LLMenuItemCallGL("Copy Asset UUID", LLTextureCtrl::handleClickCopyAssetID, NULL, this));
		menu->updateParent(LLMenuGL::sMenuContainer);
		menu->setCanTearOff(FALSE);
		LLMenuGL::showPopup(this, menu, x, y);
	}

	return handled;
}
Beispiel #3
0
LLNetMap::LLNetMap(
	const std::string& name,
	const LLRect& rect,
	const LLColor4& bg_color )
	:
	LLUICtrl(name, rect, FALSE, NULL, NULL), mBackgroundColor( bg_color ),
	mObjectMapTPM(1.f),
	mObjectMapPixels(255.f),
	mTargetPanX( 0.f ),
	mTargetPanY( 0.f ),
	mCurPanX( 0.f ),
	mCurPanY( 0.f ),
	mUpdateNow( FALSE )
{
	mPixelsPerMeter = gMiniMapScale / REGION_WIDTH_METERS;

	LLNetMap::sRotateMap = gSavedSettings.getBOOL( "MiniMapRotate" );
	
	// Surface texture is dynamically generated/updated.
// 	createObjectImage();

	mObjectImageCenterGlobal = gAgent.getCameraPositionGlobal();
	
	// TODO: exteralize hardcoded constants.
	const S32 DIR_WIDTH = 10;
	const S32 DIR_HEIGHT = 10;
	LLRect major_dir_rect(  0, DIR_HEIGHT, DIR_WIDTH, 0 );
	const LLColor4 minor_color( 1.f, 1.f, 1.f, .7f );
	const LLRect minor_dir_rect(  0, DIR_HEIGHT, DIR_WIDTH * 2, 0 );

	// Note: removing special treatment for north compass point (DEV-10559). -MG
	//mTextBoxNorth = new LLTextBox( "N", major_dir_rect );
	//mTextBoxNorth->setFontStyle(LLFontGL::DROP_SHADOW_SOFT);
	//addChild( mTextBoxNorth );
	mTextBoxNorth =	new LLTextBox( std::string("N"), major_dir_rect );
	mTextBoxNorth->setColor( minor_color );
	addChild( mTextBoxNorth );
	
	mTextBoxEast =	new LLTextBox( std::string("E"), major_dir_rect );
	mTextBoxEast->setColor( minor_color );
	addChild( mTextBoxEast );
	
	major_dir_rect.mRight += 1 ;
	mTextBoxWest =	new LLTextBox( std::string("W"), major_dir_rect );
	mTextBoxWest->setColor( minor_color );
	addChild( mTextBoxWest );
	major_dir_rect.mRight -= 1 ;

	mTextBoxSouth = new LLTextBox( std::string("S"), major_dir_rect );
	mTextBoxSouth->setColor( minor_color );
	addChild( mTextBoxSouth );

	mTextBoxSouthEast =	new LLTextBox( std::string("SE"), minor_dir_rect );
	mTextBoxSouthEast->setColor( minor_color );
	addChild( mTextBoxSouthEast );
	
	mTextBoxNorthEast = new LLTextBox( std::string("NE"), minor_dir_rect );
	mTextBoxNorthEast->setColor( minor_color );
	addChild( mTextBoxNorthEast );
	
	mTextBoxSouthWest =	new LLTextBox( std::string("SW"), minor_dir_rect );
	mTextBoxSouthWest->setColor( minor_color );
	addChild( mTextBoxSouthWest );

	mTextBoxNorthWest = new LLTextBox( std::string("NW"), minor_dir_rect );
	mTextBoxNorthWest->setColor( minor_color );
	addChild( mTextBoxNorthWest );

	// Right-click menu
	LLMenuGL* menu;
	menu = new LLMenuGL(std::string("popup"));
	menu->setCanTearOff(FALSE);
	menu->append(new LLMenuItemCallGL(std::string("Zoom Close"), handleZoomLevel,
										NULL, (void*)2) );
	menu->append(new LLMenuItemCallGL(std::string("Zoom Medium"), handleZoomLevel,
										NULL, (void*)1) );
	menu->append(new LLMenuItemCallGL(std::string("Zoom Far"), handleZoomLevel,
										NULL, (void*)0) );
	menu->appendSeparator();
	menu->append(new LLMenuItemCallGL(std::string("Stop Tracking"), &LLTracker::stopTracking,
										&LLTracker::isTracking, NULL) );
	menu->setVisible(FALSE);
	addChild(menu);
	mPopupMenuHandle = menu->getHandle();

	sInstance = this;
}