Lockable widgets are those which takes in all input
and if set then no other widget can take any input
its same as them being inactive, no buttons, animations
etc will work.
This is implemented to support `modal` property of window,
which requires a window to take all input and prevent all
others from having any actions.
Modifies border of window by first changing title to "", then updating
window border to borderType 2 `ThinNoTitle`.
`titleVisible of window` to verify this behavior.
Co-authored-by: Pragyansh Chaturvedi <pragyanshchaturvedi18@gmail.com>
Added setInnerDimension which calls resize (with bool inner dimension change: true), moveto and finally updateOuterDimension.
This was implemented to match window rectangle size as used by window property `rect`, `rect of window` in `workshop` uses this.
resize function is extracted to new function resize and resizeInner,
also a new private function rebuildSurface is created to handle common
code of refreshing/rebuilding surface after modifying inner or outer
window dimensions.
Smartmenu implementation using offsetY to displace popup such that the previous selected item will fall onto cursor, includes checked item and highlighted.
For `Popup Menu` in theapartment, without this patch the second popmenu was not remembering the last selected item and was opening it from scratch, after this patch popupmenu will open from the last selected item already selected with checkbox.
Additional logic for drawing blinks when closing popup menu is added, closeMenu is overriden because it is called inside eventLoop and therefore need to be captured when closingMenu.
Add blinking animation support for macpopups, affects `Popup Menu` in theapartment, before this there was no animation when selecting item and the menu just used to immediately close, now however there is proper animation for item selection.
Added functions for menu drawing/selections, this uses the base functions of macmenu to implement mac-styled popupmenu's, also return selected item index/text.
Used by 'Popup Menu' in theapartment: With this changes the popupmenu is working with both item selectors, doesn't implement the icon selector.
Exposed MacMenuItem, MacMenuSubMenu, MacMenuItem and MacMenuData to headers and changed visibility of needed functions to protected.
These structs and functions is used in popupmenu for reusing macmenu code.
- consolidate public #define's (just ATARI)
- cpu compiler flags are specified in the script
- allow explicit move16, SV and SV Blitter features enabled/disabled
Provide two build scripts:
1. "Fat" one targeted at 040/060 machines (possibly with SuperVidel)
This one is optimized for 68020-60 (so it's still possible to try
highres engines on 68030 machines).
2. "Slim" one targeted at 030 machines (Falcon030+DFB/CT2 or TT030)
This one is optimized for 68030 and stripped from even more features:
"fancy" (highres) themes, move16 & SuperVidel routines and most
importantly the highres engines.
- The primary change is to fix or improve the scaling of BDF fonts
- Now uses the same approach as in MacFonts scaling that is creating another surface and refactor it with a grayscalemap
- Bugs - there are still some problems when testing in capital letters
- The refactoring code for MacFont that magnifies the font on a surface and then uses a grayscalemap to refactor the scaling, is pushed back into a resuable method in the base font class.
- surface magnigy funtion transfer and scaleSingleGlyph method add to the font class.
Some engines are too bound to linear surfaces in 8bpp that it is very
hard to repair them. So instead of polluting the engine with
Surface::init() & delete[] Surface::getPixels() just use this
workaround.
It is also useful as an early fix for newly found engines which may be
fixable later.
The move16 routine needs not only src/dst aligned on 16 bytes but this
requirement must be honored in every iteration. Sometimes an engine
would pass a 16-byte aligned src (by chance) with srcPitch = 13 for
instance.
The routine above it where srcPitch == dstPitch works because there's
never a second iteration with unaligned pointers.
Also, a bit optimized (precalculated some of the jump offsets).
Rect::contains expect that bottom right is excluded but circle functions
consider the radius as included.
In addition fix an error in Wu's algorithm for rounded squares.