MCPcopy Create free account
hub / github.com/crossuo/crossuo / OnKey

Method OnKey

src/TextEngine/EntryText.cpp:86–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84}
85
86void CEntryText::OnKey(CGump *gump, Keycode key)
87{
88 switch (key)
89 {
90 case KEY_HOME:
91 {
92 SetPos(0, gump);
93 break;
94 }
95 case KEY_END:
96 {
97 SetPos((int)Length(), gump);
98 break;
99 }
100 case KEY_LEFT:
101 {
102 AddPos(-1, gump);
103 break;
104 }
105 case KEY_RIGHT:
106 {
107 AddPos(1, gump);
108 break;
109 }
110 case KEY_BACK:
111 {
112 Remove(true, gump);
113 break;
114 }
115 case KEY_DELETE:
116 {
117 Remove(false, gump);
118 break;
119 }
120 default:
121 break;
122 }
123}
124
125int CEntryText::GetLinesCountA(uint8_t font, TEXT_ALIGN_TYPE align, uint16_t flags, int width)
126{

Callers 12

OnKeyDownMethod · 0.80
OnKeyDownMethod · 0.80
OnKeyDownMethod · 0.80
OnKeyDownMethod · 0.80
OnKeyDownMethod · 0.80
OnKeyDownMethod · 0.80
OnKeyDownMethod · 0.80
OnKeyDownMethod · 0.80
GumpSkills.cppFile · 0.80
OnKeyDownMethod · 0.80
OnKeyDownMethod · 0.80
OnKeyDownMethod · 0.80

Calls 1

RemoveFunction · 0.85

Tested by

no test coverage detected