Quote:
Originally Posted by Mark Nord
For the latter, and assuming that my Calc will work on a 600, at least sudoku should be easily upgraded with a nummeric-keyboard, based on the doCommand (if I recall correctly) property of sprites.
Same applies to mahjong and should go for fiveballs, but for those two the gamecontrol is not so obvious.
|
My recollection was wrong. Sprites don't have a doCommand method, but baisc mouse-interaction is there.
Although I wasn't able to define new handler via <code>, like it is working for buttons, we can tweak the behavior!
The "nonTouch" menu for the 505 and 300 is moved to so named group and set to invisible, another group "Touch" with a standard fsk-menu is introduced.
(I havn't checked if kartu's PRS+ popup-menu is touch enabled and suitable for this.)
This menu seams to exist in the scope of DOCUMENT, even if definde in the group "Touch". Thus leading to a nasty behavior of the Sim. After exiting the app the Sim will lose focus. No more clicks are processed. But the app is not frozen, as you can close it via right click on the Windows-Programm-Bar.
[EDIT] Issue solved by calling menuBar.endLoop(ev) for both Sim and PRS-600[/EDIT]
And so there is a first preview of a click (maybe touch) enabled Sudoku.
Known issues:
- Select Game# not imlemented yet
- Zero-Sprite (for delete) has no glyph
- Sim lose focus, so exit via Systemmenu "X" or via "Menu" "left" "center"
"center"
- Code is based on my x.03 version with "compiled/elevated" Core-functions and the wrapper to _Core for sandboxed calls. Havn't checked with the new 2.0.3 codes!!
- WinGame-Animation isn't stoped by fsk-menu-action
- Background for WinGame-Animation in wrong order in respect of sprites
- labels.png has no palette transparency set yet
[EDIT 21.12.2010]
Sudoku_menubar_endLoop_v3.zip attached, all Issues cleared, full functional in Sim and PRS-505
getSoValue is explicit declared, so there are no dependencies to PRS+, should even run as Autorun.App
Possible further enhancements:
- have 505/300 interact with the new fsk_menu
- try to create the sprites in code (cloneObject or xs.newInstanceOf) instead of defining them in XML
[/EDIT]
[ADD]
in target.init = function ()
Code:
if(_Core.system.getSoValue == undefined){
had to be replaced with
Code:
if(!_Core || !_Core.system || !_Core.system.getSoValue){
for correct operation outside the Sim
21.12.2010
To get Button-Input for models 505 and 300 each <group> needs at least on "focusable" <SPRITE> to process the event.
[/ADD]
[EDIT 14.02.2011]
..endloop_v4.zip
Thanks to hcripe's findings now usable at PRS-600
[/EDIT]
[ADD 21.2.2011]
improved code (menus are visible with the Win-Animation) can be found in post #165
previous versions are momentary kept for reference
[/ADD]