the code you are looking for is right in the sample browser code ive removed all the none relavent bits and shortend it.
#include "DarkGDK.h"
#include <stdio.h>
#include <string.h>
int mx = 0;
int my = 0;
int oldButton = 0;
bool loadimage = true;
void updateGui ( void );
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 0 );
dbLoadImage ( "Samples Viewerprevious.png" , 2 , 0 );
// loop until the escape key is pressed
while ( LoopGDK ( ) )
{
if ( dbEscapeKey ( ) )
return;
updateGui ( );
dbSync ( );
}
}
void updateGui ( void )
{
int click = dbMouseClick ( );
mx = dbMouseX ( );
my = dbMouseY ( );
// previous button
if ( mx > 19 && mx < 19 + 182 && my > 430 && my < 430 + 44 )
{
dbPasteImage ( 2 , 19 , 430 , 0 );
if ( click == 1 && oldButton != 1 )
{
// code here
}
}
oldButton = click;
}
Amd Athlon 64 3000+ Newcastle , Asus K8N4-E Deluxe, 1.50GB DDR Ram , XFX Geforce 6600 Extreame Edition 512MB DDR2 Ram
GDK,DarkPhysics,DarkShader,DarkLights,DarkAI,BlueGUI,Unity