Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
|
|
|
|
Poster | Thread | Chain-Q
| |
MUI 3.8 vs. UseRightBorderScroller Posted on 7-May-2018 7:22:36
| | [ #1 ] |
| |
|
Cult Member |
Joined: 31-Jan-2005 Posts: 824
From: Budapest, Hungary | | |
|
| Hi,
Not sure I ever started a thread asking for programming help on a forum, but here we go. I'm working on some tiny PCWindow replacement app for CBM PC Bridgeboards, which plays better than the original PCWindow with RTG, and modern systems. It's technically functional, at least for text mode, and I'm heading to a release. But I decided, it would be much better on the long run (probably) to have a basic MUI GUI for the thing, for Settings/Preferences and so on, for further expansion.
I started making this MUI GUI, but then ran into a problem. Basically what I need is very similar to what was described here (although this displays a static image):
http://www.amigans.net/modules/xforum/viewtopic.php?post_id=78958
I have a fixed size gadget (the PC Window screen, in the above example it's a Bitmap), and when the window to have it displayed is smaller than the gadget itself, I want the scrollers in the borders to adjust accordingly. I made the entire GUI structure, adapted my rendering and input for MUI, everything seems to work, but then as soon as I add MUIA_Window_UseRightBorderScroller attribute, and this attribute specifically to my Window, the layouter just starts to fail miserably. (For example, adding MUIA_Window_UseBottomBorderScroller works without problems.) I tend to think everything else I'm doing is right, as it's very similar to what's detailed in that aforementioned Amigans thread, but that's of course for OS4 and newer MUI.
If the right scroller is not in the border, everything works just as expected.
It just seems this option makes MUI 3.8 fail, not render properly, or leave gadget dimensions untouched, etc. I wonder if this was a known issue to other MUI developers, and if there's a known workaround. There's very little information to be found about this online. Now, for reasons of my own, I don't want to depend on the newer MUI for AmigaOS for now. Any help is appreciated. _________________ MorphOS, classic Amiga, demoscene, and stuff "When a bridge is not enough, build a Viaduct!" "Strip the Amiga community of speculation and we can fit every forum on a 720k floppy" (by resle) |
| Status: Offline |
| | Kronos
| |
Re: MUI 3.8 vs. UseRightBorderScroller Posted on 7-May-2018 8:23:39
| | [ #2 ] |
| |
|
Elite Member |
Joined: 8-Mar-2003 Posts: 2553
From: Unknown | | |
|
| @Chain-Q Did you create a ScrollbarObject with MUIA_PropUseWinBorder, MUIV_Prop_UseWinBorder_Right ? Thats what I have in SteamDraw and AFAIR that piece predates MUI4 maybe even the conversion to an MorphOS app.
But it also sounds like your trying to create the borderscrollers on the fly, might very well be that you need to close the window, add the scrollers and attributes and reopen the window (srollers are always on in SteamDraw, so I wouldn't know).
_________________ - We don't need good ideas, we haven't run out on bad ones yet - blame Canada |
| Status: Offline |
| | Chain-Q
| |
Re: MUI 3.8 vs. UseRightBorderScroller Posted on 7-May-2018 8:31:57
| | [ #3 ] |
| |
|
Cult Member |
Joined: 31-Jan-2005 Posts: 824
From: Budapest, Hungary | | |
|
| @Kronos Actually, as I found out after 4 days of suffering trying to solve this, the layouting simply fails, if I have this window flag, on instantiation of the app object *AND* I have a gadget with a limited width in my application (which limits the width of my window somehow during the layouting, like a fixed size bitmap, or similar). Even If I have no ScrollGroup/VirtGroup, Prop gadget, or anything like that in my MUI app.
I tested with MorphOS (just the GUI part, of course), and it seems to work, even the 68k binary I compiled, hence I came to the conclusion this must be in the old MUI somehow. _________________ MorphOS, classic Amiga, demoscene, and stuff "When a bridge is not enough, build a Viaduct!" "Strip the Amiga community of speculation and we can fit every forum on a 720k floppy" (by resle) |
| Status: Offline |
| | Kronos
| |
Re: MUI 3.8 vs. UseRightBorderScroller Posted on 7-May-2018 8:46:01
| | [ #4 ] |
| |
|
Elite Member |
Joined: 8-Mar-2003 Posts: 2553
From: Unknown | | |
|
| @Chain-Q
Something with a fixed width/height should IMO always come with a space object in the same group (maybe even 2 to keep it centered).
I'm also not sure why you'd need a scrollgroup as scrollers should only apply to the PC-output (just like they only to the drawing area in SteamDraw).
I assume the "fixed size bitmap" is the PC output and it might be an idea to do that rendering offscreen in native resolution and than have an Area-object only blit visible parts into the window (with blank border if the Area object gets bigger than needed). _________________ - We don't need good ideas, we haven't run out on bad ones yet - blame Canada |
| Status: Offline |
| | Chain-Q
| |
Re: MUI 3.8 vs. UseRightBorderScroller Posted on 7-May-2018 9:20:40
| | [ #5 ] |
| |
|
Cult Member |
Joined: 31-Jan-2005 Posts: 824
From: Budapest, Hungary | | |
|
| @Kronos Well, my original approach was:
- App -- Window --- VGroup ---- ScrollGroup (for the scrollbars, with MUIA_ScrollGroup_UseWinBorder) ----- VirtGroup ------ My custom gadget (fixed width + height)
The rendering code would be simpler this way. Also I don't want to allow MUI to let my Window rescale bigger than the PC's output, because that looks stupid. This is something perfectly doable otherwise, after all, you always have limited size gadgets, like a Bitmap. And MUI is perfectly making sense of a limited width window in many cases.
But if I set my own gadgets' Max Width into something sane, not "10000", MUI breaks. *BUT* it only does that if my window has the ScrollBar flags, otherwise (if the scrollbars are MUI gadgets), everything works. But they take too much space if the window is maximized, so then I would thought I put the scrollbars in the Window frame, which would be perfect. Except it doesn't work. (And it does in newer MUI.) I was also thinking about Auto-hiding the scrollbars if the gadget is full size, but that requires some hacking too.
Then I started to experiment, and it turned out, it also happens if I don't have my custom gadget, and of the ScrollBar or VirtGroups just the window flag, and a fixed size gadget... And I don't want to rewrite my entire app for now to use Prop gadgets, just to figure out that if I add the Right side scrollbar to the window again, it's still broken.
I'm at the point where I was thinking of just going back to using an intuition window with BOOPSI prop gadgets in the frame, then combine this somehow with a MUI Menu and MUI Prefs window. After all I don't even want any other gadgets in that window, just the PC screen. But I just wanted to give this a shot, that maybe I'm missing something obvious in MUI or there's a known workaround. Last edited by Chain-Q on 07-May-2018 at 09:27 AM.
_________________ MorphOS, classic Amiga, demoscene, and stuff "When a bridge is not enough, build a Viaduct!" "Strip the Amiga community of speculation and we can fit every forum on a 720k floppy" (by resle) |
| Status: Offline |
| | Chain-Q
| |
Re: MUI 3.8 vs. UseRightBorderScroller Posted on 8-May-2018 6:49:41
| | [ #6 ] |
| |
|
Cult Member |
Joined: 31-Jan-2005 Posts: 824
From: Budapest, Hungary | | |
|
| @Chain-Q OK, so I debugged some more. I tried to implement my own layouter in the uppermost group, hoping that whatever MUI was doing during layout, I could overwrite, and beat some sense into this thing.
Turns out when I get the issue of trashed windows and misplaced gadgets, the LayoutHook is not even called by MUI. For whatever reason, it just decides nothing needs relayouting in some of these cases, which is obviously wrong. I tried some hacky ways to force a relayout, but so far these attempts were unsuccessful.
Oh well... _________________ MorphOS, classic Amiga, demoscene, and stuff "When a bridge is not enough, build a Viaduct!" "Strip the Amiga community of speculation and we can fit every forum on a 720k floppy" (by resle) |
| Status: Offline |
| |
|
|
|
[ home ][ about us ][ privacy ]
[ forums ][ classifieds ]
[ links ][ news archive ]
[ link to us ][ user account ]
|