Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Innsmouthian

#1
Hello again adventure folks!

I've tried to implement a "floating" GUI to display the names of objects and characters, for what I've used the following code by Khris from this thread: https://www.adventuregamestudio.co.uk/forums/index.php?topic=45730.0

The code is the following, under the function repeatedly_execute section in the Global Script:

Code: ags

  int x = mouse.x + 3;
  int y = mouse.y + 5;
  InventoryItem*ii = InventoryItem.GetAtScreenXY(mouse.x, mouse.y);
  Label*lbl = gLocationName.Controls[0].AsLabel;
  String text;
  if (ii) text = ii.Name;
  else text = Game.GetLocationName(mouse.x, mouse.y);
  if (x > 250) x = (x - 6) - GetTextWidth(text, lbl.Font);
  gLocationName.SetPosition(x, y);


For now, it has worked, but I find a little annoying problem: names display normally on the left side of the cursor, but happen to "flash" randomly on the right side, for less than a second. I'd like to know if it's possible to "block" the names on a fixed position relative to the cursor, so this flashing stops happening.

Thanks to Khris for the original code, and to everyone in advance for any tip! :)
#2
Hello everybody!

First of all, I want to thank Chris Jones for creating and keeping AGS, such a wonderful invention. And secondly, thanks to this community for providing support and tips on projects.

I'd like to clarify that, although I've surfed this forum (also, of course, read the manual), I haven't found an answer to my question.

I'm using AGS 3.4.1

The thing is that I want to implement a show/hide "popup" GUI that contains both action buttons and the inventory (kind of a SCUMM-type). The GUI is intended to be placed in the bottom left corner. But I'm facing two problems:

- The first one is that I'm not able to even get the basic version of my purpose. Whenever I try to use the option "When mouse moves to top of screen", setting the "PopupYPos" in 1060 (the project resolution is 1920x1080), the only thing I get is a stuck GUI showing always and avoiding to interact with the rest of the game (the GUI itself works, however).

- The second problem, which I don't know if it's possible to resolve, is that I'd like to make the GUI hide in the bottom but not completely: 1/3 of it should be permanently visible, and once the mouse is over this area, the complete GUI would show up (pop up). I've found nothing in this regard in the manual nor in the forums.

This is a preview of the GUI -which is not yet definitive- showing the part that should keep visible on the bottom over the discontinued line.



Solvable or not, thanks in advance for any help or tip! :smiley:
SMF spam blocked by CleanTalk