DarkGDK has almost the Exact same commands as DBP so it might take some work but you could port anything from dbp over to it.
this is the first example in method three ported to DGDK, i havn't tested it but it should work.
#include "DarkGDK.h"
void Setup();
void HandleButton(int, int);
void DarkGDK(void)
{
int mX, mY, mC, OverButton;
Setup();
while( LoopGDK() )
{
mX = dbMouseX(); mY = dbMouseY(); mC = dbMouseClick();
dbSprite(100, mX, mY, 100);
OverButton = dbSpriteCollision(100, 0);
if(OverButton > 0){ HandleButton(mC, OverButton); }
}
return;
}
void HandleButton(int mC, int OverButton)
{
switch (OverButton)
{
case 1:
if(mC)
dbCenterText(400, 580, "You Clicked On Button 1");
break;
case 2:
if(mC)
dbCenterText(400, 580, "You Clicked On Button 2");
break;
case 3:
if(mC)
dbCenterText(400, 580, "You Clicked On Button 3");
break;
case 4:
if(mC)
dbCenterText(400, 580, "You Clicked On Button 4");
break;
case 5:
if(mC)
dbCenterText(400, 580, "You Clicked On Button 5");
break;
case 6:
if(mC)
dbCenterText(400, 580, "You Clicked On Button 6");
break;
}
return;
}
void Setup()
{
int SprNum = 0;
dbSetDisplayMode(800,600,32);
dbSyncOn(); dbSyncRate(60);
dbLoadImage("Screen4.jpg", 10);
dbLoadImage("M3B1.jpg", 1);
dbLoadImage("M3B2.jpg", 2);
dbLoadImage("M3B3.jpg", 3);
dbLoadImage("M3B4.jpg", 4);
dbLoadImage("M3B5.jpg", 5);
dbLoadImage("M3B6.jpg", 6);
dbSetTextOpaque();
for(int nY = 0; nY < 2; ++nY)
{
for(int nX = 0; nX < 1; ++nX)
{
dbSprite(SprNum, nX*300+130, nY*100 + 200, SprNum);
++SprNum;
}
}
dbClear(0, 0, 0); dbGetImage(100,0,0,2,2);
dbSprite(100,400,300,100);
dbHideSprite(100);
dbInk(dbRGB(255,255,255), 0);
dbPasteImage(10, 0, 0);
dbSync();
return;
}
Hope that helps. oh btw thats dbc code not dbp but still is easily ported to dgdk
Edit:
Missed a Colon and some semi-colons. Fixed it!
New Site! Check it out \/