Jump to content

bleasby

App Developer
  • Posts

    611
  • Joined

  • Last visited

About bleasby

  • Birthday 07/02/1981

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

bleasby's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

73

Reputation

  1. At least on the RocketLauncher side of things I wouldn't say that. There were more than one thousand code line changes since the hyperlaunch days. More stability, a huge amount of bugs fixed, more features included, less memory use, easier automatic update built-in, and a much better support structure if you use RocketLauncher. Just my two cents.
  2. This is easilly done if you do a autohotkeyscript that when you start hyperpin it press the button to change tables by a random time.
  3. This code was made with AutoHotkey_L, however this do not mean that will not work with the basic version, but it was not tested yet, so if you want to see it working properly, install AHK_L in the computer. I had a lot of free time in the last three days, so you will see a lot of code here. The code includes: 1.Fplaunch pause menu prototype: All shapes are dawn with GDI plus and are fully customizable in colors, sizes, menu contents,... 2.HiScore presentation with full transparency and scrolling text above the playfield 3.Sound Control Menu to adjusted windows master sound (in theory it is compatible with all windows versions, however I only tested in Windows 7) Pause menu proof of concept, sound control and hiscore Blur and anybody else reponsible for the fplaunch, if you need any help, and if I have time to do it, I am at your disposal.
  4. God news: I found a solution to Hiscore text in visual pinball like in future pinball. Now the full history: I wanted to have an additional option in the fplaunch menu to adjust my pinball volume level so I started to play with autohotkey and at the same time I started to make a prototype of the fplaunch menu completely draw as GDI+ shapes. In the middle of all that I finally found a solution to have the Hiscore written above the playfield with transparency using the same structure of the code that I posted a few posts before. When we draw the bitmap on the screen using Gdip_DrawImage we can add a matrix transformation of the colors on the bitmap. Making the calculus I was finally able to find a color matrix transformation that maintain all colors unchanged, except for the alpha level of one specific color, the full write. Using that I was finally able to written the bitmap of the Hiscore contents in the screen with real transparency. The only limitation is that the Hiscore text cannot have pure write text (RGB ffffff), but we can use a very near approximation (feffff). The code for doing it, additionally with the code for adding a new option for volume control in the pause screen and the code for a fully customizable shape written pause menu are in post bellow. I just realized that I did not had the minimum five posts count to add a link to the forum.
  5. The transparency problem happens because bitmaps do not support natively transparency information. If I am able to use a png, this would be solved. However I do not know if I would have to rewrite the Gdip_BitmapFromScreen or if there is a easier way of doing it. Rewriting the Gdip_BitmapFromScreen is a little of my league. :-) We have to ask somebody from the autohotkey forum if it is possible to put the transparency on the rotated bitmap by some other way. My idea with the rectangles was exactly to draw dynamicaly the menus, so we could put animations at buttom presses, and etc. If you need help with that, it is just ask. Whenever I have a free time, I love to play with some scripts. Sorry, but I never tried ahk_L.
  6. I did a first version of what could be the HiScore script with the rotated text. To run the example, just put the ahk in the same folder of the GDIP.ahk, or adjust the path in the #include. #include gdip.ahk #SingleInstance Force pToken := Gdip_Startup() Gui, Destroy contents = ( GRAND CHAMPION KEF 75.000.000 HIGHEST SCORES #1 G G 60.000.000 #2 C G 50.000.000 #3 XAQ 45.000.000 #4 M G 40.000.000 DESTROY RING CHAMPION EYE - 10:00.00 ) ;vertical distance of Hiscore window HiScoreTopDistance := 100 ;Gui 1 - hidden horizontal Gui Gui, 1: Color, 0b40e4 Gui, 1: Font, s15, Quartz Gui, 1: Add, Text, Cffffff Center, %contents% Gui, 1: +AlwaysOnTop -Caption +Lastfound hwnd := WinExist() Gui, 1: Show, NA WinGetPos,scorex,scorey, scorew, scoreh, ahk_id %hwnd% pBitmap := Gdip_BitmapFromScreen("hwnd:" hwnd) Gui, 1: Show, Hide ;Gui 2 - hiscore background image imageW := scoreh+20, imageH := scorew+40 Gui, 2: -Caption +E0x80000 +LastFound +OwnDialogs +Owner +AlwaysOnTop Gui, 2: Show, NA hwnd1 := WinExist() hbm := CreateDIBSection(imageW, imageH) hdc := CreateCompatibleDC() obm := SelectObject(hdc, hbm) G := Gdip_GraphicsFromHDC(hdc) Gdip_SetSmoothingMode(G, 4) pBrush1 := Gdip_BrushCreateSolid(0xff0ffffff) pBrush2 := Gdip_BrushCreateSolid(0xff00C32A5) pBrush3 := Gdip_BrushCreateSolid(0xff0b40e4) Gdip_FillRoundedRectangle(G, pBrush1, 0, 0, imageW, imageH, 20) Gdip_FillRoundedRectangle(G, pBrush2, 5, 5, imageW-10, imageH-10, 15) Gdip_FillRoundedRectangle(G, pBrush3, 10, 10, imageW-20, imageH-20, 10) Gdip_DeleteBrush(pBrush1) Gdip_DeleteBrush(pBrush2) Gdip_DeleteBrush(pBrush3) UpdateLayeredWindow(hwnd1, hdc, HiScoreTopDistance, (A_ScreenHeight-imageH)//2, imageW, imageH) SelectObject(hdc, obm) DeleteObject(hbm) DeleteDC(hdc) Gdip_DeleteGraphics(G) ;Gui 3 - rotated vertical Gui Gui, 3: -Caption +E0x80000 +LastFound +OwnDialogs +Owner +AlwaysOnTop Gui, 3: Show, NA hwnd2 := WinExist() bitmapW := scoreh, bitmapH := scoreW hbm := CreateDIBSection(bitmapW, bitmapH) hdc := CreateCompatibleDC() obm := SelectObject(hdc, hbm) G := Gdip_GraphicsFromHDC(hdc) UpdateLayeredWindow(hwnd2, hdc, HiScoreTopDistance+10, (A_ScreenHeight-bitmapH)//2, bitmapW, bitmapH) Gdip_ImageRotateFlip(pBitmap, 3) Gdip_DrawImage(G, pBitmap) UpdateLayeredWindow(hwnd2, hdc) Gdip_DisposeImage(pBitmap) SelectObject(hdc, obm) DeleteObject(hbm) DeleteDC(hdc) Gdip_DeleteGraphics(G) return I used GDI+ rectangles to construct the appearance. This could be a faster way to construct the hiscore window. I really do not know. If you want i can adjust the code to use a pre made png file. Blur, you decide. The only thing more important is that by using the GDI+ rectangles, I made the HiScore windows resizable depending of the hiscore contents lines (as different pinball tables have a different number of hiscore categories). I hope that this is what you had in mind. I do not have the future pinball in my computer, so I do not know how it is the hiscore visualization under it, so I tried to keep the same appearance of the pause menu in a HiScore menu to be put above it. My first idea was also to use the transparency in the rotated text to put it directly above the table image when in pause menu. But I am having problems with setting the transparency in the rotated bitmap created. If I, or someone else, solve this, we could do any kind of presentation for the hiscores. It is also possible to do many animations or use GDI+ advanced text with the score in the way that I present here. However i decided to keep it simple in order to avoid using too much resources. Any animation requires a loop in rotated bitmaps that could use something of the computer resources. If any of you have in mind something specific, just tell me and I can try to implement in the HiScore menu. Please give me your opinions. PS: It is a not revised code, so it is possible, and very probable, to have some unnecessary lines in the middle of the code.
  7. I am able to put the text in vertical without any windows borders using the tab2 and some winset properties. The problem is that by using the tab trick I am unable to write more than one line at each time (as the text is written as a tab title, and not as a normal text). So if we keep in this path, I would need to make a group of GUIs, one for each line to write the entire hiscore text. That is not a very elegant solution and maybe represents too much lines of script. Right now I am without time to see if I am able to develop any alternative because i have to make a trip in the next 3 days. If nobody reaches a solution until the next week, i Will try to develop something.
  8. why not use a gui in the script to rotate the hiscore text like in: Gui, Font, s12 Gui, add, Tab2, w30 h150 Right Buttons 0x8 disabled, Rotated Text|.|| Gui, show Return GuiClose: ExitApp
×
×
  • Create New...