Closed TwilightMercy closed 1 year ago
From looking at logs in KODI, the window activated is sliderdialog ID 1045. So I also think it works similarly to how you implemented the addon toggle, meaning you have to read current values and increment manually. Reference for slider. So logic is this:
setPercent
to set the initial positionWouldn’t be opening the window 10145 “sliderdialog” be enough? To open this:
And it will work as usual like opening it in manually in Kodi?
I don't think so. The dialog is reusable, which means it doesn't exist specifically for just zooming. Here's the code where it gets created as seen here:
if (g_application.GetAppPlayer().Supports(RENDERFEATURE_ZOOM))
AddSlider(groupVideo, SETTING_VIDEO_ZOOM, 216, SettingLevel::Basic,
videoSettings.m_CustomZoomAmount, "{:2.2f}", 0.5f, 0.01f, 2.0f, 216, usePopup);
I see, thanks for the explanation, I’m not that experienced in that area.
Is it hard/complicated to make a small python code addon to reproduce the “Zoom amount” window on button press? I’m afraid I don’t have the knowledge for that.
Not too difficult. I'll give it a try sometime next week
Thank you, appreciated.
Hey. Do you know an addon which uses Control Slider?
I don't think I know something for OSD. I found this in Kodi forum if it helps:
Hey. Do you know an addon which uses Control Slider?
I know that FEN addon has control slider but in addon settings
I give up, I have gotten only as far as showing a Control Slider which for some reason looks weird, like a webpage without CSS. Would have uploaded screenshot but don't know how
Just press "Prt screen" button in keyboard and paste directly here
Anyway, don't give up : ) If you can make it work (regardless the design), I have a friend who knows to design addon/skins and stuff.
Haha :) but don’t worry about it, I’ll later give it to my friend to check The goal if possible to open this slider in player OSD with button that have “onclick” function similar to black bars never, like: RunScript(addon_name, function)
Yes. If you look at this he is using XML like you did (while I am using Python). From here you can see the code will look like this
<include name="OSD_PlaySpeed_Label">
<param name="width">52</param>
<param name="selected">false</param>
<param name="textcolor">dialog_fg_70</param>
<definition>
<control type="label">
<font>font_tiny</font>
<label>$PARAM[label]</label>
<include content="Object_TextColor" condition="$PARAM[selected]">
<param name="textcolor">$VAR[ColorSelected]</param>
</include>
<textcolor>$PARAM[textcolor]</textcolor>
<width>$PARAM[width]</width>
<align>center</align>
</control>
</definition>
</include>
So this is what I have right now, if they could modify it to use XML for ControlSlider instead (or make it look good in Python) then it would be okay script.zoomshortcut (1).zip
I've installed it and it opened the scroller with the big white circle How can I call in the the player to activate it? and will using right/left keys in keyboard will move the zoom slider?
Then increment/deincrement values using \<onleft> and \<onright> with conditionals.
From the link I gave seems you're supposed to react to left and right manually for example like this
<onleft>incrementZoom()</onleft>
I see, I thought (if possible) that the python code itself will open the slider and react to left/right which will change the zoom
Or it isn’t?
Seems for most things Kodi offers both Python way and XML way. But documentation too lacking
Hi friend,
In the meantime, until the android workaround is in development to perfection, I want to configure in Estuary’s player OSD a button to simply open the manual zoom slider available in Video settings in player - “Zoom amount”:
For simple “onclick” function in skin’s VideoOSD.xml file, I only found that it’s possible to do ZoomIn/ZoomOut functions:
But I’m looking for a direct shortcut to “Zoom Amount” window, for manually moving the slider. Do you know if it’s possible with small python code as a small Kodi addon?
Thanks.