MUSH中的miniwindow(一 )

1、name = "A" .. GetPluginID ()

      the name we are calling it, simply prepend "A", "B", etc.

2、long WindowCreate(BSTR Name, long Left, long Top, long Width, long Height, short Position, long Flags, long BackgroundColour)

       Left, Top -设定左上顶点,如果设为0,0就可以用后面的自动定位参数

       Width, Height - 设定窗口的宽和高.

       Position - 自动定位参数,具体见下表.

                Value                Purpose                                                   Lua symbol
                   0         Stretch to output view size                    miniwin.pos_stretch_to_view
                   1         Stretch with aspect ratio                       miniwin.pos_stretch_to_view_with_aspect
                   2         Strech to owner size                             miniwin.pos_stretch_to_owner
                   3         Stretch with aspect ratio                       miniwin.pos_stretch_to_owner_with_aspect
                   4         Top left                                                     miniwin.pos_top_left
                   5         Center left-right at top                           miniwin.pos_top_center
                   6         Top right                                                   miniwin.pos_top_right
                   7         On right, center top-bottom                   miniwin.pos_center_right
                   8         On right, at bottom                                   miniwin.pos_bottom_right
                   9         Center left-right at bottom                      miniwin.pos_bottom_center
                 10         On left, at bottom                                      miniwin.pos_bottom_left
                 11         On left, center top-bottom                     miniwin.pos_center_left
                 12         Centre all                                                  miniwin.pos_center_all
                 13         Tile                                                              miniwin.pos_tile

        Flags通常设成0就可以

3、long WindowDelete(BSTR Name)

4、long WindowShow(BSTR Name, BOOL Show)

5、VARIANT WindowList()

-- show all windows
windows = WindowList()

if windows then
  for _, v in ipairs (windows) do 
    Note (v) 
  end
end -- if any 

6、VARIANT WindowInfo(BSTR Name, long InfoType)

      Name - the name of an existing miniwindow.

      InfoType - the information you want:
           1: Left (from WindowCreate)
            2: Top (from WindowCreate)
           3: Width
           4: Height
           5: Show flag
           6: Is it hidden right now?
           7: Layout position code
           8: Flags
           9: Background colour
         10: Where it is right now: left
         11: Where it is right now: top
         12: Where it is right now: right
         13: Where it is right now: bottom
         14: Where mouse last was (mouse down, mouse up or move) - X position - relative to miniwindow 
         15: Where mouse last was (mouse down, mouse up or move) - Y position - relative to miniwindow
         16: Incremented each time items 14/15 are updated.
         17: Where mouse was (during drag operation) - X position - relative to output window
         18: Where mouse was (during drag operation) - y position - relative to output window
         19: Hotspot ID of the hotspot currently being moused-over (empty string if none)
         20: Hotspot ID of the hotspot currently being moused-down in (empty string if none)
         21: Date/time the miniwindow was installed.

7、long WindowPosition(BSTR Name, long Left, long Top, short Position, long Flags)         重新定位窗口,参数与create相同

8、long WindowResize(BSTR WindowName, long Width, long Height, long BackgroundColour)    改变窗口大小颜色


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值