setMouseCursor consistency
-
@Christoph-Hart thank you, I could do it this way, but I have a ton of controls to nest like this, and editing such a project wouldn’t be very effective in the long run.
Would it be possible to either enable setting the mouse cursor for other components, or to fix whatever is causing the current implementation not to work consistently?
The script I posted in the first post works and the logic seems correct (I guess?) but I need to edit it (as described in the first post) and compile it a couple of times for HISE to register the mouse change properly.
Thank you!
-
@tomekslesicki Is it just buttons that you want to change?
-
@Christoph-Hart yup!
-
@tomekslesicki Alright, I've added a script property to the button to set a standard cursor type.
BTW, you can also change the cursor type using CSS, which is available for all components:
const var laf = Content.createLocalLookAndFeel(); laf.setInlineStyleSheet(" button { cursor: pointer; } label { background: #444; text-align: center; cursor: text; } "); Content.getComponent("Button2").setLocalLookAndFeel(laf); Content.getComponent("Label1").setLocalLookAndFeel(laf);
-
@Christoph-Hart Epic, thank you! Your skills benefit the community <3
-
@Christoph-Hart actually, the script property method works great if the buttons are not nested in panels, but doesn't work when they are. The same applies to the CSS method. Here is a minimal snippet:
HiseSnippet 851.3ocsV0sSaCCE1tPPP2fMj1CPTuBlPnz0zBSno00BLp1.pVYncGx0wkXQhcThCPEZR6QXOR6QYOB6MX63jz1DnCXUZ8hpd9+yG+cNtcCkTVTjLDgKexv.FB+TidCEJ21tDt.0YWDdEiCIQJVnYppVCCHQQLGDFO260JvKMOJ4yudaKhGQPYSTgPmJ4T1G49b0Dsca9Atm29DG1Ib+bda2rCUJZK8jw.dlyvBEPnWPNmcDQ6VICzAjHWD9kFMnuttUelU85aaWaaa6F1MpaMvp1f9a2vtessrq4XWuJsFBuvdNbkLrmhnXQH77sjNC64JuRjVfS4Q79dLsPUTOnxop2W54nOhZsn1tbOmtiZTQHHKcmz1lKss8BiC4N7w5mz9ddhAyIQjuAhKUDdyU.dU+avaJPBmCRymBoUM5QC4ApIVz34IFcDvs4.BbOkGJo9hJsC1nsD7Pn1zmbAa+PPXbDq0vxZCS3q02obY3tJRYdIIzLM1VwJkTT07MliRv4LUaoefT.BqUofWUzYnflMiXfS9x3HV63P.tU1vrRWIWn3hyOfHbxzt9NChETEWJLkhijJ1wh0Vu7MkWp7WKadaSCFLUaZ.FJ87XgS0rlVFdeAtlH1uOKbC3z6EyF6Hz5Kdetvi69jl1ux4nTzQvUGGvxjueBIJqgq4AYHDbUkvBVwHeWFwgj7rBpphRND4GZQetytDEYT5fLCUKfEp35CEdW1kvPcJIaIicYQWnjAI9lcWCG7zhu7HJHQv7Rp8J40TEcMBaf0Ub3nebE2Q4NFL+7xltL94tS1d78aZVnRK9nOlWONGeizb3XgezuYVMMvNf7n5kJEPBgxjqd25.jiupWBbW9Jrt6NSlvNAoSrGQUbQgdcZlAfsUX5TOAJh3pg4W29Or8v5d2d7Xg3pFc4Jp6zwXoofQfA8+.iY6bW1XuACXT0D.Nuw9eYVWv9.k+SxX8E6gDUHWyZOJ1uG7NEkAUW.TgHMiojdVLU1ZDgtGS3jH7a3SlwpZYblwpiLh7IzP4YzzIX8V8ESz.XRj7B3RvSwfr4TFY8gGYNiRKlp6D3ql0.qMqAZOqAVeVCrwrF3VyZfa+vAp+O.uKVI8SGaPnC6tWxJVLdOAAXfIrUze.3Aph1.
Could you please take a look at this? Thank you!
-
I'm giving this a friendly bump.
-
@Christoph-Hart I checked the latest commit, that solves it! Thank you!
-
Dear @Christoph-Hart would it also be possible to add the cursor type property to sliders as well?
-
@Christoph-Hart ? :-)