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
if WinData(OnWin, 8) = 1
MenuX = 0
if MouseY() > OnY and MouseY() < (OnY + 20)
for X=1 to WinMenu(OnWin, 0, 0)
MenuWidth = Text Width(WinMenuText$(OnWin, X, 0)) + 6
if Win_MouseInside(OnX + MenuX, OnY, MenuWidth, 20)=1 and WinMenu(OnWin, X, 0) = 1
if WinMenu(OnWin, X, 1) > 0
if Mouseclick() = 1 and WinData(OnWin, 16) = 0
Hold = WinData(OnWin, 51)
WinData(OnWin, 51) = X
WinData(OnWin, 53) = menuX
if Hold ! X
Win_UpdateWindow(OnWin)
Win_Sys_UpdateBitmap()
exit
else
WinData(OnWin, 51) = 0
WinData(OnWin, 52) = 0
win_UpdateWindow(OnWin)
Win_Sys_UpdateBitmap()
exit
endif
endif
endif
endif
if WInData(OnWin, 51) = X then SMX = MenuX
MenuX = MenuX + MenuWidth
next x
endif
if WinData(OnWin, 51) > 0
Menu = WinData(OnWin, 51)
ItemWidth = WinMenu(OnWin, Menu, 102)
NumItems = WinMenu(OnWin, Menu, 101)
For x=1 to NumItems
if WinMenu(OnWin, menu, X) = 1
if Win_MouseInside(OnX+SMX,OnY+20+(X-1)*20,ItemWidth, 20)=1
Size = -1
Win_SetCursor(WinSysData(7))
if WinData(OnWin, 52) ! X
WinData(OnWin, 52) = X
Win_UpdateWindow(OnWin)
Win_Sys_UpdateBitmap()
endif
if Mouseclick() = 1 and WinData(OnWin, 16) = 0
Win_SendMessage(OnWin, WM_COMMAND(1), Menu, X)
WInData(OnWin, 51) = 0
Win_UpdateWindow(OnWin)
Win_Sys_UpdateBitmap()
Exitfunction
endif
Done = 1
else
if WinData(OnWin, 52) = X
WinData(OnWin, 52) = 0
Win_UpdateWindow(OnWin)
Win_Sys_UpdateBitmap()
endif
if X = NumItems
if Mouseclick() = 1 and WinData(OnWin, 16) = 0
WinData(OnWin, 51) = 0
WInData(ONWin, 52) = 0
Win_UpdateWIndow(OnWin)
Win_Sys_UpdateBitmap()
endif
endif
endif
endif
next x
if Done = 1
Exitfunction
endif
endif
endif
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 \/