Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Scaleable Response Box  (Read 2539 times)

0 Members and 1 Guest are viewing this topic.

pokinsson

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 1
    • View Profile
Scaleable Response Box
« on: September 01, 2008, 01:30:35 PM »

Hi,
I want to change the whole Background-Image of the Responsebox according to the number of choices while the responses are not filling up the box. It sounds possible - but I have no idea how.

Help?

Anybody?


Please?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Scaleable Response Box
« Reply #1 on: September 02, 2008, 06:55:23 AM »

Well it's not that easy, because the responses can scroll or wrap if they are too long. However, you should be able to resize the response box by querying its window and change its width/height.

var RespWindow = Game.GetResponsesWindow();
Resp.Window.Height = 200;
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Prote1n

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 45
    • View Profile
Re: Scaleable Response Box
« Reply #2 on: May 11, 2010, 03:15:43 PM »

Modifying the height is quiet easy:

var num = Game.GetNumResponses();
var resp= Game.GetResponsesWindow();

var height = num*20; // height of each line
resp.Height = height ;

But not so easy for the width
Logged
 

Page created in 0.06 seconds with 23 queries.