Recent Posts

Pages: [1] 2 3 ... 10
1
Programs / Re: Tic Tac Toe Rings
« Last post by FellippeHeitor on Today at 02:17:44 AM »
I meant the video, as it's my local copy.

You can just delete the music file from the assets folder, the program will not error.
2
Programs / Re: Tic Tac Toe Rings
« Last post by bplus on Today at 12:10:52 AM »
Hi. I assume you downloaded the full package from the Github repo, since I didn't include the soundtrack in the demo (intentionally). See the "Settings" button at the top-right corner? That's where you'll be able to switch it off (non-functional atm).

No settings button, I downloaded again last night or today hoping to try new sound effects but github says code hasn't been updated since 8 days ago.
3
The code in question is this segment:

Code: C++: [Select]
  1.  
  2. void sub__consolefont(qbs* FontName, int FontSize){
  3.     /*
  4.     #ifdef QB64_WINDOWS
  5.     SECURITY_ATTRIBUTES SecAttribs = {sizeof(SECURITY_ATTRIBUTES), 0, 1};
  6.     HANDLE cl_conout = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, & SecAttribs, OPEN_EXISTING, 0, 0);
  7.     static int OneTimePause;
  8.     if (!OneTimePause){ // a slight delay so the console can be properly created and registered with Windows, before we try and change fonts with it.      
  9.         Sleep(500);
  10.         OneTimePause=1; //after the first pause, the console should be created, so we don't need any more delays in the future.
  11.     }
  12.     CONSOLE_FONT_INFOEX info = {0};
  13.     info.cbSize       = sizeof(info);
  14.     info.dwFontSize.Y = FontSize; // leave X as zero
  15.     info.FontWeight   = FW_NORMAL;
  16.     if (FontName->len>0){ //if we don't pass a font name, don't change the existing one.
  17.         const size_t cSize = FontName->len;
  18.         wchar_t* wc = new wchar_t[32];
  19.         mbstowcs (wc, (char *)FontName->chr, cSize);
  20.         wcscpy(info.FaceName, wc);
  21.         delete[] wc;
  22.     }
  23.  
  24.     SetCurrentConsoleFontEx(cl_conout, NULL, &info);
  25.     #endif
  26.     */
  27. }

Remove the group comment lines (the /* and */), and save.
After that, run purge_libqb_only.bat (or a similar named batch file).

Then you should be good to go.
4
Sorry for so many responses, but I finally figured out a partial fix. For the mouse input issues, you have to right click on the left corner of the title bar, select properties, then the Options tab, and deselect "QuickEdit Mode".

This still does not fix the font issues, but does resolve the issue of mouse input not being read from the console.

Aye.  Quickedit can't be enabled for the mouse to work properly.

For the font issues, you'd need to go into the internal/c folder and edit libqb.cpp.  QB64 currently works on windows systems all the way back to XP, but the library routines which support font changing are Windows Vista and above.  Rather than obsoleting QB64  for windows versions older than Vista, the necessary code was remarked out and the functionality removed.

The proper code is still in libqb for you to change the console font, but you need to unremark it, save the changes, and then purge_libqb.bat.  After that, you can use console font with your programs.
5
Programs / Re: Tic Tac Toe Rings
« Last post by FellippeHeitor on Yesterday at 10:38:31 PM »
Hi. I assume you downloaded the full package from the Github repo, since I didn't include the soundtrack in the demo (intentionally). See the "Settings" button at the top-right corner? That's where you'll be able to switch it off (non-functional atm).
6
Sorry for so many responses, but I finally figured out a partial fix. For the mouse input issues, you have to right click on the left corner of the title bar, select properties, then the Options tab, and deselect "QuickEdit Mode".

This still does not fix the font issues, but does resolve the issue of mouse input not being read from the console.


7
Programs / Re: Tic Tac Toe Rings
« Last post by bplus on Yesterday at 09:47:49 PM »
Hi Fellippe,

A little request, a switch to turn off that soundtrack that plays over and over and over. After awhile I'd like to switch off that track and make selections from YouTube (keeping the rest of sound effects active).

Up to you, of course, I can alter my own copy but maybe others would like option too.
8
Programs / Re: Stereospace 2
« Last post by bplus on Yesterday at 09:29:50 PM »
Perfect!
9
More Information:

I found a sample program that was posted prior to the release of QB64 1.4 to demonstrate various console enhancements. I notice that the _CONSOLEFONT is also not working for me.

In an attempt to determine if the problem is some sort of setting on my computer, I also tried to run the sample code on a VM where I have the same problems.

Details:

Windows 10, 1909, with March 2020 updates installed.

Sample code:

Code: QB64: [Select]
  1.  
  2. PRINT "Welcome to a demostration of the Windows Console System for QB64,"
  3. PRINT "as overhauled by Steve!"
  4. PRINT "First, allow me to illustrate two newly implemented commands: SLEEP and CLS"
  5. Pause
  6. PRINT "And now, I'll illustrate how to change colors in the console:"
  7. FOR i = 0 TO 15
  8.     COLOR i, 15 - i
  9.     PRINT "COLORS:"; i; "ON"; 15 - i
  10. Pause
  11. PRINT "And now, we're going to have fun with the console size."
  12. PRINT "Our original screen should be set at 80x25 for default."
  13. PRINT "Press <ANY KEY> when ready to change modes."
  14. Pause
  15. WIDTH 120, 50
  16. PRINT "Here we're set at 120x50."
  17. Pause
  18. WIDTH 120, 50, 120, 50
  19. PRINT "And here we no longer have a scroll buffer; it's also 120x50."
  20. PRINT "Notice the vertical scroll bar is gone?"
  21. Pause
  22. WIDTH 120, 50, 300, 300
  23. PRINT "And here we now have both a vertical and a hortizontal scroll bar."
  24. FOR i = 1 TO 50
  25.     PRINT "See? ";
  26.     _LIMIT 10
  27. PRINT "Be certain to scroll the bar so you can 'See' all the text."
  28. Pause
  29. WIDTH , , 120, 50
  30. PRINT "And now, prepare as I do something amazing!"
  31. Pause
  32. PRINT "TaDa!!  Your font is now size 16!"
  33. Pause
  34. PRINT "And just in case yours was already size 16, it's now size 24!"
  35. Pause
  36. Pause
  37. PRINT "And now, let's take a look at... MOUSE SUPPORT!!"
  38. LOCATE 10, 10
  39. PRINT "<<CLICK HERE TO CONTINUE>>"
  40.     x = _CONSOLEINPUT
  41.     IF _MOUSEX >= 10 AND _MOUSEX <= 38 AND _MOUSEY = 10 AND _MOUSEBUTTON(1) THEN EXIT DO
  42. PRINT "WAAAAAAIIIIIIT A MOMENT!!"
  43. FOR i = 1 TO 40
  44.     PRINT MID$("THE CONSOLE NOW HAS MOUSE SUPPORT?!!", i, 1);
  45.     _DELAY .1
  46. PRINT "WOOOOOOOO!!!!!"
  47. Pause
  48. PRINT "And, of course, I can now work with LOCATE..."
  49. LOCATE 10, 10: PRINT "LOCATE 10,10"
  50. LOCATE 20: PRINT "LOCATE 20"
  51. LOCATE , 20: PRINT "LOCATE ,20"
  52. Pause
  53. PRINT "And, of course, I can now get back single character returns..."
  54. PRINT "Press any key, and I'll give you the scan code for it.  <ESC> quits the demo."
  55.     x = _CONSOLEINPUT
  56.     c = _CINP
  57.     PRINT c;
  58. LOOP UNTIL c = 1
  59.  
  60.  
  61. SUB Pause
  62.     PRINT
  63.     PRINT "Press <ANY KEY> to continue."
  64.     SLEEP
  65.  
Code: [Select]
10
Programs / Re: Stereospace 2
« Last post by Craz1000 on Yesterday at 09:09:32 PM »
Here you go.
Pages: [1] 2 3 ... 10