Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Weird Break Problem in my GUI Functions

Author
Message
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 23rd Sep 2009 19:51 Edited at: 23rd Sep 2009 22:30
Well i got menus in a while back but the way i was doing it was dropping the fps when you had your mouse over them, so i changed it up.

well now the menu isn't showing up and the values arn't changing(when i know that it is getting to the part that changes them), but! if i put a break in it then it works. the full code is attached but here is the menu update part. and a list of the functions that are being used

Win_UpdateWindow(Window) Redraws the window
Win_Sys_UpdateBitmap() Redraws the bitmap that is actually seen



the if mousey > ONY and mousey < ony+20 part is the part to select a menu the next part is the part to select the item. this is line 630 to 702 in the full document. if you put a break at line 644 right before the exit or at line 661 right after the "Menu =" statement or anywhere after 644 really. it will break then the menu shows up. i don't understand why though. the break should just pause the program, and not do anything else.

Once again full code attached. No media needed.

Edit:

Sorry Take out the "Load music "Uncap.mp3",1" at the beginning. or replace it with a mp3 you have to get the full fps. btw i get about 150 with those windows that are being created with minimal change when interacting with them.


Edit 2:

Nevermind! I wasn't setting mouse Mouse down variable which made it appear and disappear too fast to see it. whoops. now that i think about it this has too many variables so probably no one could help anyway lol

New Site! Check it out \/

Attachments

Login to view attachments
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 24th Sep 2009 05:13
Yes there are a lot of variables and its not very clear what they do.
if WinData(OnWin, 8) = 1
From this line I can gather that this is probably a boolean test (some people declare TRUE=1 : FALSE=0 for extra clarity), but other than that it's a bit unclear. WinData is very vague, OnWin is probably referring to the selected window and 8 is well... 8, it could mean anything.
Sorry to pick at your code but I wanted to point out how simple changes can make a program much easier to follow.
Try to get into the habit of reading your code for clarity as you go, before you know it you'll be writing stuff that even a non-coder could follow.
Are you going to help out with DarkNoobs when thesmartone gets back to us?

TGC Forum - converting error messages into sarcasm since 2002.
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 24th Sep 2009 05:57
Well as for the variables I have memorized all the meanings of array positions and am apperantly oblivius to everyone else but declaring TRUE = 1 and FALSE = 0 in every function would be a pain. other then that I thought WinData was descriptive enough considering the only thing it would be used for by the user is that section 25 to 50 is extra window data hense the name WinData(Window Data)

I do appoligise for this mistake of putting this massive thing that makes sense only to me on the forums and asking for help

as for DarkNoobs, not sure i was going to go with DarkPros(or whatever it is being called) as i think i have been around long enough and have had enough experience to help with this(although feel free to voice your oppinion. doesn't hurt my feelings), but as it seems I am a bit busy with this project, Which is actually kindof close to being finished other then some clean up here and there and perfecting a few window classes. and plus school is playing a Huge factor. I just don't think i can take on a team project and take a c++ course and work on my own stuff and do school at the same time

New Site! Check it out \/
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 24th Sep 2009 17:50
Quote: "i was going to go with DarkPros(or whatever it is being called) as i think i have been around long enough and have had enough experience to help with this(although feel free to voice your oppinion. doesn't hurt my feelings)"

Your code will decide whether you are ready

TGC Forum - converting error messages into sarcasm since 2002.
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 24th Sep 2009 19:28
Haha, Yupp. well thanks for your input!

New Site! Check it out \/
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 2nd Oct 2009 13:34
Quote: "Your code will decide whether you are ready "


Lol.......That made obese sound ancient.

(\__/) HHAHAHAHAHAH!
(O.o ) / WORLD DOMINATION!!!!!!!!!!
(> < )
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Oct 2009 03:36
I was going for an Obi Wan-esque line

TGC Forum - converting error messages into sarcasm since 2002.
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 20th Oct 2009 18:32
Hahaha

New Site! Check it out \/

Login to post a reply

Server time is: 2024-05-09 06:06:09
Your offset time is: 2024-05-09 06:06:09