gfxgfxFreeBASIC Games Directory Forumgfxgfx
gfx gfx
gfx
Welcome, Guest. Please login or register. May 22, 2013, 10:34:31 PM

Login with username, password and session length
11.5.2013 - Added a webpage for the latest FBGD competition.

13.3.2013 - Members registrations temporary disabled. For all membership requests, please email me: lachie13@yahoo.com

30.11.2012 - The ninth issue of BASIC Gaming is out! Read it here: http://games.freebasic.net/forum/index.php?topic=560.0

22.11.2012 - Be sure to check our currently running annual FBGD game making competition. This year's theme is SEASONS OF THE YEAR, 300 $ first place prize, and the competition runs till 18th of February. Link: http://games.freebasic.net/forum/index.php?topic=559.0
gfx
gfx
*
gfxgfx
gfxgfx gfxgfx
gfxgfx Home Help Search Login Register   gfxgfx
gfx gfx
gfx
Pages: 1 2 3 [4]
Print
Author Topic: new help with makeing a button for the mouse  (Read 8295 times)
BadMrBox
Forum Sage
*****
Gender: Male
Posts: 371



View Profile WWW
« Reply #45 on: May 27, 2008, 09:20:12 AM »

You can of course just call notepad using
Shell("notepad.exe")
Logged

Leonheart
Guest
« Reply #46 on: May 27, 2008, 09:50:01 PM »

Yeah, but last time I used that, black command prompt showed for millisec. Arghh, Tongue
Logged
the_laughing_man
Recruit
**
Posts: 46


View Profile Email
« Reply #47 on: June 01, 2008, 08:48:26 PM »

ok well i am doing some thing
there is nothing more to do but work  what can i say
i would love to make a rpg like wow in fb ?
 i think we could do that . rpg
Logged
BadMrBox
Forum Sage
*****
Gender: Male
Posts: 371



View Profile WWW
« Reply #48 on: June 02, 2008, 02:44:29 AM »

i would love to make a rpg like wow in fb ?  i think we could do that . rpg
Seriously... now I know you are just fooling around with us. Roll Eyes
Logged

hexdude!
Global Moderator
Novice
*****
Gender: Male
Posts: 66


283467208 Malatestas_Ghost@hotmail.co.uk hhexadecimaldude jabrazavi
View Profile Email
« Reply #49 on: June 02, 2008, 08:38:10 AM »

If you're just trying to learn some FB by practice, I'd suggest that simple games are easier than a shell. For example, to me, writing a shell seems like a big complicated job, even though I've written some simple games before.

If I were you I'd start with a very simple game (like duck shooting or something) and then try a slightly more complex one (like pong), then keep taking small steps until you get to a level of confidence. When you can figure out exactly what a project to write an OS or WOW clone will take, then you're at the right stage to start considering if you want to do that.
Logged
the_laughing_man
Recruit
**
Posts: 46


View Profile Email
« Reply #50 on: July 22, 2008, 10:31:53 AM »

im back all
how is all doing it has been some time .
now i am thinking about it i want to make a game like empire earth.

so i got the mouse going i am going to work on makeing bars for the game 
Logged
the_laughing_man
Recruit
**
Posts: 46


View Profile Email
« Reply #51 on: July 22, 2008, 10:37:31 AM »

i want to make this start of the game
 
so i will get started i will put up my code up ones i can click
on a human in the game an move him and build some thing he can fight or brake ....
and for him or her to cut down trees and bring it back to a house
so wood will go up .... just a start
Logged
rens
Amoeba
*
Posts: 1


View Profile
« Reply #52 on: November 23, 2009, 03:54:24 AM »

@BadMrBox

Just a thought. Why not check for mousekey first, instead of checking for the mousearea the whole time!

screenres 640,480,32,2

Dim as Integer mousex, mousey, mousebuttons, buttonposx, buttonposy, exittheloop, theloop,selected

Type buttonset
    sizex as integer
    sizey as integer
    posx  as integer
    posy  as integer
    image as any Ptr
End Type

    Const True = 1
    Const False = Not True
       
Dim buttons(2) as buttonset

buttons(0).sizex = 100
buttons(0).sizey = 30
buttons(0).posx  = 50
buttons(0).posy  = 50
buttons(0).image = imagecreate(buttons(0).sizex,buttons(0).sizey)
bload "button.bmp",buttons(0).image


buttons(1).sizex = 100
buttons(1).sizey = 30
buttons(1).posx  = 100
buttons(1).posy  = 90
buttons(1).image = imagecreate(buttons(1).sizex,buttons(1).sizey)
bload "button.bmp",buttons(1).image

buttons(2).sizex = 100
buttons(2).sizey = 30
buttons(2).posx  = 50
buttons(2).posy  = 130
buttons(2).image = imagecreate(buttons(2).sizex,buttons(2).sizey)
bload "button.bmp",buttons(2).image

Do

ScreenLock

For theloop = 0 to 2
Put (buttons(theloop).posx,buttons(theloop).posy),buttons(theloop).image,PreSet
Next

Locate 1,1:? "Press the button"
GetMouse mousex, mousey , , mousebuttons
     
if mousebuttons=1 Then
For theloop=0 To 2
        If mousex > buttons(theloop).posx And mousex < buttons(theloop).posx + buttons(theloop).sizex Then
            If mousey > buttons(theloop).posy and mousey < buttons(theloop).posy + buttons(theloop).sizey Then
            selected=theloop
            exittheloop = TRUE
            EndIf
        End If
Next
End If

ScreenUnLock

Sleep 1,1
   
loop Until exittheloop = TRUE
Locate 2,2: ? "button";selected
Sleep
End
Logged
nkk_kan
Forum Howler
****
Gender: Male
Posts: 180

Let's rocK~!

nkk_kan
View Profile WWW Email
« Reply #53 on: November 26, 2009, 06:24:13 AM »

You are one year late, sir.  Grin

You could do it that way too. It was just an example. (although yours will be a bit more efficient)
Logged

neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #54 on: November 27, 2009, 07:55:01 PM »


sorry had lots of stuff to do
i was the guy with the shell
an i am not trying to make  os
but gui so i know how it works
and to say i made it with help ......
i don't know everything lol but im back Smiley
ps.... old name was the laughing man
new name neo ...... 
Logged

IF you can make a game that's cool and fun....
in time you may have a good job in time ......

its like at the end of doom 2 what do i have to kill next lol put code in my brain and i will think mmmm css rocks
neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #55 on: November 27, 2009, 08:02:19 PM »



ps the plan is to have a Gui for free basic software for all the programmer have a place to put there fb code
all  i have to do is set it up an look a bit better ... new code will be up as soon as i can fix it
extreme_black_ops@hotmail.com 
Logged

IF you can make a game that's cool and fun....
in time you may have a good job in time ......

its like at the end of doom 2 what do i have to kill next lol put code in my brain and i will think mmmm css rocks
Pages: 1 2 3 [4]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
Cerberus design by Bloc
Valid XHTML 1.0! Valid CSS!
gfx
gfxgfx gfxgfx