diff options
-rw-r--r-- | .hgignore | 1 | ||||
-rw-r--r-- | indra/llui/lltexteditor.cpp | 35 | ||||
-rw-r--r-- | indra/llui/lltexteditor.h | 4 | ||||
-rw-r--r-- | indra/newview/lldrawpool.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llface.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 3 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_preview_gesture.xml | 340 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_text_editor.xml | 54 |
9 files changed, 372 insertions, 78 deletions
@@ -43,3 +43,4 @@ tarfile_tmp ^indra/web/dataservice/locale.* ^indra/web/dataservice/lib/shared/vault.* ^indra/web/dataservice/vendor.* +glob:indra/newview/dbghelp.dll diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 0ca9a18e0c..570ca4b998 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -63,6 +63,7 @@ #include "llpanel.h" #include "llurlregistry.h" #include "lltooltip.h" +#include "llmenugl.h" #include <queue> #include "llcombobox.h" @@ -252,7 +253,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) : mHandleEditKeysDirectly( p.handle_edit_keys_directly ), mMouseDownX(0), mMouseDownY(0), - mTabsToNextField(p.ignore_tab) + mTabsToNextField(p.ignore_tab), + mContextMenu(NULL) { mDefaultFont = p.font; @@ -301,6 +303,8 @@ LLTextEditor::~LLTextEditor() // Scrollbar is deleted by LLView std::for_each(mUndoStack.begin(), mUndoStack.end(), DeletePointer()); + + delete mContextMenu; } //////////////////////////////////////////////////////////// @@ -702,6 +706,19 @@ BOOL LLTextEditor::handleMouseDown(S32 x, S32 y, MASK mask) return handled; } +BOOL LLTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + BOOL handled = LLTextBase::handleRightMouseDown(x, y, mask); + if (!handled && hasTabStop()) + { + setFocus( TRUE ); + showContextMenu(x, y); + handled = TRUE; + } + return handled; +} + + BOOL LLTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask) { @@ -736,7 +753,6 @@ BOOL LLTextEditor::handleHover(S32 x, S32 y, MASK mask) setCursorAtLocalPos( clamped_x, clamped_y, true ); mSelectionEnd = mCursorPos; } - lldebugst(LLERR_USER_INPUT) << "hover handled by " << getName() << " (active)" << llendl; getWindow()->setCursor(UI_CURSOR_IBEAM); handled = TRUE; @@ -1991,6 +2007,21 @@ void LLTextEditor::setEnabled(BOOL enabled) } } +void LLTextEditor::showContextMenu(S32 x, S32 y) +{ + if (!mContextMenu) + { + mContextMenu = LLUICtrlFactory::instance().createFromFile<LLContextMenu>("menu_text_editor.xml", + LLMenuGL::sMenuContainer, + LLMenuHolderGL::child_registry_t::instance()); + } + + S32 screen_x, screen_y; + localPointToScreen(x, y, &screen_x, &screen_y); + mContextMenu->show(screen_x, screen_y); +} + + void LLTextEditor::drawPreeditMarker() { static LLUICachedControl<F32> preedit_marker_brightness ("UIPreeditMarkerBrightness", 0); diff --git a/indra/llui/lltexteditor.h b/indra/llui/lltexteditor.h index 481a4d1a78..4847f4d117 100644 --- a/indra/llui/lltexteditor.h +++ b/indra/llui/lltexteditor.h @@ -99,6 +99,7 @@ public: // mousehandler overrides virtual BOOL handleMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleMouseUp(S32 x, S32 y, MASK mask); + virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); virtual BOOL handleHover(S32 x, S32 y, MASK mask); virtual BOOL handleDoubleClick(S32 x, S32 y, MASK mask ); virtual BOOL handleMiddleMouseDown(S32 x,S32 y,MASK mask); @@ -201,6 +202,7 @@ public: void getSelectedSegments(segment_vec_t& segments) const; protected: + void showContextMenu(S32 x, S32 y); void drawPreeditMarker(); void assignEmbedded(const std::string &s); @@ -328,6 +330,8 @@ private: LLCoordGL mLastIMEPosition; // Last position of the IME editor keystroke_signal_t mKeystrokeSignal; + + LLContextMenu* mContextMenu; }; // end class LLTextEditor diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 976f02eeb7..d8c34581d5 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -442,6 +442,7 @@ void LLRenderPass::renderTexture(U32 type, U32 mask) void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture) { + llpushcallstacks ; for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i) { LLDrawInfo* pparams = *i; diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 4246cbc27f..09b3ce1e86 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -856,6 +856,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, const LLMatrix4& mat_vert, const LLMatrix3& mat_normal, const U16 &index_offset) { + llpushcallstacks ; const LLVolumeFace &vf = volume.getVolumeFace(f); S32 num_vertices = (S32)vf.mVertices.size(); S32 num_indices = (S32)vf.mIndices.size(); @@ -864,7 +865,15 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { if (num_indices + (S32) mIndicesIndex > mVertexBuffer->getNumIndices()) { - llwarns << "Index buffer overflow!" << llendl; + llwarns << "Index buffer overflow!" << llendl; + llwarns << "Indices Count: " << mIndicesCount + << " VF Num Indices: " << num_indices + << " Indices Index: " << mIndicesIndex + << " VB Num Indices: " << mVertexBuffer->getNumIndices() << llendl; + llwarns << "Last Indices Count: " << mLastIndicesCount + << " Last Indices Index: " << mLastIndicesIndex + << " Face Index: " << f + << " Pool Type: " << mPoolType << llendl; return FALSE; } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index d896e1f7db..7d4bef3f7d 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -2988,6 +2988,7 @@ static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { + llpushcallstacks ; if (group->changeLOD()) { group->mLastUpdateDistance = group->mDistance; @@ -3218,6 +3219,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) static LLFastTimer::DeclareTimer FTM_VOLUME_GEOM("Volume Geometry"); void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) { + llpushcallstacks ; if (group->isState(LLSpatialGroup::MESH_DIRTY) && !group->isState(LLSpatialGroup::GEOM_DIRTY)) { LLFastTimer tm(FTM_VOLUME_GEOM); @@ -3308,6 +3310,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group) void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort) { + llpushcallstacks ; //calculate maximum number of vertices to store in a single buffer U32 max_vertices = (gSavedSettings.getS32("RenderMaxVBOSize")*1024)/LLVertexBuffer::calcStride(group->mSpatialPartition->mVertexDataMask); max_vertices = llmin(max_vertices, (U32) 65535); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b50e71bf48..a37de468b3 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1797,6 +1797,7 @@ void LLPipeline::rebuildPriorityGroups() void LLPipeline::rebuildGroups() { + llpushcallstacks ; // Iterate through some drawables on the non-priority build queue S32 size = (S32) mGroupQ2.size(); S32 min_count = llclamp((S32) ((F32) (size * size)/4096*0.25f), 1, size); diff --git a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml index a523f40bb8..11c4e5d8fb 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_gesture.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <floater auto_tile="true" - height="800" + height="460" layout="topleft" name="gesture_preview" help_topic="gesture_preview" @@ -46,10 +46,11 @@ height="10" layout="topleft" left="10" - name="Name" + name="desc_label" top="25" + font.style="BOLD" width="100"> - Name (not working yet): + Description: </text> <line_editor follows="left|top" @@ -67,70 +68,270 @@ height="10" layout="topleft" left="10" - name="desc_label" + font.style="BOLD" + name="trigger_label" top_pad="10" width="100"> - Description: + Trigger: </text> <line_editor follows="left|top" - height="40" + height="20" + layout="topleft" + left_delta="84" + max_length="31" + name="trigger_editor" + top_delta="-4" + width="180" /> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifSmall" + height="10" + layout="topleft" + left="10" + font.style="BOLD" + name="replace_text" + tool_tip="Replace the trigger word(s) with these words. For example, trigger 'hello' replace with 'howdy' will turn the chat 'I wanted to say hello' into 'I wanted to say howdy' as well as playing the gesture!" + top_pad="10" + width="200"> + Replace with: + </text> + <line_editor + follows="left|top" + height="20" + layout="topleft" + left_delta="84" + max_length="31" + name="replace_editor" + tool_tip="Replace the trigger word(s) with these words. For example, trigger 'hello' replace with 'howdy' will turn the chat 'I wanted to say hello' into 'I wanted to say howdy' as well as playing the gesture" + top_delta="-4" + width="180" /> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifSmall" + height="10" + layout="topleft" + left="10" + font.style="BOLD" + name="key_label" + top_pad="10" + width="100"> + Shortcut Key: + </text> + <combo_box + height="20" + label="None" layout="topleft" left_delta="84" - name="desc2" + name="modifier_combo" top_delta="-4" + width="75" /> + <combo_box + height="20" + label="None" + layout="topleft" + left_pad="10" + name="key_combo" + top_delta="0" + width="75" /> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifSmall" + height="10" + layout="topleft" + left="10" + font.style="BOLD" + name="library_label" + top="135" + width="100"> + Library: + </text> + <scroll_list + follows="top|left" + height="60" + layout="topleft" + left="10" + name="library_list" + top="150" + width="180"> + <scroll_list.rows + value="Animation" /> + <scroll_list.rows + value="Sound" /> + <scroll_list.rows + value="Chat" /> + <scroll_list.rows + value="Wait" /> + </scroll_list> + <button + follows="top|left" + height="20" + font="SansSerifSmall" + label="Add >>" + layout="topleft" + left_pad="10" + name="add_btn" + top_delta="0" + width="70" /> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifSmall" + height="10" + layout="topleft" + left="10" + font.style="BOLD" + name="steps_label" + top_pad="50" + width="100"> + Steps: + </text> + <scroll_list + follows="top|left" + height="85" + layout="topleft" + left="10" + name="step_list" + top_pad="5" width="180" /> - - <accordion - layout="topleft" - left="2" - width="276" - top="95" - height="580" - follows="all" - name="group_accordion"> - <accordion_tab - min_height="90" - title="Shortcuts" - name="snapshot_destination_tab" - an_resize="false"> - <panel - class="floater_preview_shortcut" - filename="floater_preview_gesture_shortcut.xml" - name="floater_preview_shortcut"/> - </accordion_tab> - <accordion_tab - min_height="400" - title="Steps" - name="snapshot_file_settings_tab" - can_resize="false"> - <panel - class="floater_preview_steps" - filename="floater_preview_gesture_steps.xml" - name="floater_preview_steps"/> - </accordion_tab> - <accordion_tab - min_height="155" - title="Info" - name="snapshot_capture_tab" - can_resize="false"> - <panel - class="floater_preview_info" - filename="floater_preview_gesture_info.xml" - name="floater_preview_info"/> - </accordion_tab> - <!--accordion_tab - min_height="100" - title="Permissions" - name="snapshot_capture_tab2" - can_resize="false"> - <panel - class="floater_snapshot_capture" - filename="floater_snapshot_Permissions.xml" - name="snapshot_capture_panel2"/> - </accordion_tab--> - </accordion> - <!--check_box + <button + follows="top|left" + height="20" + font="SansSerifSmall" + label="Up" + layout="topleft" + left_pad="10" + name="up_btn" + top_delta="0" + width="70" /> + <button + follows="top|left" + height="20" + font="SansSerifSmall" + label="Down" + layout="topleft" + left_delta="0" + name="down_btn" + top_pad="10" + width="70" /> + <button + follows="top|left" + height="20" + font="SansSerifSmall" + label="Remove" + layout="topleft" + left_delta="0" + name="delete_btn" + top_pad="10" + width="70" /> + <text + follows="top|left" + height="60" + layout="topleft" + left="15" + name="options_text" + top="330" + width="205" /> + <combo_box + follows="top|left" + height="20" + layout="topleft" + left_delta="15" + name="animation_list" + top="345" + width="100" /> + <combo_box + follows="top|left" + height="20" + layout="topleft" + left_delta="0" + name="sound_list" + top_delta="0" + width="100" /> + <line_editor + follows="top|left" + height="20" + layout="topleft" + left_delta="0" + max_length="127" + name="chat_editor" + top_delta="0" + width="100" /> + <radio_group + draw_border="false" + follows="top|left" + height="40" + layout="topleft" + left_pad="8" + name="animation_trigger_type" + top_delta="0" + width="80"> + <radio_item + height="16" + label="Start" + layout="topleft" + left="3" + name="start" + top="-11" + width="80" /> + <radio_item + height="16" + label="Stop" + layout="topleft" + left_delta="0" + name="stop" + top_pad="10" + width="80" /> + </radio_group> + <check_box + follows="top|left" + height="20" + label="until animations are done" + layout="topleft" + left="16" + name="wait_anim_check" + top="340" + width="100" /> + <check_box + follows="top|left" + height="20" + label="time in seconds" + layout="topleft" + left_delta="0" + name="wait_time_check" + top_delta="20" + width="100" /> + <line_editor + follows="top|left" + height="20" + layout="topleft" + left_pad="5" + max_length="15" + name="wait_time_editor" + top_delta="0" + width="50" /> + <text + type="string" + length="1" + follows="top|left" + font="SansSerifSmall" + height="30" + layout="topleft" + left="10" + name="help_label" + top_pad="20" + word_wrap="true" + width="265"> + All steps happen simultaneously, unless you add wait steps. + </text> + <check_box follows="top|left" height="20" label="Active" @@ -138,35 +339,24 @@ left="20" name="active_check" tool_tip="Active gestures can be triggered by chatting their trigger phrases or pressing their hot keys. Gestures usually become inactive when there is a key binding conflict." - top="365" - width="100" /--> - + top_pad="0" + width="100" /> <button - follows="bottom|left" + follows="top|left" height="20" label="Preview" layout="topleft" - left="20" + left_delta="75" name="preview_btn" - top_pad="30" + top_delta="2" width="80" /> <button follows="top|left" height="20" label="Save" layout="topleft" - left_pad="5" + left_pad="10" name="save_btn" top_delta="0" width="80" /> - <button - follows="top|left" - height="20" - label="Cancel (not working)" - layout="topleft" - left_pad="5" - name="cancel_btn" - top_delta="0" - width="80" /> - </floater>
\ No newline at end of file diff --git a/indra/newview/skins/default/xui/en/menu_text_editor.xml b/indra/newview/skins/default/xui/en/menu_text_editor.xml new file mode 100644 index 0000000000..7c9e6f0796 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_text_editor.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + name="Text editor context menu"> + <menu_item_call + label="Cut" + layout="topleft" + name="Cut" + shortcut="control|X"> + <menu_item_call.on_click + function="Edit.Cut" /> + <menu_item_call.on_enable + function="Edit.EnableCut" /> + </menu_item_call> + <menu_item_call + label="Copy" + layout="topleft" + name="Copy" + shortcut="control|C"> + <menu_item_call.on_click + function="Edit.Copy" /> + <menu_item_call.on_enable + function="Edit.EnableCopy" /> + </menu_item_call> + <menu_item_call + label="Paste" + layout="topleft" + name="Paste" + shortcut="control|V"> + <menu_item_call.on_click + function="Edit.Paste" /> + <menu_item_call.on_enable + function="Edit.EnablePaste" /> + </menu_item_call> + <menu_item_call + label="Delete" + layout="topleft" + name="Delete" + shortcut="Del"> + <menu_item_call.on_click + function="Edit.Delete" /> + <menu_item_call.on_enable + function="Edit.EnableDelete" /> + </menu_item_call> + <menu_item_call + label="Select All" + layout="topleft" + name="Select All" + shortcut="control|A"> + <menu_item_call.on_click + function="Edit.SelectAll" /> + <menu_item_call.on_enable + function="Edit.EnableSelectAll" /> + </menu_item_call> +</context_menu> |