Show
Ignore:
Timestamp:
03/25/03 12:28:52 (11 years ago)
Author:
robert
Message:

Added futher keys to complete the keyboard.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgkeyboard/osgkeyboard.cpp

    r1747 r1748  
    4848    { 
    4949        itr->second->setSingleChildOn(value); 
    50          
    5150    } 
    5251} 
     
    185184 
    186185    pos.x() = 0.0f; 
    187     pos.z() += 1.0f; 
     186    pos.z() += 1.5f; 
    188187     
    189188    float F_height = 0.5f; 
     
    204203 
    205204     
    206     float cursorMoveHeight=0.5f; 
     205    float cursorMoveHeight=0.35f; 
    207206 
    208207    pos = middle;     
    209     addKey(pos,osgGA::GUIEventAdapter::KEY_Left,"Left",2.0f,cursorMoveHeight); 
     208    addKey(pos,osgGA::GUIEventAdapter::KEY_Left,"Left",1.0f,cursorMoveHeight); 
    210209    osg::Vec3 down = pos; 
    211     addKey(pos,osgGA::GUIEventAdapter::KEY_Down,"Down",2.0f,cursorMoveHeight); 
    212     addKey(pos,osgGA::GUIEventAdapter::KEY_Right,"Right",2.0f,cursorMoveHeight); 
    213      
     210    addKey(pos,osgGA::GUIEventAdapter::KEY_Down,"Down",1.0f,cursorMoveHeight); 
     211    addKey(pos,osgGA::GUIEventAdapter::KEY_Right,"Right",1.0f,cursorMoveHeight); 
     212     
     213    osg::Vec3 keypad = pos; 
     214    keypad.x()+=1.0f; 
     215 
    214216    pos = down; 
    215217    pos.z() += 1.0f; 
    216218     
    217     addKey(pos,osgGA::GUIEventAdapter::KEY_Up,"Up",2.0f,cursorMoveHeight); 
    218      
    219  
     219    addKey(pos,osgGA::GUIEventAdapter::KEY_Up,"Up",1.0f,cursorMoveHeight); 
     220     
     221 
     222    float homeHeight = 0.35f; 
     223    pos = middle; 
     224    pos.z() += 3.0;     
     225    addKey(pos,osgGA::GUIEventAdapter::KEY_Delete,"Delete",1.0f,homeHeight); 
     226    addKey(pos,osgGA::GUIEventAdapter::KEY_End,"End",1.0f,homeHeight); 
     227    addKey(pos,osgGA::GUIEventAdapter::KEY_Page_Down,"Page\nDown",1.0f,homeHeight); 
     228     
     229    pos = middle; 
     230    pos.z() += 4.0;     
     231    addKey(pos,osgGA::GUIEventAdapter::KEY_Insert,"Insert",1.0f,homeHeight); 
     232    addKey(pos,osgGA::GUIEventAdapter::KEY_Home,"Home",1.0f,homeHeight); 
     233    addKey(pos,osgGA::GUIEventAdapter::KEY_Page_Up,"Page\nUp",1.0f,homeHeight); 
     234 
     235    pos = middle; 
     236    pos.z() += 5.5;     
     237    addKey(pos,osgGA::GUIEventAdapter::KEY_Print,"PrtScrn\nSysRq",1.0f,homeHeight); 
     238    addKey(pos,osgGA::GUIEventAdapter::KEY_Scroll_Lock,"ScrLk",1.0f,homeHeight); 
     239    addKey(pos,osgGA::GUIEventAdapter::KEY_Pause,"Pause\nBreak",1.0f,homeHeight); 
     240     
     241     
     242 
     243    pos = keypad; 
     244    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Insert,"0",2.0f,1.0f); 
     245    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Delete,".",1.0f,1.0f); 
     246    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Enter,"Enter",1.0f,homeHeight); 
     247     
     248    pos = keypad; 
     249    pos.z() += 1.0f; 
     250    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_End,"1",1.0f,1.0f); 
     251    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Down,"2",1.0f,1.0f); 
     252    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Page_Down,"3",1.0f,1.0f); 
     253 
     254    pos = keypad; 
     255    pos.z() += 2.0f; 
     256    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Left,"4",1.0f,1.0f); 
     257    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Begin,"5",1.0f,1.0f); 
     258    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Right,"6",1.0f,1.0f); 
     259    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Add,"+",1.0f,1.0f); 
     260 
     261    pos = keypad; 
     262    pos.z() += 3.0f; 
     263    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Home,"7",1.0f,1.0f); 
     264    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Up,"8",1.0f,1.0f); 
     265    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Page_Up,"9",1.0f,1.0f); 
     266 
     267    pos = keypad; 
     268    pos.z() += 4.0f; 
     269    addKey(pos,osgGA::GUIEventAdapter::KEY_Num_Lock,"Num\nLock",1.0f,0.3f); 
     270    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Divide,"/",1.0f,1.0f); 
     271    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Multiply,"*",1.0f,1.0f); 
     272    addKey(pos,osgGA::GUIEventAdapter::KEY_KP_Subtract,"-",1.0f,1.0f); 
    220273 
    221274}