Yes/No Box?
BlitzMax Forums/BlitzMax Programming/Yes/No Box?
| ||
I can't remember if there was a built in Yes/No box command for BMax (not MaxGUI). Anyone know or remember? Bah...just typed in Confirm and it highlighted. I don't have access to the docs atm btw... |
| ||
Yep it's:a = Confirm("Yes or No?") But let me ask this instead, how do you strip a path from a filename? ie. C:/projects/tony/Orbicus/savedata/save1.dat I can do it with my own function....but is there a native command to strip the path away similar to the StripExt command? EDIT: StripDir....omg....just......nm..... |
| ||
And for your next rhetorical question? ;-) |
| ||
Ok you asked for it! =p How do you save a pixmap as a .jpg?! |
| ||
Just a sec... I'll call Captain Obvious.... Captain Obvious says: SavePixmapJpeg() :D |
| ||
But let me ask this instead, how do you strip a path from a filename? ie. C:/projects/tony/Orbicus/savedata/save1.dat Not sure whether you want to retain the filename or the path... f$ = "C:/projects/tony/Orbicus/savedata/save1.dat" dir$ = ExtractDir (f$) file$ = StripDir (f$) |
| ||
A small note of caution - be careful if you use ExtractDir. If you're going to tack a filename on to the end of it later, make note that it does not retain the trailing slash - need to put it back yourself. ^^voice of experience :/ |
| ||
' ----------------------------------------------------------------------------- ' ccAddSlash: Adds a forward slash onto a path if it needs it ' ----------------------------------------------------------------------------- Function ccAddSlash$(path$) If Right(path$, 1) <> "/" And Right(path$, 1) <> "\" Then Return path$ + "/" Else Return path$ End If End Function |
| ||
weird thread. |
| ||
SavePixmapJpeg() I guess SavePixmapJPG() would have been TOO obvious. Hrmm...that command doesn't highlight... BUT!!! How do you clear the screen?!! Figure that one out Einstein! |
| ||
Function ClearScreenEventually() Local r:Int, g:Int, b:Int GetClsColor(r, g, b) SetColor(r, g, b) For Local y:Int = 0 Until GraphicsHeight() For Local x:Int = 0 Until GraphicsHeight() Plot x, y Next Next End Function |
| ||
Ha-ha, except you have GraphicsHeight() instead of GraphicsWidth() for the x axis :-p |
| ||
Cls I thought I'd say just in case ;) |
| ||
weird thread. And yet comparatively sane. |
| ||
And yet comparatively sane. Yeah, just wait til Nebula finds it..... :s |