Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/engine/sys/sdl_glimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2992,3 +2992,23 @@ void GLimp_LogComment( const char *comment )
strlen( buf ), buf );
}
}

class SetWindowOriginCmd : public Cmd::StaticCmd
{
public:
SetWindowOriginCmd() : StaticCmd("setWindowOrigin", Cmd::CLIENT, "move the window") {}

void Run( const Cmd::Args &args ) const
{
int x, y;
if ( args.Argc() != 3
|| !Str::ParseInt( x, args.Argv( 1 ) ) || !Str::ParseInt( y, args.Argv( 2 ) ) )
{
Print( "Usage: setWindowOrigin <x> <y>" );
return;
}

SDL_SetWindowPosition( window, x, y );
}
};
static SetWindowOriginCmd setWindowOriginCmdRegistration;