v4k-git-backup/demos/99-steam.c

25 lines
593 B
C
Raw Normal View History

2024-01-01 10:37:22 +00:00
// steamworks demo
// - rlyeh, public domain
#include "v4k.h"
main() {
steam_init(0); // steam_appid: 0 to use SpaceWar vanilla project from Valve
2024-01-01 21:06:20 +00:00
2024-01-01 10:47:45 +00:00
window_create(0.75, 0);
2024-01-01 10:37:22 +00:00
while( window_swap() ) {
steam_tick();
if( ui_panel("Steam", PANEL_OPEN) ) {
ui_steam();
if( ui_button("Clear trophy") ) steam_trophy("ACH_TRAVEL_FAR_ACCUM", 0);
if( ui_button("Redeem trophy") ) steam_trophy("ACH_TRAVEL_FAR_ACCUM", 1);
if( ui_button("Submit Screenshot") ) steam_screenshot();
ui_panel_end();
}
}
}