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

Messages - zurik

#1
Quote from: abstauber on Thu 01/06/2017 12:38:52
Sure, that is actually not a big deal. First you need to resize the gAction GUI to your game's screen resolution (eg 320x200)
Now you need to copy over this adjusted  AdjustActionBarPosition function to your template and make sure it is called in repeatedly_execute_always

Code: ags

void AdjustActionBarPosition() 
{
  int actionLabelWidth = GetTextWidth(ActionLine.Text, eFontTextOut) + 4;
  int actionLabelHalf = actionLabelWidth / 2;
  int xpos = mouse.x - actionLabelHalf ;
  int ypos = mouse.y - Game.SpriteHeight[mouse.GetModeGraphic(mouse.Mode)] - 4;
  
  if (xpos + actionLabelWidth >= System.ScreenWidth) xpos = System.ScreenWidth - actionLabelWidth;
  else if (xpos < 0) xpos = 0;
  
  if (ypos < 0 ) ypos = 0;
  
  ActionLine.X = xpos;
  ActionLine.Y = ypos;
  ActionLine.Width = actionLabelWidth;
}



This is perfect! Thank you. But is it possible to hide the actionline when starting an action, in an easy way?
"Talk to character" for example is still on the screen (highlighted) when the dialog goes on. And sometimes those texts even overlap each other.

Thank you!
SMF spam blocked by CleanTalk