View Single Post
Old 11-17-2010, 04:50 PM   #32
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Click enabled Sudoku

Quote:
Originally Posted by Mark Nord View Post
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]
Attached Thumbnails
Click image for larger version

Name:	Image1.jpg
Views:	405
Size:	53.0 KB
ID:	61518   Click image for larger version

Name:	Image2.jpg
Views:	424
Size:	50.4 KB
ID:	61519   Click image for larger version

Name:	Image3.jpg
Views:	462
Size:	86.1 KB
ID:	61520  
Attached Files
File Type: zip Sudoku_Click.zip (79.4 KB, 324 views)
File Type: zip Sudoku_Click_Final.zip (75.8 KB, 347 views)
File Type: zip Sudoku_menuBar_endLoop_v2.zip (74.6 KB, 295 views)
File Type: zip Sudoku_menuBar_endLoop_v3.zip (74.5 KB, 297 views)
File Type: zip Sudoku_menuBar_endLoop_v4.zip (74.5 KB, 293 views)

Last edited by Mark Nord; 02-21-2011 at 09:38 AM. Reason: v4 of click enabled sudoku
Mark Nord is offline   Reply With Quote