Ooops
January 23, 2021, 05:20:33 AM

Author Topic: [bb] NotifyImage by CS_TBL [ 1+ years ago ]  (Read 590 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] NotifyImage by CS_TBL [ 1+ years ago ]
« on: June 29, 2017, 12:28:39 AM »
Title : NotifyImage
Author : CS_TBL
Posted : 1+ years ago

Description : Just a small display, made for debug-purposes only. I guess it could be worth the 5 minutes I spent on it.. :D

Code :
Code: BlitzBasic
  1. Function NotifyImage(img)
  2.         ;
  3.         ; by CS_TBL
  4.         ;
  5.        
  6.         FlushEvents()
  7.         If Not img Return
  8.  
  9.         w=256
  10.         h=160
  11.  
  12.         window=CreateWindow("NotifyImage",ClientWidth(Desktop())/2-(w/2),ClientHeight(Desktop())/2-(h/2),w,h,0,1)
  13.  
  14.         canvas=CreateCanvas(0,0,ClientWidth(window),ClientHeight(window),window)
  15.  
  16.         SetBuffer CanvasBuffer(canvas)
  17.                 DrawBlock img,0,0
  18.         FlipCanvas canvas
  19.  
  20.         Repeat
  21.                 WaitEvent()
  22.                 If EventID()=$803
  23.                         If EventSource()=window notifyimagequit=True
  24.                 EndIf
  25.         Until notifyimagequit
  26.        
  27.         FreeGadget window
  28.         SetBuffer DesktopBuffer()
  29. End Function


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal