mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-01 05:10:41 +00:00
Change InputText programmatically when pressing a button (keep InputText state and insert character at the cursor position) #5219
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#5219
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have a problem with an ImGui::InputText for which I would like to change the text displayed by using a Virtual Keyboard (also created with ImGui). I have a window containing the InputText and another one containing the virtual keyboard (both inside an SDL window).
When I press the buttons on the virtual keyboard I change the buffer I attached to the InputText by adding a character at the end of it. Is there a nicer way to alter the InputText content by taking into account also the position of the cursor inside it and keeping the state of the input text cursor?
I'm a newbie here, sorry if I didn't follow all the guidelines for this question.