0 votes
by (880 points)
edited by

I am using a macro for buttons to look a certain way, but some buttons need to be different, so would i change them within the passage?

 

Also did i set this right?

<<button "Male">>...<</button>>
<<set $playerGender ="male">>

<<button "Female">>...<</button>>
<<set $playerGender ="female">>

Or would I need to do this?

while True:
    if button_"Male".is_pressed() 
        <<set $playerGender="male">>
		<<goto "part3">>
        break
    elif button_"Female.is_pressed():
         <<set $playerGender="female"
		<<goto "part3">>

 

1 Answer

0 votes
by (159k points)
selected by
 
Best answer

Based on information from both of your examples I believe your <<button>> macros should look like the following...

<<button "Male" "part3">>
	<<set $playerGender = "male">>
<</button>>
<<button "Female" "part3">>
	<<set $playerGender = "female">>
<</button>>

 

Depending on if you want to style both of the above individually or together you have a number of options, but they all generally consist of:

1. Some how mark the button(s) you want to stye, you could use Custom Style to do that..

/* Mark each button with it's own ID. */
@@#male;<<button "Male" "part3">><<set $playerGender = "male">><</button>>@@
@@#female;<<button "Female" "part3">><<set $playerGender = "female">><</button>>@@

/* Mark all of the buttons with the same CSS class. */
@@.gender;<<button "Male" "part3">><<set $playerGender = "male">><</button>>@@
@@.gender;<<button "Female" "part3">><<set $playerGender = "female">><</button>>@@


2. Add CSS to the Story Stylesheet area that target those markings.

/* Style each of button that are marked with an ID. */
#male button {
	color: green;
}
#female button {
	color: orange;
}

/* Style all buttons that are marked with the classname. */
.gender button {
	color: yellow;
}

 

...