Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMEdit

A high-end code editor for all things GameMaker · By YellowAfterlife

Theming oddity

A topic by baku created Oct 31, 2018 Views: 317 Replies: 3
Viewing posts 1 to 3
(1 edit)

While trying to replicate my GMS2 colour scheme in GMEdit, I noticed the following words, which all use the Constants colour in GMS2, instead seem to be lumped into the Keyword styling in GMEdit (.ace_keyword):

self
other
all
noone
global

Whether they should technically be categorised as keywords or not (probably should), it seems a little silly to not have complete parity with GMS2's theming ¯\_(ツ)_/¯

Edit: It also seems to me like extensions' functions use the script styling, instead of .ace_extfunction which I would've assumed is for extension functions?

Developer (1 edit)
There's no single definitive way of handling this, 1.4 did highlight them as keywords:

I think it makes more sense this way - while all/noone as of yet remain magic numbers for instance handling operations, self/other/global have been special case structures for a very long time now - trying to do "v = self;" will compile as "v = self.id;", and you can no longer do "v = global;" at all, as it's no instance.

I did find it odd that even the GMS2 docs refer to self, other, all and noone as "keywords", but then they use the Constants colour and are called "constants" in the autocomplete, so it might just be a mistake in GMS2 or something. Still, since there seems to be a disagreement between 1.4 and 2, it might be nice to have it as a preference, or even just change it from keyword to constant depending on whether the open project is 1.4 or GMS2.

But eh, don't worry about it if it's too much work. I did manage to dig a little deeper into the GMEdit files and change global from the keyword styling to the constant one, as that was my biggest annoyance. I can probably deal with the others being keywords

Also, did you see the edit I did to the first post, about extension functions?

Developer

Oh yeah, on extension functions - it's because if GMEdit doesn't index the extension files, it can't do local variable highlighting and syntax extensions in them, but if it does, it auto-detects extension scripts as actual scripts due to #define lines. I've not yet implemented the abiliity to attach metadata to files so that it'd know if to do this or that or not.