 |
|
BaselScript |
Beschreibung
Tile = button
Button zeichnen
Nach der Buttonsbetätigung wird bestimmte Anweisungssektion ausgeführt.
Parameter:
x ,y - Bildschirmkoordinaten in Pixel
w - Buttonbreite in Pixel
h - Buttonhöhe in Pixel
size - Fontgröße
style - Fontstyle (normal, italic)
weight - Fontstärke (normal, bold)
color - Textfarbe
bgcolor - Hintergrundfarbe
Beispiel:
scene=1 name="color buttons" colorscheme=__indigo
section init
draw form
end section
form
tile=property width=300 x=20 section=button_pressed
tile=button name=b1 y=100 bgcolor= pink color= white text="pink"
tile=button name=b2 y=200 bgcolor= brown color=white text="brown"
tile=button name=b3 y=300 bgcolor= teal color=white text="teal"
tile=button name=b4 y=400 bgcolor= blue color= white text="blue"
tile=button name=b5 y=500 bgcolor= orange color= black text="orange"
tile=button name=b6 y=600 bgcolor= green color= white text="green"
tile=button name=b7 y=700 bgcolor= lightgreen color= black text="light green"
tile=button name=b8 y=800 bgcolor= indigo color= white text="indigo"
tile=button name=b9 y=900 bgcolor= cyan color= black text="cyan"
tile=button name=b10 y=1000 bgcolor= white color= black text="white"
tile=property_add width=250 x=350
tile=button name=b0 y=100 bgcolor= red color= white text="red"
tile=button name=b14 y=200 bgcolor= lime color= white text="lime"
tile=button name=b15 y=300 bgcolor=lightblue color= blue text="light blue"
tile=button name=b16 y=400 bgcolor= deeporange color= white text="deep orange"
tile=button name=b17 y=500 bgcolor= green color= white text="green"
tile=button name=b12 y=600 bgcolor= gray color= white text="gray"
tile=button name=b13 y=700 bgcolor= purple color= white text="purple"
tile=button name=b18 y=800 bgcolor= amber color= white text="amber"
tile=button name=b18a y=900 bgcolor= black color= white text="black"
tile=button name=b19 y=1000 bgcolor=bluegray color= white text="bluegray"
tile=button name=b20 y=1100 bgcolor=deeppurple color= white text="deeppurple"
end form
section button_pressed
message #_selected_button_text
end section
Nach der Buttonsbetätigung befindet sich der Buttonsname im Feld #_selected_button