mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-03 08:51:22 +00:00
commit
d27bff0fd9
|
@ -25083,6 +25083,9 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
||||||
#if defined(QB64_GUI) && defined(QB64_WINDOWS) && defined(QB64_GLUT)
|
#if defined(QB64_GUI) && defined(QB64_WINDOWS) && defined(QB64_GLUT)
|
||||||
while (!window_exists){Sleep(100);} //Wait for window to be created before checking position
|
while (!window_exists){Sleep(100);} //Wait for window to be created before checking position
|
||||||
return glutGet(GLUT_WINDOW_X) - glutGet(GLUT_WINDOW_BORDER_WIDTH);
|
return glutGet(GLUT_WINDOW_X) - glutGet(GLUT_WINDOW_BORDER_WIDTH);
|
||||||
|
#elif defined(QB64_GUI) && defined(QB64_MACOSX) && defined(QB64_GLUT)
|
||||||
|
while (!window_exists){Sleep(100);} //Wait for window to be created before checking position
|
||||||
|
return glutGet(GLUT_WINDOW_X);
|
||||||
#endif
|
#endif
|
||||||
return 0; //if not windows then return 0
|
return 0; //if not windows then return 0
|
||||||
}
|
}
|
||||||
|
@ -25091,6 +25094,9 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
||||||
#if defined(QB64_GUI) && defined(QB64_WINDOWS) && defined(QB64_GLUT)
|
#if defined(QB64_GUI) && defined(QB64_WINDOWS) && defined(QB64_GLUT)
|
||||||
while (!window_exists){Sleep(100);} //Wait for window to be created before checking position
|
while (!window_exists){Sleep(100);} //Wait for window to be created before checking position
|
||||||
return glutGet(GLUT_WINDOW_Y) - glutGet(GLUT_WINDOW_BORDER_WIDTH) - glutGet(GLUT_WINDOW_HEADER_HEIGHT);
|
return glutGet(GLUT_WINDOW_Y) - glutGet(GLUT_WINDOW_BORDER_WIDTH) - glutGet(GLUT_WINDOW_HEADER_HEIGHT);
|
||||||
|
#elif defined(QB64_GUI) && defined(QB64_MACOSX) && defined(QB64_GLUT)
|
||||||
|
while (!window_exists){Sleep(100);} //Wait for window to be created before checking position
|
||||||
|
return glutGet(GLUT_WINDOW_Y);
|
||||||
#endif
|
#endif
|
||||||
return 0; //if not windows then return 0
|
return 0; //if not windows then return 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -2768,6 +2768,7 @@ FUNCTION ide2 (ignore)
|
||||||
'a separate instance of QB64:
|
'a separate instance of QB64:
|
||||||
p$ = idepath$ + pathsep$
|
p$ = idepath$ + pathsep$
|
||||||
f$ = p$ + ActiveINCLUDELinkFile
|
f$ = p$ + ActiveINCLUDELinkFile
|
||||||
|
IF _FILEEXISTS(f$) = 0 THEN f$ = ActiveINCLUDELinkFile
|
||||||
IF _FILEEXISTS(f$) THEN
|
IF _FILEEXISTS(f$) THEN
|
||||||
backupIncludeFile = FREEFILE
|
backupIncludeFile = FREEFILE
|
||||||
OPEN f$ FOR BINARY AS #backupIncludeFile
|
OPEN f$ FOR BINARY AS #backupIncludeFile
|
||||||
|
@ -8258,7 +8259,9 @@ SUB ideshowtext
|
||||||
ActiveINCLUDELinkFile = MID$(a$, FindApostrophe1 + 1, FindApostrophe2 - FindApostrophe1 - 1)
|
ActiveINCLUDELinkFile = MID$(a$, FindApostrophe1 + 1, FindApostrophe2 - FindApostrophe1 - 1)
|
||||||
p$ = idepath$ + pathsep$
|
p$ = idepath$ + pathsep$
|
||||||
f$ = p$ + ActiveINCLUDELinkFile
|
f$ = p$ + ActiveINCLUDELinkFile
|
||||||
IF _FILEEXISTS(f$) THEN a$ = a$ + " --> Double-click to open": ActiveINCLUDELink = idecy
|
IF _FILEEXISTS(f$) OR _FILEEXISTS(ActiveINCLUDELinkFile) THEN
|
||||||
|
a$ = a$ + " --> Double-click to open": ActiveINCLUDELink = idecy
|
||||||
|
END IF
|
||||||
END IF
|
END IF
|
||||||
'ELSE
|
'ELSE
|
||||||
' temp_a$ = idegetline(idecy)
|
' temp_a$ = idegetline(idecy)
|
||||||
|
@ -8453,7 +8456,7 @@ SUB ideshowtext
|
||||||
IF sy1 = sy2 THEN 'single line select
|
IF sy1 = sy2 THEN 'single line select
|
||||||
COLOR 1, 7
|
COLOR 1, 7
|
||||||
x2 = idesx
|
x2 = idesx
|
||||||
FOR x = 2 + maxLineNumberLength TO (idewx - 2)
|
FOR x = 2 + maxLineNumberLength TO (idewx - 1)
|
||||||
IF x2 >= sx1 AND x2 < sx2 THEN
|
IF x2 >= sx1 AND x2 < sx2 THEN
|
||||||
a = SCREEN(y + 3, x)
|
a = SCREEN(y + 3, x)
|
||||||
|
|
||||||
|
@ -8530,7 +8533,7 @@ SUB ideshowtext
|
||||||
IF sy1 = sy2 THEN 'single line select
|
IF sy1 = sy2 THEN 'single line select
|
||||||
COLOR 1, 7
|
COLOR 1, 7
|
||||||
x2 = idesx
|
x2 = idesx
|
||||||
FOR x = 2 + maxLineNumberLength TO (idewx - 2)
|
FOR x = 2 + maxLineNumberLength TO (idewx - 1)
|
||||||
IF x2 >= sx1 AND x2 < sx2 THEN
|
IF x2 >= sx1 AND x2 < sx2 THEN
|
||||||
a = SCREEN(y + 3, x): _PRINTSTRING (x, y + 3), CHR$(a)
|
a = SCREEN(y + 3, x): _PRINTSTRING (x, y + 3), CHR$(a)
|
||||||
END IF
|
END IF
|
||||||
|
@ -9239,7 +9242,7 @@ FUNCTION idewarningbox
|
||||||
warningIncLevel = CVL(MID$(warning$(x), 5, 4))
|
warningIncLevel = CVL(MID$(warning$(x), 5, 4))
|
||||||
IF warningIncLevel > 0 THEN
|
IF warningIncLevel > 0 THEN
|
||||||
warningIncLines(x) = CVL(MID$(warning$(x), 9, 4))
|
warningIncLines(x) = CVL(MID$(warning$(x), 9, 4))
|
||||||
warningIncFiles(x) = MID$(warning$(x), 13, INSTR(warning$(x), CHR$(2)) - 13)
|
warningIncFiles(x) = MID$(warning$(x), 13, INSTR(warning$(x), CHR$(255)) - 13)
|
||||||
IF LEN(warningIncFiles(x)) > maxModuleNameLen THEN
|
IF LEN(warningIncFiles(x)) > maxModuleNameLen THEN
|
||||||
maxModuleNameLen = LEN(warningIncFiles(x))
|
maxModuleNameLen = LEN(warningIncFiles(x))
|
||||||
END IF
|
END IF
|
||||||
|
@ -9249,7 +9252,7 @@ FUNCTION idewarningbox
|
||||||
'build list
|
'build list
|
||||||
FOR x = 1 TO warningListItems
|
FOR x = 1 TO warningListItems
|
||||||
IF warningLines(x) = 0 THEN
|
IF warningLines(x) = 0 THEN
|
||||||
l$ = l$ + MID$(warning$(x), INSTR(warning$(x), CHR$(2)) + 1)
|
l$ = l$ + MID$(warning$(x), INSTR(warning$(x), CHR$(255)) + 1)
|
||||||
IF x > 1 THEN ASC(l$, treeConnection) = 192
|
IF x > 1 THEN ASC(l$, treeConnection) = 192
|
||||||
ELSE
|
ELSE
|
||||||
l3$ = CHR$(16) + CHR$(2) 'dark grey
|
l3$ = CHR$(16) + CHR$(2) 'dark grey
|
||||||
|
@ -9263,7 +9266,7 @@ FUNCTION idewarningbox
|
||||||
l3$ = l3$ + thisprog$ + SPACE$(maxModuleNameLen - LEN(thisprog$)) + ":" + CHR$(16) + CHR$(16) + num$
|
l3$ = l3$ + thisprog$ + SPACE$(maxModuleNameLen - LEN(thisprog$)) + ":" + CHR$(16) + CHR$(16) + num$
|
||||||
END IF
|
END IF
|
||||||
treeConnection = LEN(l$) + 1
|
treeConnection = LEN(l$) + 1
|
||||||
text$ = MID$(warning$(x), INSTR(warning$(x), CHR$(2)) + 1)
|
text$ = MID$(warning$(x), INSTR(warning$(x), CHR$(255)) + 1)
|
||||||
IF LEN(text$) THEN
|
IF LEN(text$) THEN
|
||||||
l$ = l$ + CHR$(195) + CHR$(196) + l3$ + ": " + text$
|
l$ = l$ + CHR$(195) + CHR$(196) + l3$ + ": " + text$
|
||||||
ELSE
|
ELSE
|
||||||
|
@ -14623,7 +14626,20 @@ FUNCTION getWordAtCursor$
|
||||||
LOOP
|
LOOP
|
||||||
a2$ = MID$(a$, x1, x2 - x1 + 1)
|
a2$ = MID$(a$, x1, x2 - x1 + 1)
|
||||||
ELSE
|
ELSE
|
||||||
a2$ = CHR$(ASC(a$, x))
|
symbol$ = CHR$(ASC(a$, x))
|
||||||
|
IF symbol$ = "~" THEN getWordAtCursor$ = "~": EXIT FUNCTION
|
||||||
|
IF symbol$ = "`" THEN getWordAtCursor$ = "`": EXIT FUNCTION
|
||||||
|
IF symbol$ = "%" AND MID$(a$, x + 1) = "&" THEN getWordAtCursor$ = "%&": EXIT FUNCTION
|
||||||
|
IF symbol$ = "&" AND MID$(a$, x - 1) = "%" THEN getWordAtCursor$ = "%&": EXIT FUNCTION
|
||||||
|
x1 = x
|
||||||
|
DO WHILE x1 > 1
|
||||||
|
IF MID$(a$, x1 - 1, 1) = symbol$ THEN x1 = x1 - 1 ELSE EXIT DO
|
||||||
|
LOOP
|
||||||
|
x2 = x
|
||||||
|
DO WHILE x2 < LEN(a$)
|
||||||
|
IF MID$(a$, x2 + 1, 1) = symbol$ THEN x2 = x2 + 1 ELSE EXIT DO
|
||||||
|
LOOP
|
||||||
|
a2$ = MID$(a$, x1, x2 - x1 + 1)
|
||||||
END IF
|
END IF
|
||||||
getWordAtCursor$ = a2$ 'a2$ now holds the word or character at current cursor position
|
getWordAtCursor$ = a2$ 'a2$ now holds the word or character at current cursor position
|
||||||
ELSEIF x = LEN(a$) + 1 AND x > 1 THEN
|
ELSEIF x = LEN(a$) + 1 AND x > 1 THEN
|
||||||
|
|
|
@ -11846,10 +11846,6 @@ IF idemode = 0 AND NOT QuietMode THEN
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
'OPEN "unusedVariableList.txt" FOR OUTPUT AS #1: CLOSE #1
|
|
||||||
'OPEN "unusedVariableList.txt" FOR BINARY AS #1
|
|
||||||
'PUT #1, 1, usedVariableList$ 'warning$(1)
|
|
||||||
'CLOSE #1
|
|
||||||
IF NOT IgnoreWarnings THEN
|
IF NOT IgnoreWarnings THEN
|
||||||
totalUnusedVariables = 0
|
totalUnusedVariables = 0
|
||||||
FOR i = 1 TO totalVariablesCreated
|
FOR i = 1 TO totalVariablesCreated
|
||||||
|
@ -25462,16 +25458,16 @@ SUB addWarning (whichLineNumber AS LONG, includeLevel AS LONG, incLineNumber AS
|
||||||
IF lastWarningHeader <> header$ THEN
|
IF lastWarningHeader <> header$ THEN
|
||||||
lastWarningHeader = header$
|
lastWarningHeader = header$
|
||||||
GOSUB increaseWarningCount
|
GOSUB increaseWarningCount
|
||||||
warning$(warningListItems) = MKL$(0) + CHR$(2) + header$
|
warning$(warningListItems) = MKL$(0) + CHR$(255) + header$
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
GOSUB increaseWarningCount
|
GOSUB increaseWarningCount
|
||||||
IF includeLevel > 0 THEN
|
IF includeLevel > 0 THEN
|
||||||
thisincname$ = getfilepath$(incFileName$)
|
thisincname$ = getfilepath$(incFileName$)
|
||||||
thisincname$ = MID$(incFileName$, LEN(thisincname$) + 1)
|
thisincname$ = MID$(incFileName$, LEN(thisincname$) + 1)
|
||||||
warning$(warningListItems) = MKL$(whichLineNumber) + MKL$(includeLevel) + MKL$(incLineNumber) + thisincname$ + CHR$(2) + text$
|
warning$(warningListItems) = MKL$(whichLineNumber) + MKL$(includeLevel) + MKL$(incLineNumber) + thisincname$ + CHR$(255) + text$
|
||||||
ELSE
|
ELSE
|
||||||
warning$(warningListItems) = MKL$(whichLineNumber) + MKL$(0) + CHR$(2) + text$
|
warning$(warningListItems) = MKL$(whichLineNumber) + MKL$(0) + CHR$(255) + text$
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
END IF
|
END IF
|
||||||
|
|
Loading…
Reference in a new issue