Trouble drawing

Blitz3D Forums/Blitz3D Beginners Area/Trouble drawing

Guy Fawkes(Posted 2014) [#1]
Hello all. As I progress forward in my program, I now need a working, NON-looping version of "api_messagebox()". So I decided to create one. Problem is, the image seems to be invisible no matter what I do & I don't know why.

Can someone please help me make my image become visible?

Here's the code so far:



Thanks alot all!

Have a GREAT afternoon!

Sincerely,

~GF


Guy Fawkes(Posted 2014) [#2]
Can someone please assist?

Thank You very much!

Have a GREAT evening!

Sincerely,

~GF


_PJ_(Posted 2014) [#3]
If MouseHit(1)

;check all the buttons
For n = 1 To 3




Guy Fawkes(Posted 2014) [#4]
Uh, PJ, Thanks but that doesn't help. :3 I simply need it to display my window.


Guy Fawkes(Posted 2014) [#5]
Can someone please assist?

Thanks alot!

Have a GREAT evening!

Sincerely,

~GF


Floyd(Posted 2014) [#6]
Your image IS being drawn. Unfortunately the image is solid black.

You can test this by adding one line of code, near line 175.

;set buffer back to normal
	Oval 20, 20, 50, 30
	SetBuffer BackBuffer()



Guy Fawkes(Posted 2014) [#7]
Ok, so where exactly did I make it not draw and how can I fix it?


RemiD(Posted 2014) [#8]
After you have done a modification on an image, you can debug it like this :

ClsColor(125,125,125)
Cls()
DrawImage(Image,0,0)
Flip()
WaitKey()

This will permit you to see how the image has been modified and what it looks like after the modification.


Guy Fawkes(Posted 2014) [#9]
Just tried it. it's still not showing any image.


Guy Fawkes(Posted 2014) [#10]
Gah, What exactly is making it turn black like that?

The above only showed like a gray image and nothing else.


Floyd(Posted 2014) [#11]
You are confusing the window and the image. The x,y values in draw_win_popup() should be something like this:

	;center a viewport on the screen
	Local img = CreateImage(window_width, window_height)
	Local window_x = (ImageWidth(img) - window_width)/2
	Local window_y = (ImageHeight(img) - window_height)/2



Guy Fawkes(Posted 2014) [#12]
Thank you so much, Floyd! That solved it!

Kudos to you, friend! :)

Sincerely,

~GF