Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Build Your Own Front End(EXTENDed-)  (Read 8113 times)

0 Members and 2 Guests are viewing this topic.

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #40 on: June 17, 2013, 01:50:28 pm »
 :blank:
« Last Edit: July 06, 2013, 02:44:42 pm by Chris John Hunter »

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #41 on: June 17, 2013, 02:43:23 pm »
 :blank:
« Last Edit: July 06, 2013, 02:44:14 pm by Chris John Hunter »

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #42 on: June 17, 2013, 04:12:33 pm »
 :blank:
« Last Edit: July 06, 2013, 02:44:25 pm by Chris John Hunter »

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #43 on: June 18, 2013, 11:59:48 am »
 :blank:
« Last Edit: July 06, 2013, 02:48:52 pm by Chris John Hunter »

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #44 on: June 18, 2013, 12:12:26 pm »
 :blank:
« Last Edit: July 06, 2013, 02:43:55 pm by Chris John Hunter »

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #45 on: June 18, 2013, 12:28:01 pm »
 :blank:
« Last Edit: July 06, 2013, 02:43:44 pm by Chris John Hunter »

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #46 on: June 21, 2013, 02:05:13 pm »
 :blank:
« Last Edit: July 06, 2013, 02:43:33 pm by Chris John Hunter »

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #47 on: June 25, 2013, 11:17:52 pm »
 :blank:
« Last Edit: July 06, 2013, 02:43:16 pm by Chris John Hunter »

JOHN HOWARD

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 30
  • Last login:January 28, 2016, 10:10:17 pm
  • na na na na na na....
Re: Build Your Own Front End(EXTENDed-)
« Reply #48 on: June 26, 2013, 01:07:38 am »
This
Is
Awesome.

Thanks a heap for writing this and I'll be eagerly following.  :cheers:

TheDude

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 109
  • Last login:May 17, 2017, 03:02:28 pm
  • Bartops all the way !
    • BARTOPMANIA
Re: Build Your Own Front End(EXTENDed-)
« Reply #49 on: June 26, 2013, 04:42:05 am »
Wow !
Nice of you to take time and allow us to learn something useful !
Watching this because I think it's really cool !
Keep going  :applaud:

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #50 on: June 26, 2013, 03:54:17 pm »
 :blank:
« Last Edit: July 06, 2013, 02:43:02 pm by Chris John Hunter »

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #51 on: June 26, 2013, 04:53:17 pm »
 :blank:
« Last Edit: July 06, 2013, 02:42:50 pm by Chris John Hunter »

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #52 on: June 26, 2013, 05:07:47 pm »
 :blank:
« Last Edit: July 06, 2013, 02:48:35 pm by Chris John Hunter »

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #53 on: June 26, 2013, 05:10:59 pm »
 :blank:
« Last Edit: July 06, 2013, 02:42:39 pm by Chris John Hunter »

kayser2008

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15
  • Last login:December 07, 2014, 09:50:09 am
Re: Build Your Own Front End(EXTENDed-)
« Reply #54 on: June 27, 2013, 07:11:07 am »

Background image used: http://imageshack.us/f/593/dkv.jpg/

Right heres some code that uses the system images I grabbed earlier from my C:\HYPERSPINS\Media\Main Menu\Images\Wheel folder

N.B: The images need to be in the same folder your working in and I advise you to create a new project. Call it GFX example and put those images along with the background image you want to use in that folder. Later we will specify locations of images but its easy for now.

Code: [Select]
Rem Front End EXTEND-ed
Rem GFX example
Rem by CJ Hunter


Set Display Mode 1024,768,32
Rem this tells the program, we will say when to refresh the screen. Using the Sync command. Sync Off. And Rem Sync Rate commands are used to automate this.
Sync On
Rem hide mouse pointer
hide mouse
Rem Load images - what I've done here is RENAMED the images we grabbed from the Hyperspin folder
Rem (C:\HYPERSPINS\Media\Main Menu\Images\Wheel)
Rem As 1.png, 2.png etc, upto 20. Doesn't matter which order as long as they are named 1-20.png


Rem For Next repeats the actions between For Next commands the number of times specified, here 1-20.
Rem 20 times. If you wanted the images to be labled 10-30 you would change this. Sometimes you don't want Rem 1-20 but this time we do.


Rem we are using the word IMAGE to represent the number of the IMAGE we want to load
For IMAGE=1 to 20
Rem str$(IMAGE) tells the program to convert the NUMBER represents by IMAGE into a string ($) so that Rem it can be treaded as a line of text. +" " to join string$
Rem +".png" is used to add to the string$ the .png extension. We could change that to .bmp jpg. if that was the file type.


Rem So the program sees: Load 1.png , then the second time it runs IMAGE now represents the number 2 and Rem sees: Load 2.png Etc. Until the For Next has finished. the ,IMAGE represents the image bank where we store the image for later use. As you might have guessed they are represented again by the word IMAGE. It knows bank 1,2 etc,
Rem you could change this but it always makes sense to keep things organised and that is why each number, name and bank are the same.


Load image ""+str$(IMAGE)+".png",IMAGE,1


next


Rem this is a background image. Once again put it in your project's folder. You could download it from the link if its easier. Or use one of your images. Just remember to change the file extension if you need to


Load Image "dkv.jpg",22,1

Rem System number as used before. Will increase decrease depending on user's mouse clicks
System=1


Rem start a loop
Do
Rem clear screen
Cls
Rem Paste Image is used as it sounds to Paste an image to screen. Pasted images cannot be moved.
Rem whereas SPRITES can. We will get to sprites later on. Sprites are used in games for the baddies. Player characters etc.


Rem Use: Paste Image IMAGE NUMBER,X position on screen, Y position on screen (number of pixels)
Rem This is our BACKGROUND image. Pasted FIRST
paste image 22,0,0


Rem The next 2 lines is just me working out the centre of the screen so that the image is pasted at the centre Rem of the screen- 1024 768 are the width and height of the screen IMAGE WIDTH is the Image Width of Rem SYSTEM which is used to represent the current system Image. / is used to divide. So Screen Width divided by 2 Rem minus image width(system) divided by 2. We use these in the next line to paste our system image centrally. the ,1 means make it transparent. 0 would make it black or non transparent.


IMX=1024/2-image width(system)/2
IMY=768/2-image height(system)/2


Paste image System,IMY,IMX,1


Rem tells the program to refresh the screen
Sync
Rem sleep used to slow the program down by cant remember how long now! DOH
sleep 100
Rem were using mouse clicks easy. But we will change to the joystick code used earlier (if you've setup the controller first! and its plugged in)


if mouseclick()=2
System=System-1
If System=0
System=1
endif
endif


If mouseclick()=1
System=System+1
If System=20
System=19
endif
endif


If escapekey()
end
endif


Loop

When loading images remember to put ,1 at the end of
Load Image "Example.bmp",IMAGE_BANK_NUMBER,1
Because if you don't the graphics go a bit awry!!!

 :cheers:


Hy first i want to thank you for the great tutorial and help, this is really cool and fun , but i get stucked  in this part i put the backgroun image in the same folder GFX example and renamed it dkv.jpg as is on the script and renamed every image that whore downloaded  from the hyperspin\wheel as 1.png , 2.png >>>>  20.png, but when i run the script all i get is a black screen
i´m not a programmer just some things in Autoit  so i´m sorry if i´m doing something wrong

ps- in the Part VI , in autoit you can put the .exe that you want to open in the same folder as the compiled script  ShellExecute("mame.exe", "", @ScriptDir, "open",@SW_MINIMIZE ) is it possible in Dark Basic Professional ?

Sorry and thanks

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #55 on: June 29, 2013, 04:30:53 pm »
 :blank:
« Last Edit: July 06, 2013, 02:42:21 pm by Chris John Hunter »

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #56 on: June 29, 2013, 04:33:39 pm »
 :blank:
« Last Edit: July 06, 2013, 02:42:11 pm by Chris John Hunter »

kayser2008

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15
  • Last login:December 07, 2014, 09:50:09 am
Re: Build Your Own Front End(EXTENDed-)
« Reply #57 on: June 29, 2013, 05:18:57 pm »
I have compiled   the same thing with the exemple that you posted earlier  here but with joystick and works just  fine.

Maybe i wose doing something wrong.

Thanks again

Chris John Hunter

  • Guest
  • Trade Count: (0)
Re: Build Your Own Front End(EXTENDed-)
« Reply #58 on: July 02, 2013, 02:46:23 am »
 :blank:
« Last Edit: July 06, 2013, 02:41:55 pm by Chris John Hunter »