Custom Windows help!

Posted by bromange
I made a custom login window, but I don't know how to apply it to my game.

Replies (13)

Last message on 2 May 2015

Size43 (Administrator) on 18 Apr 2015, 11:53:55
gms_show_replace(wt_login, "PASTE YOUR FILE HERE");


Replace wt_login with the window type you're replacing, and paste the entire contents of the file in the PASTE YOUR FILE HERE string.
bromange (Topicstarter) on 29 Apr 2015, 10:12:47
What means 'paste the entire contents of the file'? Do I need to write the directory to the custom windows or to drag and drop the file to the PASTE YOUR FILE HERE string?
bromange (Topicstarter) on 29 Apr 2015, 10:43:33
Or you mean I need to paste text from the file? I am a noob...
Size43 (Administrator) on 30 Apr 2015, 11:08:26
Yes, I literally mean paste the entire contents of the file in that string :)

So it'll look something like this:

gms_show_replace(wt_login, "<constants>
...
...
");
bromange (Topicstarter) on 30 Apr 2015, 16:18:52
Ok! I got it! Thanks a lot :D
bromange (Topicstarter) on 30 Apr 2015, 16:27:45
I did it but now it shows an ERROR message (Unexpected symbol) at this line:"color: @c_text;" and "font: @f_title;". It works if I write an RGB code like "$182850;" but what am I supposed to write here: "font: @f_title;"?
bromange (Topicstarter) on 30 Apr 2015, 16:30:29
Oh, I can create a font myself inside GameMakerStudio. Gonna try it...
bromange (Topicstarter) on 30 Apr 2015, 16:32:38
Yep it worked! Do you know if I can create a colour too? It's easier than playing with RBG
bromange (Topicstarter) on 30 Apr 2015, 16:48:20
My code starts like this:
"
gms_init(GMS)

gms_settings(true, 1.0, obj_player, obj_other_player);
room_goto_next();

gms_show_replace(wt_login,<constants>
</constants>
<styles>
overlay:
{
background: 0;

open:
{
background-alpha: 0.5;
}

close:
{
"
and ends like this:
"
unhover[backgrounds.highlight]>"Cancel"</button>
</multielement>
<label style[tos]></label>
</canvas>
</canvas>
</canvas>
</canvas>
</layout>);
"
I get this:
"
EROOR at line 6 pos 28: Unexpected symbol in expression.

What does it mean? You see something wrong?
bromange (Topicstarter) on 30 Apr 2015, 16:48:43
Sry for the spam...
Size43 (Administrator) on 30 Apr 2015, 16:57:06
Your code is missing the quotation marks around the entire file. The second argument needs to be a string. Make sure you only use one kind of quotation mark (" vs ') in your window file, and use the other quotation marks to surround the entire block of text.

Note that you do not need to create any fonts or change the way the colors are written.
bromange (Topicstarter) on 1 May 2015, 19:28:07
I think I did it correctly but now I got an error for the draw event of GMS object:

___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object GMS:

DoDiv :: Divide by zero
at gml_Script_wle_draw (line 235) - _scale = min((y2 - y1) / _h, (x2 - x1) / _w, 1);
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Script_wle_draw (line 235)
called from - gml_Script_XWindow_totaldraw (line 1) - if(global.__xls_open) wle_draw(global.__xls_window, 1, true)
called from - gml_Script_gms_draw (line 45) - XWindow_totaldraw();
called from - gml_Object_GMS_DrawEvent_1 (line 1) - gms_draw()
Size43 (Administrator) on 2 May 2015, 12:52:20
If you see that error, it's loaded correctly indeed. Would you be able to post a link to a pastebin with the full file or mail me the full file at gamemakerserver@outlook.com?