-- 中断线程 local function interruptThread(thread) if thread then pcall(function() thread:interrupt() end) end end -- 获取异步线程回调 local function getASyncThreadCallbak(func) return function() luajava.startThread(function() return pcall(func) end) end end -- 工厂方式创建复用 GradientDrawable layout local function newGradientDrawableLayout(layout) local baseLayout = { GradientDrawable, cornerRadius = '15dp', color = 0x20000000 } return table.copy(baseLayout, layout) end -- 获取同步线程回调, 涉及gg类库的回调只能使用这种,否则可能不稳定 local task local function getSyncThreadCallbak(func) return function() if task then gg.toast('正在运行其它任务,再稍后!') return end luajava.startThread(function() task = true pcall(func) task = nil end) end end -- 获取同步线程回调并执行 local function callSyncThreadCallbak(func) return getSyncThreadCallbak(func)() end -- 通过功能名称找 function 并获取同步线程回调 local function findFunctionByName(name) local func = _ENV[name] if not isFunction(func) then gg.alert(string.format('不存在 %q 功能', name)) return nil end return getSyncThreadCallbak(func) end -- 按钮布局 local function newButtonLayout(name) if not isString(name) then return end local layout = { Button, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_margin = '2dp', text = name, textSize = '16sp', onClick = findFunctionByName(name) } return layout end -- 开关布局 local function newSwitchLayout(openName, closeName) if not isString(openName) then return end local layout = { Switch, layout_width = 'match_parent', text = openName, onCheckedChange = function(CompoundButton, state) local func local cacheName = '多线程' if state then -- 设置开关文本为“关闭”的文本 if isString(closeName) then CompoundButton:setText(closeName) end -- 找“打开”的功能函数 func = findFunctionByName(openName) else -- 设置开关文本为“打开”的文本 CompoundButton:setText(openName) if isString(closeName) then -- 找“关闭”的功能函数 func = findFunctionByName(closeName) end end if isFunction(func) then -- 通过 findFunctionByName 获取的函数已经是被多线程包裹的,所以直接执行就可以了 func() end end } return layout end --多选布局 local function newCheckBoxLayout(openName, closeName) if not isString(openName) then return end local layout = { CheckBox, layout_width = 'match_parent', text = openName, onCheckedChange = function(CompoundButton, state) local func local cacheName = '多线程' if state then -- 设置开关文本为“关闭”的文本 if isString(closeName) then CompoundButton:setText(closeName) end -- 找“打开”的功能函数 func = findFunctionByName(openName) else -- 设置开关文本为“打开”的文本 CompoundButton:setText(openName) if isString(closeName) then -- 找“关闭”的功能函数 func = findFunctionByName(closeName) end end if isFunction(func) then -- 通过 findFunctionByName 获取的函数已经是被多线程包裹的,所以直接执行就可以了 func() end end } return layout end local function newyyLayout(name, id) if not isString(name) then return end local layout = { Switch, layout_width = 'match_parent', text = name, onClick = function() gg.toast('开始播放['..name..']') gg.playMusic("http://music.163.com/song/media/outer/url?id="..id..".mp3") end } return layout end function newcheck(radio) firadio={LinearLayout,layout_width = 'match_parent',layout_height = "match_parent",orientation="vertical"} if type(radio[1])=="string" or type(radio[1])=="number" then firadio[#firadio+1]={TextView,text=radio[1],textColor="#ffffff",} end radios={LinearLayout,orientation="horizontal",gravity="center",background="#00C92E37",layout_width = 'match_parent',} for i=2,#radio do local name = radio[i][1] local func1 = radio[i][2] local func2 = radio[i][3] local nid = radio[i][4] if not name then name = "未设置" end nid = name..guid() local func = 开关(nid,func1,func2) radios[#radios+1]={CheckBox, text=radio[i][1], textSize="9sp", textColor="#ffffff", onClick=function() luajava.newThread(function() pcall(func) end):start() end, } end firadio[#firadio+1]=radios return luajava.loadlayout(firadio) end function newradio(radio) firadio={LinearLayout, layout_width = 'match_parent', layout_height = "match_parent", orientation="horizontal" } if type(radio[1])=="string" or type(radio[1])=="number" then --firadio[#firadio+1]={TextView,text=radio[1],textColor="#ffffff",} end radios={RadioGroup,orientation="horizontal",gravity="center",background="#00C92E37",layout_width = 'match_parent',} for i=2,#radio do radios[#radios+1]={ RadioButton, text=radio[i][1], textColor="#ffffff", textSize="11sp", onClick=function() luajava.newThread(function() pcall(radio[i][2]) end):start() end, } end firadio[#firadio+1]=radios return luajava.loadlayout(firadio) end function 开关(name,func1,func2) if func1 == nil then func1 = "" end if func2 == nil then func2 = "" end if type(func1) == "function" then return function() namers = _ENV[name] if namers ~= "开" then _ENV[name] = "开" func1() else _ENV[name] = "关" func2() end end end end function guid() seed = { 'e','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' } tb = {} for i = 1,32 do table.insert(tb,seed[math.random(1,16)]) end sid = table.concat(tb) return string.format('%s%s%s%s%s', string.sub(sid,1,8), string.sub(sid,10,12), string.sub(sid,21,22)) ..string.format('%s%s%s%s%s', string.sub(sid,1,6), string.sub(sid,21,25) ) end local function getASyncThreadCallbak(func) return function() luajava.startThread(function() return pcall(func) end) end end -- 应用在101行 local task local function getSyncThreadCallbak(func) return function() if task then gg.toast('正在运行其它任务,再稍后!') return end luajava.startThread(function() task=true pcall(func) task=nil end) end end function newradio(radio) firadio={LinearLayout, layout_width = 'match_parent', layout_height = "match_parent", orientation="horizontal" } if type(radio[1])=="string" or type(radio[1])=="number" then --firadio[#firadio+1]={TextView,text=radio[1],textColor="#ffffff",} end radios={RadioGroup,orientation="horizontal",gravity="center",background="#00C92E37",layout_width = 'match_parent',} for i=2,#radio do radios[#radios+1]={ RadioButton, text=radio[i][1], textColor="#ffffff", textSize="11sp", onClick=function() luajava.newThread(function() pcall(radio[i][2]) end):start() end, } end firadio[#firadio+1]=radios return luajava.loadlayout(firadio) end function 开关(name,func1,func2) if func1 == nil then func1 = "" end if func2 == nil then func2 = "" end if type(func1) == "function" then return function() namers = _ENV[name] if namers ~= "开" then _ENV[name] = "开" func1() else _ENV[name] = "关" func2() end end end end function syseek2(name,bian,smin,smax,nows,func) smin = tonumber(smin) smax = tonumber(smax) chajv[bian] = smax-smin chazhi[bian] = 1-smin if smin == nil then smin = 1 smax = 10 end truesmin = 1 truesmax = truesmin+chajv[bian] if not nows then nows = smin tnows = (smin-nows) else tnows = (nows-smin)+1 end if _ENV[bian] == nil then _ENV[bian] = nows end if not name then name = "未设置" end local names = name..guid() rest = luajava.loadlayout({ LinearLayout, layout_width = 'fill_parent', gravity = "center", layout_height = "wrap_content", { LinearLayout, layout_width = 'fill_parent', layout_height = "fill_parent", layout_marginTop = "5dp", layout_marginBottom = "5dp", layout_marginLeft = "0dp", layout_marginRight = "0dp", gravity = "center_vertical", background = luajava.loadlayout { GradientDrawable, color = "#80000000", cornerRadius = 38 }, { SeekBar, layout_width = '150dp', layout_height="30dp", --minHight= min = truesmin, max = truesmax, progress = tnows, splitTrack="false", maxHeight="10dp", --thumb=luajava.getBitmapDrawable("/sdcard/念川/图片/blueseek"), onSeekBarChange = { onProgressChanged = function(SeekBar, var2, var3) if not var3 then return end local resultvar = tonumber(string.sub(var2,0,-3))-chazhi[bian] luajava.runUiThread(function() luajava.getIdValue(names):setText(name..":".. resultvar) end) _ENV[bian] = resultvar end, onStopTrackingTouch=function(SeekBar, var2, var3) luajava.newThread(function() gg.sleep(100) func(SeekBar:getProgress()) end):start() end, }},{ TextView, gravity = "top", text = name..":"..nows, id = luajava.newId(names), layout_width = '100dp', layout_marginLeft = "5dp", layout_marginRight = "0dp", } }}) return rest end local function interruptThread(thread) if thread then pcall(function() thread:interrupt() end) end end local floatingWindowManager = require('floatingWindowManager') floatingWindowManager:init() floatingWindowManager:newWindow(('仙'):format(floatingWindowManager.version), { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_margin = '10dp', layout_width = 'match_parent', layout_height = 'match_parent', { LinearLayout, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_height = 'match_parent', orientation = 'vertical', padding = '10dp', { Button, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_margin = '5dp', text = '选择进程', textSize = '16sp', onClick = function() gg.setProcessX() string.toMusic("选择进程") end }, { Button, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_margin = '5dp', text = '控制器1', textSize = '16sp', onClick = function() floatingWindowManager:start('控 制 器1') end }, { Button, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_margin = '5dp', text = '控制器2', textSize = '16sp', onClick = function() floatingWindowManager:start('控 制 器2') end }, { Button, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_margin = '5dp', text = '控制器3', textSize = '16sp', onClick = function() floatingWindowManager:start('控 制 器3') end }, { Button, background = floatingWindowManager:getStateListDrawable(), layout_width = 'match_parent', layout_margin = '5dp', text = '多功能控制器4', textSize = '16sp', onClick = function() floatingWindowManager:start('控 制 器4') end }, } }) end, onDestroy = function() end }) function A1() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = -3.5}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end function A2() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end function A3() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 2.5}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end function A4() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 2.5}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end function B1() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = -4.8}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end function B2() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = -1.9}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end function B3() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end function B4() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 1.9}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end function B5() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = -4.8}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end function B6() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 2.5}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end floatingWindowManager:newWindow('控 制 器1', { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_width = '400dp', layout_height = '50dp', { LinearLayout, background = floatingWindowManager:getStateListDrawable(), layout_width = '400dp', layout_height = '0dp', layout_gravity="center"; orientation = 'horizontal', padding = '0dp', { Button, layout_margin = '0dp', text = '上', onClick = A1 -- 把函数名赋值给 onClick 即可 }, { Button, text = '定', onClick = A2 }, { Button, text = '下', onClick = A3 }, { Button, text = '摔', onClick = A4 }, } }) end }) floatingWindowManager:newWindow('控 制 器2', { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_width = '320dp', layout_height = 'match_parent', background="", { LinearLayout, background = floatingWindowManager:getStateListDrawable(), layout_width = '320dp', layout_height = '150dp', { Button, background = { GradientDrawable, cornerRadius='0dp', color='#000000', }, layout_marginLeft = '0dp',--间距 textColor= "#ffffFF",--文字颜色代码 layout_width = '150', layout_margin = '2dp', text = '快上', onClick = B1 -- 把函数名赋值给 onClick 即可 }, { Button, background = { GradientDrawable, cornerRadius='0dp', color='#000000', }, layout_marginLeft = '0dp',--间距 textColor= "#ffffFF",--文字颜色代码 layout_width = '150', layout_margin = '2dp', text = '慢上', onClick = B2 }, { Button, background = { GradientDrawable, cornerRadius='0dp', color='#000000', }, layout_marginLeft = '0dp',--间距 textColor= "#ffffFF",--文字颜色代码 layout_width = '150', layout_margin = '2dp', text = '定点', onClick = B3 }, { Button, background = { GradientDrawable, cornerRadius='0dp', color='#000000', }, layout_marginLeft = '0dp',--间距 textColor= "#ffffFF",--文字颜色代码 layout_width = '150', layout_margin = '2dp', text = '慢下', onClick = B4 }, { Button, background = { GradientDrawable, cornerRadius='0dp', color='#000000', }, layout_marginLeft = '0dp',--间距 textColor= "#ffffFF",--文字颜色代码 layout_width = '150', layout_margin = '2dp', text = '快下', onClick = B5 }, { Button, background = { GradientDrawable, cornerRadius='0dp', color='#000000', }, layout_marginLeft = '0dp',--间距 textColor= "#ffffFF",--文字颜色代码 layout_width = '150', layout_margin = '2dp', text = '防摔', onClick = B6 }, } }) end }) floatingWindowManager:newWindow('控 制 器3', { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_width = 'match_parent', layout_height = 'match_parent', { LinearLayout; layout_height="40dp"; layout_width="match_parent"; gravity="center"; layout_marginTop="-5dp"; { RadioGroup; layout_weight="150dp"; layout_width="match_parent"; gravity="center"; layout_height="match_parent"; orientation="horizontal"; layout_gravity="start"; { RadioButton; text="上"; textColor="0xFFFFFFFF"; onClick = function() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = -3.5}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end }, { RadioButton; text="定"; textColor="0xFFFFFFFF"; onClick = function() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end }, { RadioButton; text="下"; textColor="0xFFFFFFFF"; onClick = function() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 2.5}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end }, { RadioButton; text="防摔"; textColor="0xFFFFFFFF"; onClick = function() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 2.5}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end }, { LinearLayout; }, { AbsoluteLayout; layout_height="match_parent"; layout_width="match_parent"; }, }, }, }) end }) floatingWindowManager:newWindow('控 制 器4', { onCreate = function(floatingWindow) floatingWindow:addlayout({ ScrollView, layout_width = 'match_parent', layout_height = 'match_parent', { LinearLayout; layout_height="40dp"; layout_width="365dp"; gravity="center"; layout_marginTop="-5dp"; { RadioGroup; layout_weight="150dp"; layout_width="match_parent"; gravity="center"; layout_height="match_parent"; orientation="horizontal"; layout_gravity="start"; { RadioButton; text="快上"; textColor="0xFFFFFFFF"; onClick = function() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = -4.8}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end }, { RadioButton; text="中上"; textColor="0xFFFFFFFF"; onClick = function() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = -3.5}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end }, { RadioButton; text="定点"; textColor="0xFFFFFFFF"; onClick = function() local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end }, { RadioButton; text="中下"; textColor="0xFFFFFFFF"; onClick = function() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 2.5}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end }, { RadioButton; text="快下"; textColor="0xFFFFFFFF"; onClick = function() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 3.8}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end }, { RadioButton; text="防摔"; textColor="0xFFFFFFFF"; onClick = function() local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 2.5}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x134} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) local t = {"libUE4.so:bss", "Cb"} local tt = {0x1EA3A8, 0x20, 0x2CC, 0x310, 0x13C} local ttt = S_Pointer(t, tt) gg.setValues({{address = ttt, flags = 16, value = 0}}) end }, { LinearLayout; }, { AbsoluteLayout; layout_height="match_parent"; layout_width="match_parent"; }, }, }, }) end }) -- 运行悬浮窗 floatingWindowManager:run()