how to change the buttons style?

0 favourites
  • 15 posts
From the Asset Store
Single Track kit that includes wav files for the Beat, Lead, Sub and the MP3 loop.
  • hi, i read a lot of post but i can't find how to change the buttons style. color, style, font etc etc.

    thank you all

  • Their appearance is precisely why I don't use the button object much. I just use a sprite (or sometimes a sprite + text object). You can create different animations for the up/down/over states if you need them, and have buttons that maintain the style of your game.

  • so you use sprite and you put images in the sprite?

    thank you

  • hmm ok the idea i do it is : i put sprite with all buttons i want like pause,resume , levels,... these stuffs doesn't need text they need shapes for that so in 1 sprite i have about 8-10 frames so put them with animation speed 0 and i put them on screen and choose the frame i want ,

    so in event if mouse click and frame = 1 -->> pause game or whatever... and so on with all frames if you want create many buttons in screen like you want to create 3 buttons with i click pause you have to make 3 different sprites or there is another way but i think its harder to understand on the future ^^

    good luck on buttons :P

  • You can customise the Button object using the "Set CSS style" action. These use the same rules as CSS. The default (set "color" to "red") makes the button text red, for example.

  • Ashley thank you. where i can find css property? is there a manual in the main site? or are general property?

  • It's an action on the button object. Go to your event sheet and add a new action:

    Every Tick:
    -> Set CSS Style
  • ok but, what are the css property i can change?

  • Text properties are listed on W3Schools:

    http://www.w3schools.com/css/css_text.asp

  • Nimtrix thank you

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • hi, i read a lot of post but i can't find how to change the buttons style. color, style, font etc etc.

    thank you all

    Hi! I'm sure you've figured it our by now, but you should take a look here

    scirra.com/forum/image-buttons-and-clickable-images_topic53914.html

    as this thread describes how to make sprites clickable (like buttons) using the mouse object. That way you can make your buttons as crazy as you want in Photoshop, Gimp, whatever, and import them into your game, rather than have to use CSS.

    Hope this helps someone!

  • It's an action on the button object. Go to your event sheet and add a new action:

    Every Tick:
    -> Set CSS Style[/code:2nlfk9v1]
    

    Hello. I have the same problem here. I can how to set Css style for buttons, but I don't know what should trigger it. I use "On loading finished" but the style gone when I resize the windows. As you mentioned, I can put it in Every tick. But won't that take too much unnecessary resource? Shouldn't there be some place to just set it once and never change?

    Thanks!

  • So this explains how I can type each property by hand (one by one) into an action, but how about if I want my button to use info from a previously created style.css file that I have?

    I've set up my ID in the button properties, I have my style.css in my Files folder in Construct 3 but when I run the game nothing gets changed. I'm not surprised though because I don't know where/how to tell the button to use the attached style sheet. Anyone know?

  • Grimmy

    Resurrecting such an ancient C2 thread for a C3 question probably not likely to get a response.

    Wouldn't it make more sense asking this in the C3 section of the forum?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)