-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added features, compiler warning fix, and gitignore .dep files #294
base: master
Are you sure you want to change the base?
added features, compiler warning fix, and gitignore .dep files #294
Conversation
ability to disable all touchevents on the fly
ability to disable screen redrawing routines on the fly
pass pointer array of dbl type percetages to gslc_ElemXSliderSetTicks
Hi @gravity-addiction -- thank you for these updates! Regarding the For void gslc_ElemXSliderSetTicks(gslc_tsGui* pGui, gslc_tsElemRef* pElemRef, uint16_t* anTickArr,
uint8_t nTickArrLen); thanks! |
Yep! Good catch on that. I'll update that commit. The use case I have is a touchscreen arm sbc connected to hdmi for a desktop and sdl1 for user interaction with a 3.5 touchscreen. At times i'll map the hdmi video to the framebuffer and you then control the desktop mouse with the touchscreen. while guislice is very much actively executing click events and refreshing the framebuffer while the user interacts with the desktop. |
i'm open to any insight on type casting this line, thanks!
|
- Custom tick positions are defined by percentages (0..100) - Enable tick marks to be drawn above and/or below the baseline - Support horizontal & vertical arrangement
Hi @gravity-addiction -- sorry for the delay. I have pushed a few adjustments to your branch that I think may simplify the implementation. In particular, I have added a
Example of original API: // Draw 10 tick divisions evenly along length of control, with height 5 below line (default)
gslc_ElemXSliderSetStyle(&m_gui,pElemRef,true,GSLC_COL_RED_DK4,10,5,GSLC_COL_GRAY_DK2); Example using new feature: // Draw 10 tick marks with a custom positioning, with height 5 above and below line
gslc_ElemXSliderSetStyle(&m_gui,pElemRef,true,GSLC_COL_RED_DK4,10,5,GSLC_COL_GRAY_DK2);
static uint8_t anTickPos[10] = {0,19,36,51,64,75,84,91,96,100};
gslc_ElemXSliderSetStyleCustom(&m_gui,pElemRef,anTickPos,true,true); Let me know if the adjusted API works for you, |
Hi @ImpulseAdventure .. no worries I get a little delayed myself. I do like your implementation of the tick marks by percentage. However that won't work for my use case, my thumb slider is supposed to center align with the ticks. I now believe it is the wrong approach to use percentages. As the tick marks should be the same resolution as the thumb slider, pixels from the edge. Basically with the ability to put a tick mark on every pixel of the slider. Let the developer translate percentage to pixels, maybe making a helper function in XSlider.c to help translate percentage to pixel value, internally grabbing the element size and doing the math. What do you think of ditching percentage and using uint16 with values being pixels from the edge? P.S. this is a reposting of this message, I was logged into the wrong account: strictd is my old company account. |
Hi Gary -- you raise a good point with the use-case. In that case, let me take a look at the API and post a followup. |
Hey @gravity-addiction -- can you let me know if the latest version (pixel-oriented ticks array) that I pushed to your repo works for you? thanks! |
gslc_SetScreenDisableRedraw(pGui, true); // skips screen draws while true, default: false
gslc_SetTouchDisabled(pGui, true); // skips executing touch events while true, default: false