britzl / steamworks-defold

Steamworks support for Defold using the Defold extension system
34 stars 6 forks source link

SetOverlayNotificationPosition #12

Closed subsoap closed 5 years ago

subsoap commented 5 years ago

This doesn't seem to be working?

https://partner.steamgames.com/doc/api/ISteamUtils#SetOverlayNotificationPosition

Maybe I'm trying to use it wrong?

steamworks.utils_set_overlay_notification_position(0)
attempt to call field 'utils_set_overlay_notification_position' (a nil value)
stack traceback:
britzl commented 5 years ago

The Overlay functions are all excluded. I wasn't able to get it to work. See comment here: https://github.com/britzl/steamworks-defold/issues/10

It does however mention in the docs "While in development and running your game" like there should be a difference between how the Overlay behaves while developing a game and while having it launched form Steam. Perhaps you can give it a try?

subsoap commented 5 years ago

2019-09-13 05_21_03-Slack _ jcash _ Defold Hangout

Think something like this could work?

britzl commented 5 years ago

Ah, yes, that would be worth trying!

subsoap commented 5 years ago

This works now

function init(self)
    local status, error = pcall(steamworks.init)
    if not status then print("Error: " .. error) return end

    steamworks.set_listener(function(self, e, t)
        print(e)
        pprint(t)
    end)

    steamworks.utils_set_overlay_notification_position(2)
end
steamworks.POSITION_TOP_LEFT 0
steamworks.POSITION_TOP_RIGHT 1
steamworks.POSITION_BOTTOM_LEFT 2
steamworks.POSITION_BOTTOM_RIGHT 3