Req Conditional Textures - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12) +--- Thread: Req Conditional Textures (/showthread.php?tid=194985) |
Conditional Textures - ZexisStryfe - 2014-05-13 Okay- this may be a ridiculous request, but would it be possible to add support for conditional textures in Image controls for Helix? So many other attributes support conditionals, I think it is kind of crazy textures do not. I also noticed a request was made for this like 6 years ago and it was mentioned it was planned, but to date we haven't seen support for it... figured it couldn't hurt to bring it up again. The more I work on my skin it becomes more and more clear that this would cut down on a crazy amount of skinning code. Basically instead of having to do this- PHP Code: <control type="image" id="100"> We could do this- PHP Code: <control type="image" id="100"> Oh, and I know about fallback and/or variables, but I see this as being a different use case and could definitely be useful. RE: Conditional Textures - jmarshall - 2014-05-13 Does a variable not work? RE: Conditional Textures - Hitcher - 2014-05-13 Variables will do exactly what you want. RE: Conditional Textures - ZexisStryfe - 2014-05-13 You can use variables to do this, but there is overhead associated with variables, particularly if you are doing one-offs. I prefer using variables for things that are used repeatedly (ie- the above instance would be added to every video view). However there are quite a few instances where you only need to do something once and to me it just doesn't make sense to use a variable ONCE (why create 4 lines of code when two lines do the job?). Besides, why have conditionality on attributes at all then? RE: Conditional Textures - Hitcher - 2014-05-13 But using a variable would reduce the checks because it's stops as soon as a condition is met; whereas your code it would be checked twice even if the first condition was met. |