mirror of
				https://github.com/thunderbrewhq/thunderbrew
				synced 2025-10-31 00:06:05 +03:00 
			
		
		
		
	chore(ui): add TAB button handler for CSimpleEditBox
This commit is contained in:
		
							parent
							
								
									02e683d699
								
							
						
					
					
						commit
						6f108b3067
					
				| @ -871,6 +871,11 @@ int32_t CSimpleEditBox::OnLayerKeyDown(const CKeyEvent& evt) { | ||||
|             return 1; | ||||
|         } | ||||
| 
 | ||||
|         case KEY_TAB: { | ||||
|             // TODO correct implementation
 | ||||
|             this->RunOnTabPressedScript(); | ||||
|         } | ||||
| 
 | ||||
|         // TODO
 | ||||
|         // - remaining keys
 | ||||
| 
 | ||||
| @ -994,6 +999,12 @@ void CSimpleEditBox::RunOnEnterPressedScript() { | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void CSimpleEditBox::RunOnTabPressedScript() { | ||||
|     if (this->m_onTabPressed.luaRef) { | ||||
|         this->RunScript(this->m_onTabPressed, 0, 0); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void CSimpleEditBox::RunOnTextChangedScript(int32_t changed) { | ||||
|     if (this->m_onTextChanged.luaRef) { | ||||
|         auto L = FrameScript_GetContext(); | ||||
|  | ||||
| @ -98,6 +98,7 @@ class CSimpleEditBox : public CSimpleFrame, CSimpleFontedFrame { | ||||
|         void RunOnEditFocusGainedScript(); | ||||
|         void RunOnEditFocusLostScript(); | ||||
|         void RunOnEnterPressedScript(); | ||||
|         void RunOnTabPressedScript(); | ||||
|         void RunOnTextChangedScript(int32_t changed); | ||||
|         void SetCursorPosition(int32_t position); | ||||
|         void SetHistoryLines(int32_t a2); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 VDm
						VDm