Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: scrolling through responses with mouse wheel.  (Read 5044 times)

0 Members and 1 Guest are viewing this topic.

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
scrolling through responses with mouse wheel.
« on: January 14, 2008, 01:03:54 PM »

hello again ..
i am searching for a way to add mouse wheel support for the responsebox.. but cant find the rights scripts/place for this ...
where do i have to add such a feature ?
and is mouse wheel supported in wme ?

greets
stucki
 

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: scrolling through responses with mouse wheel.
« Reply #1 on: January 14, 2008, 03:40:40 PM »

there is a couple of events:

on "MouseWheelUp" and on "MouseWheelDown" which tracks the motion accordingly. You can attach them for example to your responsebox window.

Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: scrolling through responses with mouse wheel.
« Reply #2 on: January 14, 2008, 05:45:16 PM »

thanks for the events.

i found the button prev and next in responses.def but there are no scripts attached to them.
So where exactly is defined what these buttons are doing ?

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: scrolling through responses with mouse wheel.
« Reply #3 on: January 14, 2008, 06:06:06 PM »

Nowhere, it's handled by the engine automatically.
You can press them programatically, though, something like this (in window's script):

var DownButton = this.GetControl("down");
DownButton.Press();
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: scrolling through responses with mouse wheel.
« Reply #4 on: January 14, 2008, 06:41:53 PM »

thank you very much ,i will try this ...

another thing.
i have a dialogue

first function dialog1 calls the function dialog2.
if i stop the loop in function dialog2 i get back to function dialog1.
but how can i close the complete dialogue from function dialogue2 ?

best regards
stucki



Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: scrolling through responses with mouse wheel.
« Reply #5 on: January 14, 2008, 06:52:38 PM »

so i have added a script "responses" to the response box window:

#include "scripts\base.inc"

var DownButton = this.GetControl("prev");
var UpButton = this.GetControl("next");

on "MouseWheelUp"
   {
   DownButton.Press();
   }
   
on "MouseWheelDown"
   {
   UpButton.Press();
   }

but it just does not work ...

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: scrolling through responses with mouse wheel.
« Reply #6 on: January 14, 2008, 10:06:02 PM »

You might need to handle the mouse wheel events in game.script, and redirect them to the response window.
I'm thinking something like this:

Code: WME Script
  1. on "MouseWheelUp"
  2. {
  3.   var RespWin = Game.GetResponsesWindow();
  4.   if(RespWin != null && RespWin.Visible) RespWin.ApplyEvent("MouseWheelUp");
  5. }
  6.  

Untested, but it might actually work ;)

Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Stucki

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Posts: 325
  • I'm a llama!
    • View Profile
    • Schach-Welten
Re: scrolling through responses with mouse wheel.
« Reply #7 on: January 15, 2008, 12:09:10 AM »

yes you are right it actually works !  O0 ::rock O0

the only thing that worrys me a little bit is when my response window is active ( 5 responses in a .ttf-font ) my framerate sinks from 200 to 150 .. should this be ?

and have you read my dialogue problem ?

i have a dialogue

first function "dialog1" calls the function "dialog2".
if i break the loop in function "dialog2" i get back to function "dialog1".
but how can i close the complete dialogue from function "dialogue2" ?

stucki

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: scrolling through responses with mouse wheel.
« Reply #8 on: January 16, 2008, 03:28:48 PM »

Quote
first function "dialog1" calls the function "dialog2".
if i break the loop in function "dialog2" i get back to function "dialog1".
but how can i close the complete dialogue from function "dialogue2" ?
Simply make your nested "dialog2" function return a logical value. dialog1 will check the return value of dialog2, and if it's true, it will end the main dialogue loop.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.023 seconds with 21 queries.