Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: MiaWulf on Tue 08/10/2024 18:57:21

Title: [SOLVED] BASS template: How would I make the UI visible at all times?
Post by: MiaWulf on Tue 08/10/2024 18:57:21
Hello,

I know that the point of the BASS template is to emulate Beneath A Steel Sky, but I'm working on something that would benefit from that style of UI and interaction that requires the UI to be shown at the top of the screen at all times.

I'm not the best with AGS script aside from the basics, and looking through TwoClickHandler.asc is not really helping me understand what i should change or delete to keep it visible and interactive at all times.

I'm also trying to move the action bar GUI to be in a box beneath the inventory, and I'm assuming that I can just tweak the left and top variables in the inspector.

Any help in this would be great, as I'm stumped.
Title: Re: BASS template: How would I make the UI visible at all times?
Post by: Khris on Tue 08/10/2024 19:24:42
Open TwoClickHandler.asc and remove lines 235-248.
Then open the gInventoryBar GUI and set PopupStyle to "Normal" and Visible to "True".

Quote from: MiaWulf on Tue 08/10/2024 18:57:21I'm also trying to move the action bar GUI to be in a box beneath the inventory, and I'm assuming that I can just tweak the left and top variables in the inspector.
Yes, exactly :)
Title: Re: BASS template: How would I make the UI visible at all times?
Post by: MiaWulf on Tue 08/10/2024 20:26:42
Quote from: Khris on Tue 08/10/2024 19:24:42Open TwoClickHandler.asc and remove lines 235-248.
Then open the gInventoryBar GUI and set PopupStyle to "Normal" and Visible to "True".

Unfortunately, this didn't work. I commented out the lines of code, but the numbers were a bit off. I'm assuming that this is due to a difference in AGS engine versions, but you can see the code that I commented out below:
(https://i.imgur.com/rvuwDMf.png)

And the changes to gInventoryBar:
(https://i.imgur.com/sL1wpOS.png)
Title: Re: BASS template: How would I make the UI visible at all times?
Post by: Crimson Wizard on Tue 08/10/2024 20:57:49
You need to disable following code:

Code (ags) Select
  // Inventory GUI:
  if (interface_inv == null)
  {
    // pass
  }
  else if (interface_inv.Visible && check_hide_distance(mouse.y))
  {
    interface_inv.Visible = false;
  }
  else if (!IsGamePaused() && !interface_inv.Visible && check_show_distance(mouse.y))
  {
    // make visible when the game is not paused and the cursor is within the popup position
    interface_inv.Visible = true;
  }
Title: [Solved] BASS template: How would I make the UI visible at all times?
Post by: MiaWulf on Tue 08/10/2024 21:07:33
Crimson Wizard's solution worked perfectly. Going to mark this thread as solved, if I can figure out how this forum works
Title: Re: BASS template: How would I make the UI visible at all times?
Post by: Khris on Tue 08/10/2024 22:02:28
I used the BASS template that comes with AGS 3.6.1; I guess I should've posted the lines :-D

Anyway, simply edit your opening post to put [solved] in front of the subject.