moi3d吧 关注:165贴子:380

自制的浮动菜单,效率有些提升

只看楼主收藏回复


script: /* Opens SidePane1 */ moi.ui.createDialog( 'moi://ui/SidePane1.htm' ); 复制它建立快捷键
--------------------------------------------分割--------------------------------------------
<html>
<head>
<style>
#MiddleBody {
padding:0 0.3em 0 0.2em;
height:5em; /* starts with this but then expands to fill */
overflow-y:auto;
overflow-x:hidden;
}
moi\:PaletteHeader > moi\:TabContainer {
display:-webkit-box;
-webkit-box-orient:horizontal;
-webkit-box-align:stretch;
autodeactivate:true;
}
moi\:PaletteHeader > moi\:TabContainer > moi\:TabButton {
display:block;
-webkit-box-flex:1;
}
moi\:PaletteBody:not(#CommandBody) > table {
width:100%;
visibility:hidden;
height:0px;
overflow:hidden;
border-collapse:collapse;
}
moi\:PaletteBody:not(#CommandBody) td {
padding:0px 2px 2px 2px;
vertical-align:top;
text-align:-webkit-center;
}
</style>
<script src="SidePaneTabs.js"></script>
<script src="PropPanelSize.js"></script>
</head>
<body class="SidePaneBody">
<vbox style="width:600px; height:300px;">
<flex_vbox id="MiddleBody">
<tr>
<td><moi:CommandButton icon="icons/LineSetIcon.png" commandSet="lines"><moi:Text textid="Lines"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/FreeformSetIcon.png" commandSet="freeform"><moi:Text textid="Freeform"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/RectSetIcon.png" commandSet="rectangles"><moi:Text textid="Rect"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/PolygonSetIcon.png" commandSet="polygons"><moi:Text textid="Polygon"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/CircleSetIcon.png" commandSet="circles"><moi:Text textid="Circles"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/ArcSetIcon.png" commandSet="arcs"><moi:Text textid="Arc"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/EllipseSetIcon.png" commandSet="ellipses"><moi:Text textid="Ellipse"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/MoreDrawCurvesIcon.png" commandset="moredrawcurves"><moi:Text textid="More"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/PlaneSetIcon.png" commandSet="planes"><moi:Text textid="Plane"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/BoxSetIcon.png" commandSet="boxes"><moi:Text textid="Box"/></moi:CommandButton></td>
</tr>
<tr>
<td><moi:CommandButton icon="icons/SphereIcon.png" command="sphere"><moi:Text textid="Sphere"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/CylinderIcon.png" command="cylinder"><moi:Text textid="Cylinder"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/ConeIcon.png" command="cone"><moi:Text textid="Cone"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/TextIcon.png" command="text"><moi:Text textid="Text"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/JoinIcon.png" command="join"><moi:Text textid="Join"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/SeparateIcon.png" command="separate"><moi:Text textid="Separate"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/TrimIcon.png" command="trim"><moi:Text textid="Trim"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/ExtendIcon.png" command="extend"><moi:Text textid="Extend"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/ShowPointsIcon.png" command="showpoints"><moi:Text textid="Show pts"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/AddPointIcon.png" command="addpoint"><moi:Text textid="Add pt"/></moi:CommandButton></td>
</tr>
<tr>
<td><moi:CommandButton icon="res://copyclipboardicon" command="copyclipboard" rcommand="copyclipboardwithorigin"><moi:Text textid="Copy clipboard"/></moi:CommandButton></td>
<td><moi:CommandButton icon="res://pasteicon" command="paste" rcommand="pastepart"><moi:Text textid="Paste"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/HideIcon.png" onclick="var gd = moi.geometryDatabase; if ( event.ctrlKey ) { gd.showSubset(); } else if ( event.button == 2 ) { gd.isolate(); } else { gd.hide(); }"><moi:Text textid="Hide"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/LockIcon.png" onclick="var gd = moi.geometryDatabase; if ( event.ctrlKey ) { gd.unlockSubset(); } else if ( event.button == 2 ) { gd.isolateLock(); } else { gd.lock(); }"><moi:Text textid="Lock"/></moi:CommandButton></td>
<td><moi:CommandButton icon="res://historyicon" command="history"><moi:Text textid="History"/></moi:CommandButton></td>
<td><moi:CommandButton icon="ViewReset.png" onclick="moi.view.resetAll();"><moi:Text textid="Reset all"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/ImageIcon.png" command="image"><moi:Text textid="Image"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/CPlaneIcon.png" onclick="if ( event.button == 2 ) { moi.view.resetCPlane(); } else { moi.view.setCPlaneInteractive(); }"><moi:Text textid="CPlane"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/SelectAllIcon.png" onclick="moi.geometryDatabase.selectAll();"><moi:Text textid="Sel all"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/DeselectAllIcon.png" onclick="moi.geometryDatabase.deselectAll();"><moi:Text textid="Desel all"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/InvertIcon.png" onclick="moi.geometryDatabase.invertSelection();"><moi:Text textid="Invert"/></moi:CommandButton></td>
</tr>
<tr>
<td><moi:CommandButton icon="icons/BooleanSetIcon.png" commandset="booleans"><moi:Text textid="Boolean"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/FilletIcon.png" commandset="fillets"><moi:Text textid="Fillet"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/OffsetSetIcon.png" commandset="offsets"><moi:Text textid="Offset"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/PlanarSrfIcon.png" command="planarsrf"><moi:Text textid="Planar"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/ExtrudeIcon.png" command="extrude"><moi:Text textid="Extrude"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/RevolveIcon.png" commandset="revolves"><moi:Text textid="Revolve"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/LoftIcon.png" command="loft"><moi:Text textid="Loft"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/SweepIcon.png" command="sweep"><moi:Text textid="Sweep"/></moi:CommandButton></tdd>
<td><moi:CommandButton icon="icons/BlendIcon.png" command="blend"><moi:Text textid="Blend"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/BlankIcon.png" command="nsided"><moi:Text textid="Nsided"/></moi:CommandButton></td>
</tr>
<tr>
<td><moi:CommandButton icon="icons/NetworkIcon.png" command="network"><moi:Text textid="Network"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/ProjectIcon.png" commandset="constructcurve"><moi:Text textid="ConstructCurve"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/MoveIcon.png" command="move"><moi:Text textid="Move"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/CopyIcon.png" command="copy"><moi:Text textid="Copy"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/RotateIcon.png" commandset="rotations"><moi:Text textid="Rotate"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/ScaleIcon.png" commandset="scalings"><moi:Text textid="Scale"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/MirrorIcon.png" command="mirror"><moi:Text textid="Mirror"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/ArrayIcon.png" commandset="arrays"><moi:Text textid="Array"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/AlignIcon.png" command="align"><moi:Text textid="Align"/></moi:CommandButton></td>
<td><moi:CommandButton icon="icons/OrientIcon.png" commandset="Orients"><moi:Text textid="Orient"/></moi:CommandButton></td>
</tr>
<tr>
<td><moi:CommandButton icon="icons/FlowIcon.png" commandset="deform"><moi:Text textid="Deform"/></moi:CommandButton></td>
<td><moi:CommandButton icon="moi://ui/icons/AlignHCenterIcon.png" command="Align HorizontalCenter"><moi:Text textid="Align horizontal center"/></moi:CommandButton>
<td><moi:CommandButton icon="moi://ui/icons/AlignTopIcon.png" command="Align HorizontalTop"><moi:Text textid="Align horizontal top"/></moi:CommandButton>
<td><moi:CommandButton icon="moi://ui/icons/AlignBottomIcon.png" command="Align HorizontalBottom"><moi:Text textid="Align horizontal bottom"/></moi:CommandButton>
<td><moi:CommandButton icon="moi://ui/icons/AlignVCenterIcon.png" command="Align VerticalCenter"><moi:Text textid="Align vertical center"/></moi:CommandButton>
<td><moi:CommandButton icon="moi://ui/icons/AlignLeftIcon.png" command="Align VerticalLeft"><moi:Text textid="Align vertical left"/></moi:CommandButton>
<td><moi:CommandButton icon="moi://ui/icons/AlignRightIcon.png" command="Align VerticalRight"><moi:Text textid="Align vertical right"/></moi:CommandButton>
</tr>
<tr>
</flex_vbox>
</vbox>
</body>
</html>
------------------------------------
复制上面网页代码保存为SidePane1.htm
放到ui文件目录下面就好了


IP属地:江苏1楼2020-03-23 19:08回复

    再简化些


    IP属地:江苏2楼2020-03-24 17:48
    收起回复
      2026-02-19 22:37:25
      广告
      不感兴趣
      开通SVIP免广告
      佩服!楼主高能!试试....................


      3楼2020-03-24 18:27
      回复
        d大佬,怎么操作啊?


        IP属地:重庆4楼2020-04-25 22:07
        回复
          太好了,谢谢


          来自iPhone客户端5楼2020-07-18 07:14
          回复
            感谢分享,请问能否实现选择工具后菜单自动关闭?


            IP属地:江苏6楼2020-08-03 22:16
            回复
              设置完了,打开后图标都挤到了一起...请问怎么解决?


              7楼2020-10-04 22:00
              收起回复
                <html>
                <style>
                /* Turn off text block under command button icon */
                moi\:CommandButton > div {
                display:none;
                }
                </style>
                <script src="SidePaneTabs.js"></script>
                <script src="PropPanelSize.js"></script>
                </head>
                <body class="SidePaneBody" >
                <vbox style="width:410px; height:260px;">
                <table>
                <tr>
                <td><moi:CommandButton icon="moi://ui/icons/LineIcon.png" style="width: 32px;height:32px" command="line"></moi:CommandButton></td>
                <td><moi:CommandButton icon="moi://ui/icons/PolylineIcon.png" style="width: 32px;height:32px"command="polyline"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/FreeformSetIcon.png" style="width: 32px;height:32px"commandSet="freeform"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/RectSetIcon.png" style="width: 32px;height:32px"commandSet="rectangles"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/PolygonSetIcon.png"style="width: 32px;height:32px" commandSet="polygons"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/CircleSetIcon.png"style="width: 32px;height:32px" commandSet="circles"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/ArcSetIcon.png" style="width: 32px;height:32px"commandSet="arcs"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/EllipseSetIcon.png" style="width: 32px;height:32px"commandSet="ellipses"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/PlaneSetIcon.png"style="width: 32px;height:32px" commandSet="planes"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/BoxSetIcon.png"style="width: 32px;height:32px" commandSet="boxes"></moi:CommandButton></td>
                </tr>
                <tr>
                <td><moi:CommandButton icon="icons/SphereIcon.png"style="width: 32px;height:32px" command="sphere"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/CylinderIcon.png"style="width: 32px;height:32px" command="cylinder"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/CPlaneIcon.png"style="width: 32px;height:32px" onclick="if ( event.button == 2 ) { moi.view.resetCPlane(); } else { moi.view.setCPlaneInteractive(); }"><moi:Text textid="CPlane"/></moi:CommandButton>
                <td><moi:CommandButton icon="icons/TextIcon.png"style="width: 32px;height:32px" command="text"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/JoinIcon.png" style="width: 32px;height:32px"command="join"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/SeparateIcon.png" style="width: 32px;height:32px"command="separate"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/TrimIcon.png" style="width: 32px;height:32px"command="trim"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/ExtendIcon.png"style="width: 32px;height:32px" command="extend"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/ShowPointsIcon.png" style="width: 32px;height:32px"command="showpoints"></moi:CommandButton></td>
                <td><moi:CommandButton icon="icons/AddPointIcon.png"style="width: 32px;height:32px" command="addpoint"></moi:CommandButton></td>
                </tr>
                <tr>
                <td><moi:CommandButton icon="icons/HideIcon.png"style="width: 32px;height:32px" onclick="var gd = moi.geometryDatabase; if ( event.ctrlKey ) { gd.showSubset(); } else if ( event.button == 2 ) { gd.isolate(); } else { gd.hide(); }"></moi:CommandButton></td>
                <td><moi:CommandButton icon="moi://ui/icons/BooleanDifferenceIcon.png"style="width: 32px;height:32px" command="BooleanDifference"></moi:CommandButton></td>
                <td><moi:CommandButton icon="moi://ui/icons/BooleanUnionIcon.png"style="width: 32px;height:32px" command="BooleanUnion"></moi:CommandButton></td>
                <td><moi:CommandButton icon="moi://ui/icons/BooleanIntersectionIcon.png"style="width: 32px;height:32px" command="BooleanIntersection"></moi:CommandButton></td>


                IP属地:江苏8楼2020-10-05 18:03
                回复
                  2026-02-19 22:31:25
                  广告
                  不感兴趣
                  开通SVIP免广告
                  <td><moi:CommandButton icon="moi://ui/icons/FilletIcon.png"style="width: 32px;height:32px" command="fillet"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="moi://ui/icons/ChamferIcon.png"style="width: 32px;height:32px" command="chamfer"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="moi://ui/icons/OffsetIcon.png"style="width: 32px;height:32px" command="offset"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="moi://ui/icons/ShellIcon.png"style="width: 32px;height:32px" command="shell"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="moi://ui/icons/InsetIcon.png"style="width: 32px;height:32px" command="inset"></moi:CommandButton></td>
                  </tr>
                  <tr>
                  <td><moi:CommandButton icon="icons/PlanarSrfIcon.png"style="width: 32px;height:32px" command="planarsrf"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/ExtrudeIcon.png"style="width: 32px;height:32px" command="extrude"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/RevolveIcon.png"style="width: 32px;height:32px" commandset="revolves"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/LoftIcon.png"style="width: 32px;height:32px" command="loft"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/SweepIcon.png"style="width: 32px;height:32px" command="sweep"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/BlendIcon.png"style="width: 32px;height:32px" command="blend"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/NSidedIcon.png"style="width: 32px;height:32px" command="nsided"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/NetworkIcon.png"style="width: 32px;height:32px" command="network"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/ProjectIcon.png"style="width: 32px;height:32px" commandset="constructcurve"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/MoveIcon.png"style="width: 32px;height:32px" command="move"></moi:CommandButton></td>
                  </tr>
                  <tr>
                  <td><moi:CommandButton icon="icons/CopyIcon.png"style="width: 32px;height:32px" command="copy"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/RotateIcon.png"style="width: 32px;height:32px" commandset="rotations"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/ScaleIcon.png"style="width: 32px;height:32px" commandset="scalings"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="icons/MirrorIcon.png"style="width: 32px;height:32px" command="mirror"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="moi://ui/icons/ArrayIcon.png"style="width: 32px;height:32px" command="arraygrid"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="moi://ui/icons/ArrayDirIcon.png"style="width: 32px;height:32px" command="arraydir"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="moi://ui/icons/ArrayCircularIcon.png"style="width: 32px;height:32px" command="arraycircular"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="moi://ui/icons/ArrayCurveIcon.png"style="width: 32px;height:32px" command="arraycurve"></moi:CommandButton></td>
                  <td><moi:CommandButton icon="moi://ui/icons/OrientIcon.png"style="width: 32px;height:32px" command="orient"></moi:CommandButton></td>


                  IP属地:江苏9楼2020-10-05 18:04
                  回复
                    <td><moi:CommandButton icon="moi://ui/icons/OrientLineToLineIcon.png"style="width: 32px;height:32px" command="orientlinetoline"></moi:CommandButton></td>
                    </tr>
                    <tr>
                    <td><moi:CommandButton icon="moi://ui/icons/OrientViewToViewIcon.png"style="width: 32px;height:32px" command="orientviewtoview"></moi:CommandButton></td>
                    <td><moi:CommandButton icon="moi://ui/icons/FlowIcon.png"style="width: 32px;height:32px" command="Flow"></moi:CommandButton></td>
                    <td><moi:CommandButton icon="moi://ui/icons/TwistIcon.png"style="width: 32px;height:32px" command="Twist"></moi:CommandButton></td>
                    <td><moi:CommandButton icon="moi://ui/icons/PipeIcon.png"style="width: 32px;height:32px" command="Pipe"></moi:CommandButton></td>
                    <td><moi:CommandButton icon="moi://ui/icons/AlignHCenterIcon.png"style="width: 32px;height:32px" command="Align HorizontalCenter"></moi:CommandButton></td>
                    <td><moi:CommandButton icon="moi://ui/icons/AlignTopIcon.png"style="width: 32px;height:32px" command="Align HorizontalTop"></moi:CommandButton></td>
                    <td><moi:CommandButton icon="moi://ui/icons/AlignBottomIcon.png"style="width: 32px;height:32px" command="Align HorizontalBottom"></moi:CommandButton></td>
                    <td><moi:CommandButton icon="moi://ui/icons/AlignVCenterIcon.png"style="width: 32px;height:32px" command="Align VerticalCenter"></moi:CommandButton></td>
                    <td><moi:CommandButton icon="moi://ui/icons/AlignLeftIcon.png"style="width: 32px;height:32px" command="Align VerticalLeft"></moi:CommandButton></td>
                    <td><moi:CommandButton icon="moi://ui/icons/AlignRightIcon.png"style="width: 32px;height:32px" command="Align VerticalRight"></moi:CommandButton></td>
                    </tr>
                    </table>
                    </body>
                    </html>
                    编码更新


                    IP属地:江苏10楼2020-10-05 18:05
                    回复
                      快捷键设置script: var panel = null; try { panel = moi.ui.getUIPanel( 'moi://ui/SidePane1.htm' ); } catch(e){} if ( panel ) { panel.moiWindow.close(); } else { moi.ui.createDialog( 'SidePane1.htm' ); }
                      再按一次快捷键可关闭快捷菜单


                      IP属地:江苏11楼2020-10-05 18:07
                      回复
                        楼主这个V4的怎么汉化呢


                        IP属地:江苏12楼2020-12-11 16:36
                        回复
                          420x260 px


                          IP属地:江苏13楼2021-02-05 14:42
                          回复
                            感谢大佬了,安装使用OK


                            IP属地:广东14楼2021-09-22 10:38
                            回复