Customize Menu Bar

Started by Zany, Mon 09/10/2017 10:24:17

Previous topic - Next topic

Zany

Hi this is my very first post and clearly it's a beginner posting since it's in the beginners section lolz. In any case I couldn't find much insight on editing and customising the menu bar above my game. I've implemented the mouse action which changes on it a specific hotspot and I am only using a single cursor sprite for the user navigation.

I would really like to remove the unnecessary modes in the menu and have it display just the "save","settings" and "briefcase" icon. I'd also like to change those images to more colourful sprites. Could someone please guide me on where, what and how I should be editing code.

Thank You

Khris

You need to edit the GUI itself. Open it via the project tree, it's called gIconbar. In there you can remove the buttons.

Zany

Thank You, Your advise and code has always been very helpful

Zany

I wasn't sure to post this as a new topic but since this is still relevant to customising the icon bar I thought I'd just add it hear.

So basically I've edited the icon bar's look and position however I would like to set the icon bar visibility according to when mouse moves to right side of screen adventure or hovers over icon bar if possible. I'm assuming that this code would also go in the execute_repeatedly section?

Khris

Yes; you would need something like this:

Code: ags
  // inside rep_exe
  if (mouse.x > System.ViewportWidth - 10 && !gIconbar.Visible) gIconbar.Visible = true;
  else if (mouse.x < System.ViewportWidth - gIconbar.Width && gIconbar.Visible) gIconbar.Visible = false;

Zany

So that brings up the iconbar when I hover to the top edge of the page.
It returns my modified cursor if I hover below the iconbar but when I go left of the iconbar the original pointed cursor remains constant.

SMF spam blocked by CleanTalk