How to set a "Category"

Openplanet is an alternative scripting platform for the ManiaPlanet creative community.

Moderators: Miss, NADEO

Post Reply
User avatar
Derfuhr
Posts: 65
Joined: 18 May 2017, 17:08
Location: DE->NRW

How to set a "Category"

Post by Derfuhr »

Hi,

i create an OpenPlanet addon for another Player. I do not see what i have to do, to set a category.

Image

What i have to do?



edit:

How to activate the CloseButton in the TitleBar of a UI Window?
User avatar
Miss
Posts: 2155
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: How to set a "Category"

Post by Miss »

For the category, you have to add this line somewhere at the top:

Code: Select all

#category "Something"
For a closable interface, you have to pass a boolean reference to UI::Begin. So, something like this:

Code: Select all

bool windowIsVisible = false;

void Render()
{
  if (!windowIsVisible) {
    return;
  }
  
  UI::Begin("My window", windowIsVisible);
  // ...
  UI::End();
}
3080 RTX, Ryzen 3700X, 32GB RAM, Windows 11
Forum moderator, opinions are my own. :thx:
Check out Image openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
User avatar
Derfuhr
Posts: 65
Joined: 18 May 2017, 17:08
Location: DE->NRW

Re: How to set a "Category"

Post by Derfuhr »

Thank you Miss, that's it. :thumbsup:

I have to say "Good work" your Openplanet.

The only thing I miss are images(bitmaps). it would be really cool if you would implement image drawing functions. So draw image and image rotation.
User avatar
Miss
Posts: 2155
Joined: 05 Jan 2016, 11:34
Location: The Netherlands
Contact:

Re: How to set a "Category"

Post by Miss »

Hm, I thought I had that in the API, but I guess not. I'll make a note of it, thanks! :thumbsup:
3080 RTX, Ryzen 3700X, 32GB RAM, Windows 11
Forum moderator, opinions are my own. :thx:
Check out Image openplanet, the alternative ManiaPlanet & Turbo scripting platform! (Openplanet subforum)
I also stream and tweet.
User avatar
Derfuhr
Posts: 65
Joined: 18 May 2017, 17:08
Location: DE->NRW

Re: How to set a "Category"

Post by Derfuhr »

That's would be really nice! :thx:

I have just realized that with openplanet when the real 2-d overlay hidden in the game is a completely own overlay with OP can do. That's really cool. I like it more than on a 2nd monitor. Enough space on the 2nd monitor for the records. If you've done that with the images, I'll start immediately. If I now imagine that the program for the Rocords then communicates with OP, OMG, fantastic possibilities.
Post Reply

Return to “Openplanet”

Who is online

Users browsing this forum: No registered users and 0 guests