gfxgfxFreeBASIC Games Directory Forumgfxgfx
gfx gfx
gfx
Welcome, Guest. Please login or register. May 18, 2013, 11:57:34 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]
Print
Author Topic: help with interface window  (Read 691 times)
neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« on: November 27, 2009, 07:47:10 PM »

been trying to make a box to click on an move it with the mouse
an when stop holding  clicked the box stays where you put it ......
right now the code runs but then you click on the box the box moves to the  lower  right
an if you keep click on it  goes so far to the right then goes off screen .
so if any one could help thx .......

ps lost the laughing man  longin had to make a new longin
 was the laughing man Now neo
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
Lachie Dazdarian
Double dipper
Administrator
Forum Sage
*****
Gender: Male
Posts: 1195


lachie13
View Profile WWW Email
« Reply #1 on: November 28, 2009, 07:21:21 AM »

You really should post the source so we can try to fix it. This all seems like the result of usual random bugs related to missuse of variables.
Logged

"Things like Basic and Free Basic provide much-needed therapy and a return to sanity and a correct appreciation of people. The arrogant folk really hate a word like 'Basic' - fine, and good riddance." ~ pragmatist
neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #2 on: November 28, 2009, 07:32:49 PM »

i can tell you the code i worked on is running a ok
the desktop pic do not load right with my window so i taken that out i think i have to make frames of some kind . for like icons windows mmmm maybe...
and its about 20mb with all pics in it ...
i have the window moving with mouse but not working right.
when i click on window it goes up and down not left or right.  if you can help 
give me some time i will have my code up in a day or 2
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
neo
Novice
***
Gender: Male
Posts: 57


View Profile Email
« Reply #3 on: November 30, 2009, 10:49:39 AM »

just recall i put my heart in to it .
and a lot of people help
oh yah you need to make the pic to go with it all just uping up code
ps button4 = mouse is in there that the one that get the window it moves up and down just not well
thx for the help
there is a line where i run the wallpaper but the wallpaper gets fucked with the window so i taken it out .
just need to fix the bugs thx 4 the help
extreme_black_ops@hotmail.com


Screen 20, 32, 4, 1



BLoad "shell1.bmp"
sleep 100
Bload "Shell2.bmp"
sleep 100
Bload "Shell3.bmp"
sleep 100
BLoad "Shell4.bmp"
sleep 100
Bload "Shell5.bmp"
sleep 100
Bload "Shell6.bmp"
sleep 100
Bload "Shell7.bmp"
sleep 100
Bload "Shell8.bmp"
sleep 100
BLoad "Shell9.bmp"
sleep 100
BLoad "shell1.bmp"
sleep 100
Bload "Shell2.bmp"
sleep 100
Bload "Shell3.bmp"
sleep 100
BLoad "Shell4.bmp"
sleep 100
Bload "Shell5.bmp"
sleep 100
Bload "Shell6.bmp"
sleep 100
Bload "Shell7.bmp"
sleep 100
Bload "Shell8.bmp"
sleep 100
BLoad "Shell9.bmp"
sleep 100

BLoad "Shell10.bmp"
print "loading mouse drivers"
BLoad "Shell10.bmp"
sleep 250



dim button as any ptr
dim button2 as any ptr
dim button3 as any ptr
dim button4 as any ptr

dim as integer mousex,mousey,mousebuttons,buttonposx,buttonposy, imgwidth, imgheight
dim as integer buttonsizex,buttonsizey,exittheloop
dim as integer buttonsizex2,buttonsizey2,buttonposx2,buttonposy2
dim as integer buttonsizex3,buttonsizey3,buttonposx3,buttonposy3
dim as integer buttonsizex4,buttonsizey4,buttonposx4,buttonposy4


   Const True = 1
    const false = not true
       
    buttonsizex = 95
    buttonsizey = 30
    buttonposx = 10
    buttonposy = 700
     
   
       
       
       
    buttonsizex2 = 68
    buttonsizey2 = 49
    buttonposx2 = 955
    buttonposy2 = 730
   
    buttonsizex3 = 547
    buttonsizey3 = 31
    buttonposx3 = 10
    buttonposy3 = 730
       
    buttonsizex4 = 500
    buttonsizey4 = 400
    buttonposx4 = mousey
    buttonposy4 = mousex

button = imagecreate(buttonsizex,buttonsizey)
bload "one.bmp",button
button2 = imagecreate(buttonsizex2,buttonsizey2)
bload  "button.bmp",button2
button3 = imagecreate(buttonsizex3,buttonsizey3)
bload  "bar.bmp",button3
button4 = imagecreate(buttonsizex4,buttonsizey4)
bload  "window.bmp",button4
screenset 1,0


do

    cls
 
''line wallpaper gose here needs to be fixed bug some where
    put (buttonposx,buttonposy),button
    put (buttonposx2,buttonposy2),button2
    put (buttonposx3,buttonposy3),button3
  put (buttonposx4,buttonposy4),button4
   
   GetMouse  mousex, mousey , , mousebuttons 
   PRINT USING "Mouse position: ###:###  Buttons: "; mousex; mousey; '' this line show you Mouse position
''
''
''
if mousebuttons=1 then
        if mousex>buttonposx and mousex<buttonposx+buttonsizex then
            if mousey>buttonposy and mousey<buttonposy+buttonsizey then
                ' Put here what you want to happen when you
                ' press button 1.
       
                Print "kife"
           BLOAD "test2.bmp"
       
           endif
        endif
       
     
       
        if mousex>buttonposx2 and mousex<buttonposx2+buttonsizex2 then
            if mousey>buttonposy2 and mousey<buttonposy2+buttonsizey2 then
                ' Put here what you want to happen when you
                ' press button 2.
             
              print time
       Locate 20,500
               
            endif
        endif
 
if mousex>buttonposx3 and mousex<buttonposx3+buttonsizex3 then
if mousey>buttonposy3 and mousey<buttonposy3+buttonsizey3 then
                ' Put here what you want to happen when you
                ' press button 3.
 
          print "bar1 works fine mint kife hahhahahhhahahha"
        endif
        endif
 

    if mousex>buttonposx4 and mousex<buttonposx4+buttonsizex4 then
    if mousey>buttonposy4 and mousey<buttonposy4+buttonsizey4 then
   print"stillbeingclicked"''test........
 
  buttonposy4  = mousex '
       


           ' Put here what you want to happen when you
            ' press button 4.
 
 
     
 




   

 endif
 endif
 endif
   
   
   
   
   sleep 1,1 ' Put ANY sleep in all your loops to prevent 100 % CPU usage!
    screencopy
   
loop until exittheloop = True or Multikey(&h01) ' exit loop if you also press ESCAPE


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 #4 on: December 03, 2009, 10:38:58 PM »

i fixed my code some what
i made the window now when i click on it i can move it the keybord.
only when i am clicking on it ....

will update code
ps my new pc is running no more one core
got a gb1 of ram an 2.9 dual core
runs sick .. so fast thinking on how i can push my programing skills
 
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]
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