2016-08-07, 00:04
Hello
after some weeks off not to much (to non) coding, i use this saturday to try to do one of these themperature curves, knewn from other weather apps, that i like, and try to get something like that in Kodi.
After thinking a while on how i could do this, i came to the conclusion that working with "blocks"/"images" for every degree might is/could be, the best chance to achive what im after.
heres a Mockup how the temperature curve (Houerly) could look after its done:
but as u might guess i have some problems to get this to work.
Problem 1:
I did try to use a Grouplists for every houer, but i need a <aligny>bottom</aligny> in any way, which i wasnt abel to achive.
Is there a way with a List, group, or what ever, which alows me to "stack" my "degree-Images" from the bottom to the Top?
Problem 2:
To avoid problems and odd looking of the themperatur curve, i compare against day low temp, to avoid to much blocks and problems with °C / °F
for this i would need something like this:
as a visible condition
which would alow me, to hide the unused "degree-Images/blocks".
but as far as i can thel from the wiki, "IntegerGreatherThan" alows me only to compare against a number, and not agains an other infolabel.
Does may someone of u got a Idea for a Workaround?
Maybe Code says more as these Words, so:
Here is an attempt: the Code for the First Houer.
The Idea is to work with params at a lator attempt, but for now to see if i can get it to work i did it this way.
Hope u get the Idea.
at the Moment im stuck, so if one might got a idea how i can push away the stones which block the road to get this to work, that would be cool.
after some weeks off not to much (to non) coding, i use this saturday to try to do one of these themperature curves, knewn from other weather apps, that i like, and try to get something like that in Kodi.
After thinking a while on how i could do this, i came to the conclusion that working with "blocks"/"images" for every degree might is/could be, the best chance to achive what im after.
heres a Mockup how the temperature curve (Houerly) could look after its done:
but as u might guess i have some problems to get this to work.
Problem 1:
I did try to use a Grouplists for every houer, but i need a <aligny>bottom</aligny> in any way, which i wasnt abel to achive.
Is there a way with a List, group, or what ever, which alows me to "stack" my "degree-Images" from the bottom to the Top?
Problem 2:
To avoid problems and odd looking of the themperatur curve, i compare against day low temp, to avoid to much blocks and problems with °C / °F
for this i would need something like this:
Code:
IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))
which would alow me, to hide the unused "degree-Images/blocks".
but as far as i can thel from the wiki, "IntegerGreatherThan" alows me only to compare against a number, and not agains an other infolabel.
Does may someone of u got a Idea for a Workaround?
Maybe Code says more as these Words, so:
Here is an attempt: the Code for the First Houer.
PHP Code:
<!-- Temp-bar 1st houer -->
<control type="grouplist">
<left>0</left>
<top>5</top>
<width>45</width>
<height>320</height>
<itemgap>0</itemgap>
<aligny>bottom</aligny>
<orientation>vertical</orientation>
<usecontrolcoords>true</usecontrolcoords>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),36) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),35) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),34) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),33) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),32) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),31) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),30) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),29) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),28) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),27) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),26) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),25) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),24) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),23) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),22) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),21) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),20) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),19) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),18) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),17) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),16) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),15) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),14) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),13) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),12) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),11) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),10) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),09) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),08) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),07) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),06) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),05) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),04) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),03) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),02) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
<control type="image">
<width>45</width>
<height>10</height>
<texture background="true" colordiffuse="FFFFFFFF">common/Base.png</texture>
<aspectratio>stretch</aspectratio>
<visible>IntegerGreaterThan(Window.Property(Hourly.1.Temperature),01) + IntegerGreaterThan(Window.Property(Hourly.1.Temperature),Window.Property(Day0.LowTemp))</visible>
</control>
</control>
The Idea is to work with params at a lator attempt, but for now to see if i can get it to work i did it this way.
Hope u get the Idea.
at the Moment im stuck, so if one might got a idea how i can push away the stones which block the road to get this to work, that would be cool.