Comments (5)
Got the fix! Touchscreen now works perfectly.
In microui.c changed line 654:
if (mouseover /*&& !ctx->mouse_down*/) { ctx->hover = id; }
In microui.c added a new line at 1042:
if( ctx->last_hover_root == 0 ) ctx->last_hover_root = cnt;
from microui.
I think I have a better understanding now. ctx->hover_root is not set on mousedown and the mu_mouse_over called from mu_update_control fails because in_hover_root returns false.
Not sure how to fix it yet though.
from microui.
Ok I think I found the issue. The problem lies with ctx->last_hover_root. Since it is null at the beginning, the first move and click will be lost. This never happens when we send down mouse moves every frame as ctx->last_hover_root will be quickly set to something valid. I think I will fix my problem by sending fake mouse moves at the window header coordinates.
I wonder if this behavior could also affect focus state.
from microui.
@uberyoji do you still have the modified microui.c
somewhere? I think the lines changed or I am not sure if I am looking in the right place. Do you remember if this solved in Switch but broke the mouse?
from microui.
@ericoporto The most recently commit available when uberyoji wrote their comment is c988730 (Committed on Oct 6, 2019).
- Explore all files @ commit c988730f1b744ce3c7169da8794e4d8dbd4ee777
- microui.c @ commit c988730f1b744ce3c7169da8794e4d8dbd4ee777
If you have a local copy of the repository (from git clone
), you can run git checkout c988730
to visit that commit. You can run git checkout -
to go back to the current commit. (If you've made any local commits after running the first command, check this stackoverflow answer before you go back or you may lose your changes.)
from microui.
Related Issues (20)
- How can you resize microui window dynamically? HOT 2
- demo/build.sh is not suitable for MacOS HOT 1
- Post a screenshot HOT 7
- Licensing HOT 1
- DirectX 9 HOT 3
- Porting push_quad to DirectX
- Can I use it without SDL ? HOT 1
- Hash function "Cannot convert from 'const void *' to 'const unsigned char *'" HOT 4
- Question: how do I open a window HOT 2
- Library dependency HOT 1
- Why is black area covering gui appearing after resizing window? HOT 1
- Trying to get a window container within another window HOT 3
- C string gets corrupted when passed to the TextCommand handler HOT 3
- How to port to another low level access graphic control HOT 4
- Textbox improvements! HOT 3
- Question: Microui extensions
- Question: Running demo on windows HOT 2
- RAM Footprint HOT 7
- Can you layout from minimum required sizes by child widgets?
- 'step' does not work with mu_slider_ex
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 microui.