Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
how to show "draw info" in android apk? — Gideros Forum

how to show "draw info" in android apk?

how to show "draw info" in android apk?

Comments

  • MoKaLuxMoKaLux Member
    Accepted Answer
    I don't think this is possible to display draw info directly on android because I believe this is a function built in gideros player.

    You will need to implement it yourself in your android apk.

    Sample code:
    local fps_tf = TextField.new(nil, "FPS: -", "Aq|")
    fps_tf:setPosition(20, 20)
    fps_tf:setScale(2)
    stage:addChild(fps_tf)
     
    local timer = 0
    local fps_timer = 0
    stage:addEventListener("enterFrame", function(e)
    	local dt = e.deltaTime
    	timer += dt
    	fps_timer += dt
     
    	if (fps_timer > 1) then
    		fps_timer = 0
    		fps_tf:setText("FPS: ".. 1 // dt)
    	end
    end)
    There is also this link:
    https://wiki.gideros.rocks/index.php/Examples#FPS_.40atilim
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • hgy29hgy29 Maintainer
    Accepted Answer
    Actually since it is in the player, it could be exposed through a lua api...
  • MoKaLux said:

    I don't think this is possible to display draw info directly on android because I believe this is a function built in gideros player.

    You will need to implement it yourself in your android apk.

    Sample code:

    local fps_tf = TextField.new(nil, "FPS: -", "Aq|")
    fps_tf:setPosition(20, 20)
    fps_tf:setScale(2)
    stage:addChild(fps_tf)
     
    local timer = 0
    local fps_timer = 0
    stage:addEventListener("enterFrame", function(e)
    	local dt = e.deltaTime
    	timer += dt
    	fps_timer += dt
     
    	if (fps_timer > 1) then
    		fps_timer = 0
    		fps_tf:setText("FPS: ".. 1 // dt)
    	end
    end)
    There is also this link:
    https://wiki.gideros.rocks/index.php/Examples#FPS_.40atilim
    thanks

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • hgy29 said:

    Actually since it is in the player, it could be exposed through a lua api...

    thanks

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • YanYan Member
    hgy29 said:

    Actually since it is in the player, it could be exposed through a lua api...

    Huh? how? Im using this code too, but I prefer to use inbuild debug
    vk.com/yan_alex
  • YanYan Member
    hgy29 said:
    Hate myself, before ask I looked to reference and didnt found this. Or you just added? Feel like a jerk.
    vk.com/yan_alex
  • hgy29hgy29 Maintainer
    Yan said:

    hgy29 said:
    Hate myself, before ask I looked to reference and didnt found this. Or you just added? Feel like a jerk.
    Don't, I added it to the wiki before replying to you :)

    Likes: MoKaLux, talis

    +1 -1 (+2 / -0 )Share on Facebook
Sign In or Register to comment.