CHDK - virtual keyboard - testers needed! - page 8 - General Discussion and Assistance - CHDK Forum  

CHDK - virtual keyboard - testers needed!

  • 150 Replies
  • 48017 Views
Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #70 on: 07 / January / 2012, 07:58:36 »
Advertisements
The problem is that after case you need a constant, not a variable. And it seems like it's not possible here. I don't know why C requires that, but after reading on Internet it looks so...
Correct.   C may very well be one of the oldest programming languages still in regular use today.  I believe that the use of only constants in a case statement allows the compiler to produce very efficient & compact jump tables - something that was very important at the time the language was designed.
 
Ported :   A1200    SD940   G10    Powershot N    G16

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #71 on: 07 / January / 2012, 11:52:41 »
@waterwingz, outslider
Thank you for the answer

@outslider
The file in your attachment is not gui_tbox.c but gui_space.h and that is not needed (also the changes of with you wrote are not in this file)  :D

Now I'm have about half finished the "long line support".
« Last Edit: 07 / January / 2012, 12:03:04 by TobiMarg »

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #72 on: 07 / January / 2012, 13:00:58 »
Haha, I've clikced wrong file! Here it is :)

It's very good that you almost have long line support. It looks like we have almost done keyboard!
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #73 on: 07 / January / 2012, 15:07:59 »
I have made a few improvements:
*centered the keyboard
*added long text support
*bugfixes (ok, shoot_half need "lastKey = '\0'; curchar = -1;")

Also - I have tried to change this to if/else if/else but there are problems with spacebar now. So I didn't apply this in to below code...
I added if/else if/else

Also what about multiline text? Are we going to have this? I don't think it is required now, since virtual keyboard is designed to changing names, adding captions (as EXIF tags - would be cool!) or entering small amount of text. Not writting SMSes;)
I think also it's not so important.


Re: CHDK - typing / virtual keyboard / editor-style typing
« Reply #74 on: 07 / January / 2012, 15:32:06 »
I like how fast work moving. :)
I already finished core infrastructure. First implementation will be new options of filebrowser.

Regarding to multiline. I think it enlarge scope of tbox to something similar to EDI. It could be different module. IMO Current scope is enough for this project.

One more request to module is: it is possible to have charmap different from default and it could have length bigger then now. For ex I try to add russian charset and it require at least 36 sym (including separators).
So big charmap line broke formating, although length of screen is enough. (Just require increase width of box slightly for this case).
Is this difficult to implement?

Re: CHDK - virtual keyboard - testers needed!
« Reply #75 on: 07 / January / 2012, 15:45:42 »
I have made a few improvements:
*centered the keyboard
*added long text support
*bugfixes (ok, shoot_half need "lastKey = '\0'; curchar = -1;")
(...)

Wohoo! That's great! Now it looks like it should. We need to test it now.

One note - on my camera (sx130) indicators of long string (< >) are almost invisible. Could they be white?


I already finished core infrastructure. First implementation will be new options of filebrowser.

So all the things are almost prepared. About rename - for this purpouse you should carry out about the charmap. There should be no chars like '\' '/' and other special in the filename. It can even break the filesystem. So the best idea is not provide many special characters to the user. We can be sure that one of them will try to use them ;) IMO the only special characters in rename should be '.' '_' and '-'.



One more request to module is: it is possible to have charmap different from default and it could have length bigger then now. For ex I try to add russian charset and it require at least 36 sym (including separators).
So big charmap line broke formating, although length of screen is enough. (Just require increase width of box slightly for this case).
Is this difficult to implement?

Tobi have enlarged tbox in the lastest release. I hope it is enough ;)
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: CHDK - virtual keyboard - testers needed!
« Reply #76 on: 08 / January / 2012, 11:49:11 »
My new improvements:
*">navigate cursor<" centered
*scroll text in T-Mode with zoom (Cursor doesn't leave the editfield)
*Insert new char only if enough space
*View cursor at start
*Message if maxlen is reached

One note - on my camera (sx130) indicators of long string (< >) are almost invisible. Could they be white?
Added red triangles insted of green <>.


One more request to module is: it is possible to have charmap different from default and it could have length bigger then now. For ex I try to add russian charset and it require at least 36 sym (including separators).
So big charmap line broke formating, although length of screen is enough. (Just require increase width of box slightly for this case).
Is this difficult to implement?

Tobi have enlarged tbox in the lastest release. I hope it is enough ;)
I don't have enlarged tbox, I only have enlarged the "maxlen" argument to" tbox_charmap_init" in "_module_run". To enlarge the max textbox length increase MAX_WIDTH (actually 35).

EDIT:
If you increase MAX_WIDTH the box grows up to the length of the longest line of the keyboard or (if it's bigger) to "maxlen". But it only grow up to MAX_WIDTH (if maxlen is longer the editfield is scrollable).
« Last Edit: 08 / January / 2012, 11:55:47 by TobiMarg »

Re: CHDK - virtual keyboard - testers needed!
« Reply #77 on: 08 / January / 2012, 13:01:00 »
Very good! Canon should be ashamed :D

Small improvement - when max. size was reached in T mode (by pressing spacebar) than '>navigate_cursor<' text didn't clear whole 'text limit reached' message. Added one rect to clear the message:
Code: [Select]
if ( Mode== 'T' )
        {
            //rect clears any previous message
            draw_filled_rect(key_offset_x+((strlen(tbox_chars[0])-MAX_MSG_LENGH)>>1)*FONT_WIDTH, tbox_buttons_y, key_offset_x+((strlen(tbox_chars[0])+MAX_MSG_LENGH)>>1)*FONT_WIDTH, tbox_buttons_y+FONT_HEIGHT, MAKE_COLOR(COLOR_GREY,COLOR_GREY));
            draw_string(key_offset_x+((strlen(tbox_chars[0])-17)>>1)*FONT_WIDTH, tbox_buttons_y, ">navigate cursor<", MAKE_COLOR(COLOR_GREY, COLOR_WHITE));
        }
        else if ( Mode == 'K' )

PS. For any possible testers - below is also compiled module (by CHDK-Shell). Compiled for sx130 but I believe it's portable.
« Last Edit: 08 / January / 2012, 13:18:12 by outslider »
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick


Re: CHDK - virtual keyboard - testers needed!
« Reply #78 on: 09 / January / 2012, 07:36:38 »
I think the file you have attached is not with my changes.  :D

I have attached it now with your improvement. The flt file is
compiled for sx230hs but i also think that it should be portable.

Re: CHDK - virtual keyboard - testers needed!
« Reply #79 on: 09 / January / 2012, 08:09:05 »
I think the file you have attached is not with my changes.  :D

I have attached it now with your improvement. The flt file is
compiled for sx230hs but i also think that it should be portable.

Maybe I missed something and posted wrong file... And yes - looks like it is portable, works at least for SX130 :) That's the power of modules!

I see that we have almost nothing to do more... It works, it's stable. Can be added to trunk IMO. Now I hope that tsvstar will prepare suitable way for that :)
« Last Edit: 09 / January / 2012, 08:11:26 by outslider »
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal