⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 show mouse coords.lua

📁 J2ME手机游戏开发中地图生成软件 可以将地图以数组形式输出
💻 LUA
字号:
-- Show mouse coords

function main ()
 if (mappy.getValue(mappy.MAPWIDTH) == 0) then
  mappy.msgBox ("Show mouse coords", "You need to load or create a map first", mappy.MMB_OK, mappy.MMB_ICONINFO)
 else

  local x = mappy.getValue (mappy.MOUSEBLOCKX)
  local y = mappy.getValue (mappy.MOUSEBLOCKY)
  mappy.msgBox("Show mouse coords", "This script should be run from a keypress, see 'Key Shortcuts' in the docs. Mouse is over block "..x..", "..y..". Useful for writing scripts which modify the map at mouse location...", mappy.MMB_OK, mappy.MMB_ICONINFO)

 end
end

test, errormsg = pcall( main )
if not test then
    mappy.msgBox("Error ...", errormsg, mappy.MMB_OK, mappy.MMB_ICONEXCLAMATION)
end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -