Comments (3)
Some users report that the focus gets lost. I am trying to use ImGui::IsItemFocused() to only call SetKeyboardFocusHere when the item is not focused. That didn't work as expected
You should solve this problem because that your actual problem. A repro would be helpful, and building one you may understand the nature of your issue. Right now your statement and claim is too vague for us to be able to help without extra details.
You can use the Dear ImGui Debug Log window it may help you understand what is happening.
(PS: If you steal focus every frame buttons won't work, that's expected behavior.)
from imgui.
In the old UI (this is for Cataclysm: Dark Days Ahead), we were able to draw a text entry field, and without having the focus leave that control, allow users to click buttons with the mouse, then still enter text into the text entry field after the mouse click event without having to click the text field again. I am trying to have some common way in my code to keep that behavior intact.
Emulating precisely this is currently not simple with our current focusing system and we have an issue for it, so if you want to emulate precisely this, I would move the discussion to #1418.
from imgui.
Yeah, what you said at the end is basically what I'm getting at with this issue. If I set focus to the InputText every frame that it is unfocused, then buttons will be broken. But at the same time, I feel like my users will complain that the focus ever leaves the input text field.
In the old UI (this is for Cataclysm: Dark Days Ahead), we were able to draw a text entry field, and without having the focus leave that control, allow users to click buttons with the mouse, then still enter text into the text entry field after the mouse click event without having to click the text field again. I am trying to have some common way in my code to keep that behavior intact.
from imgui.
Related Issues (20)
- No scrolling region or selectable items inside Child HOT 3
- Can't write in any field. (1.90.5-docking with SDL3) HOT 1
- `BeginGroup`/`EndGroup` with table inside reports incorrect item size
- Delay in Combo Popup Opening with glfwWaitEventsTimeout HOT 5
- Where's the binaries? HOT 4
- Mouse scrolling not working HOT 6
- Imgui community HOT 1
- Rendering vertices with the D3DPT_LINESTRIP type. HOT 1
- Can't access some stuff from imgui.h HOT 1
- Suggestion: Consider Adding Title Bar Text to Popups HOT 2
- SDL3 Multi-Viewports not creating windows when main window is hidden
- Recommended way to expand / collapse tree nodes with keyboard shortcuts? HOT 3
- VuIkan: invalid Dynamic Rendering functions from the Instance-level loader HOT 3
- Text Bottom Padding Bug HOT 1
- Power savings & hardware usage HOT 3
- Add RGFW backend implementation HOT 2
- Text wrapping: how does it work? HOT 1
- ImDrawList rects aren't perfect HOT 7
- Running ImGui app on Arm Processor (Allwinner H3 with mali 400 -> orangepi one) HOT 1
- Can no longer use ctrl shortcuts in InputText's as of v1.90.6 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imgui.