var //declare the needed variables (here widgets only)
btnPlayStop, btnRew10, btnPrevTrk, btnFfw10, btnNextTrk : widget
lblPlayStop, lblRew10, lblPrevTrk, lblFfw10, lblNextTrk : widget
lblPosition, fdrPosition : widget
const //declare some values as constants (easier to change if needed)
RGBcolPlay : integer = -13631744 //green
RGBcolStop : integer = -65536 //red
symPlay : string = "4" //PLAY arrow in "webdings" font
symStop : string = "<" //STOP square in "webdings" font
//user function to set the play/stop state of the play/stop button & label
function setPlayStop(playState : string)
if playState == "STOP" then
SetWidgetLabel(btnPlayStop,"PLAY") //set widget caption of underlying button
SetLabelColor(lblPlayStop,RGBcolPlay) //set color of labe
SetWidgetLabel(lblPlayStop,symPlay) //set symbol of label
Elsif playState == "PLAY" then
SetWidgetLabel(btnPlayStop,"STOP")
SetLabelColor(lblPlayStop,RGBcolStop)
SetWidgetLabel(lblPlayStop,symStop)
end
End
//On fiirst start set the button to STOP
Initialization
setPlayStop("STOP")
End
//set the button state according to its value
On WidgetValueChanged (bVal : double) from btnPlayStop
if bVal >0.6 then //is pressed
setPlayStop("PLAY")
else //is not pressed
setPlayStop("STOP")
end
End
If you have any questions about the gig file of the script, ask here.
This post is not about the script but about the display of widgets in GP.
Firstly, thank you @schamass for this very useful gig file.
Problem: The screenshot presented in the post is correct but the display in GP is not the same and I had to modify the widgets and fonts to obtain a correct display.
First image = display of the original gig file in GP
Second image = modified display in GP
Yes, I checked first but I know they were already installed (I have over 1000 fonts installed).
Maybe there is a difference between them though.
I will download and install them.
Is it due to scaling of your desktop display in Windows? This can be different between monitors on the same system and some older fonts don’t scale so well.
The main problem is that now, in GP, the displays are modified in all gig files, as in other graphics applications, so I am going to stick with the recommended default Windows display so as not to spend days modifying all my files in the applications.
Yes, It was easier to modify this single file, which I have already done to demonstrate the problem as shown in my first screenshot of the modified gig file
And above all, the most important thing is to have a good gig file that works… which I have not yet tested