Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Panels in WME  (Read 2814 times)

0 Members and 1 Guest are viewing this topic.

Xing

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 1
    • View Profile
Panels in WME
« on: May 28, 2013, 05:25:47 PM »

Hi guys.
I'm new to wintermute engine, and I have a problem. Is it possible to add another panel (like inventory one) on the bottom of the screen, where only dialogues, portraits and responces will be visible? I mean something like this:
http://gamingbolt.com/wp-content/uploads/2011/07/Captain_Morgane_Flat_Top_Hill.jpg

I want to make this panel visible only during interaction with other characters. It doesn't to be transparent, but it would be nice it were possible.
Logged

ciberspace

  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 116
    • View Profile
    • Tele Juego
Re: Panels in WME
« Reply #1 on: May 28, 2013, 06:12:38 PM »

Response box
The response box represents the response selection window for your game. It defines the placement of the responses, some controls (such as the scrolling buttons) and the design of the background of the response selection.

Reponse box is defined in a simple text file which as a structure similar to this:

RESPONSE_BOX
{
  FONT = "fonts\outline_white.font"
  FONT_HOVER = "fonts\outline_red.font"
  CURSOR = "path\response_cursor.png"
  HORIZONTAL = FALSE
  TEXT_ALIGN = "left"
  VERTICAL_ALIGN = "bottom"
  SPACING = 5

  AREA {40, 0, 800, 170}


  WINDOW
  {   
    X = 0
    Y = 420
    WIDTH = 800
    HEIGHT = 180

    BUTTON
    {
      TEMPLATE = "ui_elements\template\but.button"
      IMAGE = "ui_elements\arrow_up.bmp"
      TEXT = ""
      NAME = "prev"

      X = 0
      Y = 0
      WIDTH = 30
      HEIGHT = 30
    }

    BUTTON{
      TEMPLATE = "ui_elements\template\but.button"
      IMAGE = "ui_elements\arrow_down.bmp"
      TEXT = ""
      NAME = "next"

      X = 0
      Y = 150
      WIDTH = 30
      HEIGHT = 30
    }
  }
}

 

As you see, the first part (purple) defines some response-box specific attributes, while the second part (gray) defines the design. The second part is a casual window, as described in the Windows and controls chapter. The response-box window can contain any GUI elements you want, please see the mentioned chapter for more details about GUI definitions.

Let's take a closer look at the first section. It contains the following attributes:

FONT / FONT_HOVER - the fonts setting for the textual responses
CURSOR - the image to be used as a cursor for iconic responses
SPACING - the space between two responses
HORIZONTAL - specifies if the responses are ordered horizontally
TEXT_ALIGN - specifies the alignment of textual response lines; it can be either "left", "right" or "center"; the default value is "left"
VERTICAL_ALIGN - specifies the vertical alignment of responses within the response area (it has no effect on horizontally ordered items); it can be one of the following values: "top", "center" or "bottom"; the default value is "bottom"
AREA - defines a rectangle within the background window, where the responses will be displayed. The four numbers represent the X, Y coordinates of the upper left and bottom right points of the rectangle. Note that the area is defined relative to the responses window, NOT relative to screen.
Based on this setting, WME will automatically populate the defined rectangle with responses.

 

As for the second part, i.e. the window definitions, it's a normal window definition with a few exceptions. If you name some of the buttons "next" or "prev", WME will use them automatically for the response scrolling.
« Last Edit: May 28, 2013, 06:14:22 PM by ciberspace »
Logged

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Panels in WME
« Reply #2 on: May 29, 2013, 08:23:27 PM »

What an excellent response ciberspace   ::thumbup

The following forum thread might also prove useful: http://forum.dead-code.org/index.php?topic=3033.0 Metamorphium shows us how he implemented dialogue panel in Ghost in the Sheet
http://www.ghostinthesheet.com/dialog.jpg.
Logged
 

Page created in 0.16 seconds with 23 queries.