mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-25 05:55:13 +00:00
Savefile GUI added to IDE
Added the ability to use the Save Dialogs in the IDE.
This commit is contained in:
parent
27b6fdb0a9
commit
00921c6d84
|
@ -6401,13 +6401,18 @@ FUNCTION ide2 (ignore)
|
||||||
PCOPY 2, 0
|
PCOPY 2, 0
|
||||||
IF ideprogname = "" THEN
|
IF ideprogname = "" THEN
|
||||||
ProposedTitle$ = FindProposedTitle$
|
ProposedTitle$ = FindProposedTitle$
|
||||||
IF ProposedTitle$ = "" THEN
|
IF ProposedTitle$ = "" THEN ProposedTitle$ = "untitled" + tempfolderindexstr$
|
||||||
a$ = idefiledialog$("untitled" + tempfolderindexstr$ + ".bas", 2)
|
IF UseGuiDialogs Then
|
||||||
|
a$ = Savefile$ (ProposedTitle$ + ".bas")
|
||||||
ELSE
|
ELSE
|
||||||
a$ = idefiledialog$(ProposedTitle$ + ".bas", 2)
|
a$ = idefiledialog$(ProposedTitle$ + ".bas", 2)
|
||||||
END IF
|
END IF
|
||||||
ELSE
|
ELSE
|
||||||
a$ = idefiledialog$(ideprogname$, 2)
|
IF UseGuiDialogs Then
|
||||||
|
a$ = Savefile$ (ideprogname$)
|
||||||
|
ELSE
|
||||||
|
a$ = idefiledialog$(ideprogname$, 2)
|
||||||
|
END IF
|
||||||
END IF
|
END IF
|
||||||
PCOPY 3, 0: SCREEN , , 3, 0
|
PCOPY 3, 0: SCREEN , , 3, 0
|
||||||
IF ideerror > 1 THEN GOTO IDEerrorMessage
|
IF ideerror > 1 THEN GOTO IDEerrorMessage
|
||||||
|
@ -20286,6 +20291,31 @@ end sub
|
||||||
' Download = MKI$(0) 'still working
|
' Download = MKI$(0) 'still working
|
||||||
'END FUNCTION
|
'END FUNCTION
|
||||||
|
|
||||||
|
Function SaveFile$ (IdeOpenFile as string)
|
||||||
|
STATIC Default_StartDir$
|
||||||
|
|
||||||
|
IF Default_StartDir$ = "" THEN
|
||||||
|
Default_StartDir$ = _STARTDIR$
|
||||||
|
if Right$(Default_StartDir$, 1) <> idepathsep$ then Default_StartDir$ = Default_StartDir$ + idepathsep$
|
||||||
|
END IF
|
||||||
|
|
||||||
|
f$ = _SaveFileDialog$("Save As", Default_StartDir$ + path$ + IdeOpenFile, ".bas", "QB64PE BAS file")
|
||||||
|
IF RIght$(Ucase$(f$),4) <> ".BAS" THEN f$ = f$ + ".bas"
|
||||||
|
|
||||||
|
ideerror = 3
|
||||||
|
OPEN f$ FOR BINARY AS #150
|
||||||
|
ideerror = 1
|
||||||
|
ideprogname$ = f$: _TITLE ideprogname + " - " + WindowTitle
|
||||||
|
idesave f$
|
||||||
|
idepath$ = path$
|
||||||
|
IdeAddRecent f$
|
||||||
|
IdeSaveBookmarks f$
|
||||||
|
CLOSE #150
|
||||||
|
end sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Function OpenFile$ (IdeOpenFile as string)'load routine copied/pasted from the old IDE file load/save dialog routines
|
Function OpenFile$ (IdeOpenFile as string)'load routine copied/pasted from the old IDE file load/save dialog routines
|
||||||
|
|
||||||
STATIC Default_StartDir$
|
STATIC Default_StartDir$
|
||||||
|
|
Loading…
Reference in a new issue