loadstring(exports.dgs:dgsImportFunction())()
local IsOn = false
local sW, sH = dgsGetScreenSize()
function doPhone()
if(IsOn) then return end
rrn = dgsCreateRoundRect(30,false, tocolor(0,0,0,255))
phone = dgsCreateImage( sW * 0.7, sH * 0.5, sW * 0.20, sH * 0.50, rrn, false)
app_texture1 = dxCreateTexture("ohnoe.jpg")
app1 = dgsCreateRoundRect(30,false, tocolor(255,255,255,255))
app = dgsCreateImage( sW * 0.750, sH * 0.650, sW * 0.10, sH * 0.15, app1, false)
app_button = dgsCreateButton( sW * 0.750, sH * 0.650, sW * 0.10, sH * 0.15, "", false, _, tocolor(0,0,0,0) )
dgsRoundRectSetTexture(app1, app_texture1)
dgsSetLayer (app_button,"top")
dgsSetAlpha(app_button, 0)
addEventHandler("onDgsMouseClickDown", app_button, app1Func)
IsOn = true
-- animations
end
function removePhone()
if(not IsOn) then return end
removeEventHandler("onDgsMouseClickDown", app_button, app1Func)
destroyElement(rrn)
destroyElement(phone)
destroyElement(app_texture1)
destroyElement(app1)
destroyElement(app)
destroyElement(app_button)
IsOn = false
end
function togglePhone()
if(IsOn) then
removePhone()
else
doPhone()
end
end
bindKey("n", "down", togglePhone)
function app1Func()
outputChatBox("hey")
end
I didn't test it but can you try this