Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / new to darkGDK

Author
Message
Gene Saika
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location:
Posted: 14th Nov 2008 04:23
I have been programming with C++ and wanted to try DarkGDK. My first real project i plan on doing is a basic login screen. I would like to set the background to white and add in a few boxes but I can not figure out how to do this.

I welcome all help
Gene Saika
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location:
Posted: 15th Nov 2008 21:27
nobody knows how to do this ? i thought it would be a simple question ...
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 15th Nov 2008 21:45


Gene Saika
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location:
Posted: 16th Nov 2008 19:54
Thank you very much IanM I am greatful and that clears things up a bit
Gene Saika
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location:
Posted: 16th Nov 2008 22:07
I am now trying to add in a second box but it does not work properly.
the code I am using is
and this makes the original box span across the screen instead of making a new box at the new location.

Am I missing something ?
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Nov 2008 22:37
Yup, the coordinates for the box function specify screen coords, not start point & width+height.

Your 'bottom,right' coordinates for your second set of boxes are to the left of your 'top,left' coordinates.

Gene Saika
16
Years of Service
User Offline
Joined: 13th Nov 2008
Location:
Posted: 17th Nov 2008 00:37
Ok then a new question ... I am trying to add a background image to this and when I did it messed up my image and covered the boxes I had made. So I looked at the code for the basic 2D program and tested adding in the code that worked there
is what I ended up with which got the background to work. My boxes are still covered though and I dont understand why the transparent color is bright pink. when I used this code on an image I have saved to my computer( a .jpg) it messed up the image( lots of areas of black were turned blue and some areas with green). So I made a blue transparent ( 0, 0, 255), but this did not fix it.
The Real Abaddon
16
Years of Service
User Offline
Joined: 26th Jun 2008
Location:
Posted: 23rd Nov 2008 22:11
try looking in the sprite commands documentation you will learn more about sprites, to resolve your problem use dbDrawSpritesLast() or dbDrawSpritesFirst() one of them should solve the problem.

Login to post a reply

Server time is: 2024-11-25 07:51:20
Your offset time is: 2024-11-25 07:51:20