PB 6.30 Beta 4 - ScreenGadget library - bug report

Post bugreports for the Windows version here
miso
Enthusiast
Enthusiast
Posts: 554
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: PB 6.30 Beta 4 - ScreenGadget library - bug report

Post by miso »

PeDe wrote: Tue Dec 09, 2025 12:41 pm PB v6.30b5 arm64, Raspberry Pi OS (Trixie, Wayland)

With a German keyboard, capital letters cannot be entered in StringScreenGadget and EditorScreenGadget. Umlauts such as ‘ÄÖÜäöü’ and special characters such as ‘$°^µ€’ cannot be entered.

Example used for input:
examples/3d/ScreenGadgetMultipleWindow.pb

Peter
I think that is because of the strange handling of the inkey() command of PB... It triggers on release, and not on press.
Can you try this? Hold down your altgr or the modifier key you need to type the character, press the button for the character, release it, release the modifier button. It is not a good behavior though, but I think the PB KeyboardInkey() command is the culprit.
PeDe
Enthusiast
Enthusiast
Posts: 322
Joined: Sun Nov 26, 2017 3:13 pm

Re: PB 6.30 Beta 4 - ScreenGadget library - bug report

Post by PeDe »

PB v6.30b5 x64, Linux Mint 22.2, Intel J1900 CPU with integrated graphics

The mouse pointer can only be moved very slowly, almost only a few pixels at a time.
When I insert the procedure ‘SetFrameRate(60)’, the mouse pointer works normally, but the CPU (all 4 cores) is then constantly at 90%.

On the same PC running Windows 7 x64, the mouse pointer works normally, but the CPU (1 core) is always at 25%.

Example used:
examples/3d/ScreenGadgetMultipleWindow.pb
PeDe
Enthusiast
Enthusiast
Posts: 322
Joined: Sun Nov 26, 2017 3:13 pm

Re: PB 6.30 Beta 4 - ScreenGadget library - bug report

Post by PeDe »

miso wrote: Tue Dec 09, 2025 1:23 pm Can you try this? Hold down your altgr or the modifier key you need to type the character, press the button for the character, release it, release the modifier button. It is not a good behavior though, but I think the PB KeyboardInkey() command is the culprit.
No, that doesn't work.
For example, I can enter the backslash with the ALT+GR key + ‘ß’, but not the € sign with the ALT+GR key + ‘E’.

Peter
miso
Enthusiast
Enthusiast
Posts: 554
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: PB 6.30 Beta 4 - ScreenGadget library - bug report

Post by miso »

PeDe wrote: Tue Dec 09, 2025 1:31 pm
miso wrote: Tue Dec 09, 2025 1:23 pm Can you try this? Hold down your altgr or the modifier key you need to type the character, press the button for the character, release it, release the modifier button. It is not a good behavior though, but I think the PB KeyboardInkey() command is the culprit.
No, that doesn't work.
For example, I can enter the backslash with the ALT+GR key + ‘ß’, but not the euro sign with the ALT+GR key + ‘E’.

Peter
Must be linux+used font specific then. On Windows, it works for me. Euro also (Hun Keyboard)
miso
Enthusiast
Enthusiast
Posts: 554
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: PB 6.30 Beta 4 - ScreenGadget library - bug report

Post by miso »

On Windows, in editorgadget the character "1" size seems to be wrong. It shifts the blinking cursor indicator to the right slightly with each entry.
Type 1111111111 to see.
miso
Enthusiast
Enthusiast
Posts: 554
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: PB 6.30 Beta 4 - ScreenGadget library - bug report

Post by miso »

miso wrote: Tue Dec 09, 2025 1:51 pm On Windows, in editorgadget the character "1" size seems to be wrong. It shifts the blinking cursor indicator to the right slightly with each entry.
Type 1111111111 to see.
This is an error in the Screengadget default font in windows. It does not happen with a different font.
miso
Enthusiast
Enthusiast
Posts: 554
Joined: Sat Oct 21, 2023 4:06 pm
Location: Hungary

Re: PB 6.30 Beta 4 - ScreenGadget library - bug report

Post by miso »

After a couple of tests, I have to say this is truely an amazing work.

These are what I found problematic yet:
strange mousewheel + listview behavior:

Code: Select all

;-ERROR Description
;mousewheel triggers events, also weird behavior when mouseovered a listview gadget


InitSprite()
InitKeyboard():InitMouse()

Global lw.i,ps.i,p1.i,mw.i
Define c.i = 0
ExamineDesktops():dx=DesktopWidth(0)*0.9:dy=DesktopHeight(0)*0.9

OpenWindow(0, 0, 0, DesktopUnscaledX(dx),DesktopUnscaledY(dy), "[Escape] to quit", #PB_Window_BorderLess | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, dx, dy, 0, 0, 0)

; Create the Screen UI
InitScreenGadgets()

mw=OpenScreenWindow(#PB_Any, 200, 10, 300, 650, "Mywindow")
ps=PanelScreenGadget(#PB_Any,10,30,280,610)
p1=AddScreenGadgetItem(ps,-1,"panel-1")
lw=ListViewScreenGadget(#PB_Any,5,10,268,563)

ExamineHIDs()
While NextHID()
  c+1
  OpenHID(c,Val(HIDInfo(#PB_HID_VendorId)),Val(HIDInfo(#PB_HID_ProductId)))
  AddScreenGadgetItem(lw,-1,HIDInfo(#PB_HID_Product,c))
Wend


Repeat
  While WindowEvent() : Wend
  
  ClearScreen(RGB(0,0,0))
  ExamineMouse()
  ExamineKeyboard()
  
  If ScreenWindowEvent() = #PB_Event_Gadget
    eg = EventScreenGadget()
    Select eg
      Case lw
        Debug GetScreenGadgetText(lw)
          SetScreenGadgetText(MW,GetScreenGadgetText(lw))
    EndSelect
  EndIf
  
  RenderScreenGadgets()
  FlipBuffers()
  Delay(0)
Until KeyboardReleased(#PB_Key_Escape) Or MouseButton(3)
A minor problem here: renaming things changes string value of some gadgets, but does not rebuild the GUi graphics (yet)

And a major, probably library builder problem ( or I did not see something )
Seemingly one of my variable (mb) loses its scope for a while in this loop...

Code: Select all

;-ERROR Description
;Variable scope error
;setscreengadgettext not working with windows,panels

InitSprite()
InitKeyboard():InitMouse()

Global lw.i,ps.i,p1.i,mw.i
Global mb.i
ExamineDesktops():dx=DesktopWidth(0)*0.9:dy=DesktopHeight(0)*0.9

OpenWindow(0, 0, 0, DesktopUnscaledX(dx),DesktopUnscaledY(dy), "[Escape] to quit", #PB_Window_BorderLess | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, dx, dy, 0, 0, 0)

; Create the Screen UI
InitScreenGadgets()

mw=OpenScreenWindow(#PB_Any, 200, 10, 300, 650, "Mywindow")
ps=PanelScreenGadget(#PB_Any,10,30,280,610)
p1=AddScreenGadgetItem(ps,-1,"panel-1")
lw=ListViewScreenGadget(#PB_Any,5,10,268,563)


ExamineHIDs()
While NextHID()
  c+1
  OpenHID(c,Val(HIDInfo(#PB_HID_VendorId)),Val(HIDInfo(#PB_HID_ProductId)))
  AddScreenGadgetItem(lw,-1,HIDInfo(#PB_HID_Product,c))
Wend


Repeat
  While WindowEvent() : Wend
  
  ClearScreen(RGB(0,0,0))
  ExamineMouse()
  
  ExamineKeyboard()
  
  ;-THIS TRIGGERS if leftmouse
  If mb = 1 : Debug "Before":EndIf
  If ScreenWindowEvent() = #PB_Event_Gadget
    
      eg = EventScreenGadget()
       Select eg
        Case lw
          Debug GetScreenGadgetText(lw)
          ;-THIS TRIGGERS NOT if leftmouse (seems to be an error of scopes)
          If mb = 1 : Debug "Inbetween" : EndIf
          
          ;-I can set the text of the  window, but GUI graphics does not changes
          SetScreenGadgetText(MW,GetScreenGadgetText(lw))
          Debug GetScreenGadgetText(mw)
        Default
          SetScreenGadgetText(MW," ")
      EndSelect
    
  EndIf
  
  RenderScreenGadgets()
  
  mb = 0
  If MouseButton(1) : mb = 1 : EndIf
  
  ;-THIS TRIGGERS if leftmouse
  If mb = 1 : Debug "After": EndIf
  FlipBuffers()
  
  Delay(0)
Until KeyboardReleased(#PB_Key_Escape) Or MouseButton(3)
Post Reply