gms_show_set_constant

Usage: gms_show_set_constant ( name, value )

Description

Sets the value of the window constant provided. name must be one of the following string values:
c_border: The border around the windows and the textboxes.
c_text: The text color.
c_grey_text: The color of faded text.
c_button1: The button color, top of the gradient. Used on buttons and the header.
c_button2: The slightly darker button color, bottom of the gradient. Used on buttons and the header.
c_background1: The background color, the top of the gradient. Used in textboxes and as window background.
c_background2: The slightly darker background, the bottom of the gradient. Used in textboxes and as window background.
c_good_color: The color of success messages.
c_fault_color: The color of the error messages.


f_title: The font used for the headers of the windows. Arial Black, 21, bold by default.
f_text: The normal font. Verdana, 16 by default.
f_small: Used for error messages and the txt_tos. Verdana 10, bold by default.

txt_friends: The header of the friends dialog
txt_achievements: The header of the achievements dialog
txt_login: The login button in the login dialog and the header of the login dialog
txt_username: The username placeholder on the login and register dialogs
txt_guest: The text that appears in front of a username when logging in as a guest (note: this does not actually change what text is appended at the front of a username when logging in, only what is shown in the login window)
txt_password: The placeholder text of the password field in the login and register dialogs
txt_repeat_password: The placeholder text of the second password box on the registration screen.
txt_email: The placeholder of the e-mail textbox on the registration screen.
txt_register: The register button on the login dialog and the header of the register dialog
txt_cancel: The cancel button of the login dialog
txt_tos: The "by using GameMaker Server..." text on the login dialog
txt_statistics: The header of the statistics dialog.
txt_updating_game: The header of the update dialog.
txt_reached: Text shown in the achievements screen when an achievement is reached.
txt_not_reached: Text shown in the achievements screen when an achievement is not reached.
txt_offline: Text shown in the friends dialog when a friend is offline.
txt_online: Text shown in the friends dialog when a friend is online.
txt_registration_complete: Message shown when the registration is successful.

Replies (4)

Last message on 12 Oct 2015

RefresherTowel on 10 Oct 2015, 07:32:56
Hey size, sorry if this is explained somewhere, but I can't seem to find it...What value can be used for the color variables? I've put in:

gms_show_set_constant(c_background1,make_color_rgb(00,00,00));

gms_show_set_constant(c_background1,000000); (trying hex notation here)

gms_show_set_constant(c_background1,c_black);

And then just tried plugging random numbers in, e.g.:

gms_show_set_constant(c_background1,1);

And everything chucked up an error...
Size43 (Administrator) on 10 Oct 2015, 15:26:49
What does the error say?
RefresherTowel on 10 Oct 2015, 19:23:17
############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object obj_login:

Push :: Execution Error - Variable Get 100002.c_background1(100206, -2147483648)
at gml_Object_obj_login_CreateEvent_1 (line 2) - gms_show_set_constant(c_background1,000000);
############################################################################################

I've tried the create event of both obj_login and obj_GMS.
Size43 (Administrator) on 12 Oct 2015, 11:56:53
Not sure why I didn't catch this before, but the constant name will need to be between quotes, like this:

gms_show_set_constant("c_background1",c_black);