Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: Aegisrox on November 07, 2013, 09:38:02 am

Title: [XP] Chat Mouse Click Activation
Post by: Aegisrox on November 07, 2013, 09:38:02 am
Chat Mouse Click Activation
Authors: Wizered67, Aegisrox
Version: 1.0
Type: Mouse Script
Key Term: RMX-OS Plugin



Introduction

This scripts allow to activate the chat when you click on the chat line input, such as alternative to press the key F6.


Features




Screenshots

No Screenshots.  Only click on the text input of the chat of RMX!  What can I say?


Demo

No Demo


Script

Requires Mouse Controller of Blizzard in order to work.

class Scene_Map
   CHATBOX_X = 0
   CHATBOX_Y = RMXOS::Data::SCREEN_HEIGHT - (RMXOS::Options::CHATBOX_LINES * RMXOS::Data::ChatFontHeight) - RMXOS::Data::ChatFontHeight
   CHATBOX_WIDTH = RMXOS::Options::CHATBOX_WIDTH
   CHATBOX_HEIGHT = (RMXOS::Options::CHATBOX_LINES * RMXOS::Data::ChatFontHeight)
   alias update_chatbox update
   def update
   if Input.trigger?(Input::Key['Mouse Left'])
       if $mouse.x >= CHATBOX_X && $mouse.x <= CHATBOX_X + CHATBOX_WIDTH && $mouse.y >= CHATBOX_Y && $mouse.y <= CHATBOX_Y + CHATBOX_HEIGHT
           $game_temp.chat_active = true
       else
           $game_temp.chat_active = false
       end
   end

   update_chatbox
   end
end




Instructions

Just create a new script a put below de Blizzard Mouse controller



Compatibility

I don't know of any scripts this wouldn't be compatible with. But i tried with others mouse scripts and works great.


Credits and Thanks





Author's Notes
Enjoy it ;).
Title: Re: [XP] Chat Mouse Click Activation
Post by: ForeverZer0 on November 07, 2013, 10:41:36 am
Nice work.  :)
If you could fix the "Key Term" to one of the terms specified here (http://forum.chaos-project.com/index.php/topic,17.0.html), we can move it to the database. 
Title: Re: [XP] Chat Mouse Click Activation
Post by: Aegisrox on November 07, 2013, 10:57:21 am
Thanks! ForeverZer0

I Just changed the key term! ;)

Regards

Aegis
Title: Re: [XP] Chat Mouse Click Activation
Post by: chaucer on November 18, 2013, 04:17:52 am
nice script man ^^ It's pretty neat but, there's a small problem. When the chat window is invisible, if you click where it should be it will activate the box without making it visible, and your buttons wont work. You can simply click anywhere the box isnt to make it inactive but, I changed your script a little so the chat doesnt activate when chatbox is hidden.

Spoiler: ShowHide
class Scene_Map
    CHATBOX_X = 0
    CHATBOX_Y = RMXOS::Data::SCREEN_HEIGHT - (RMXOS::Options::CHATBOX_LINES * RMXOS::Data::ChatFontHeight) - RMXOS::Data::ChatFontHeight
    CHATBOX_WIDTH = RMXOS::Options::CHATBOX_WIDTH
    CHATBOX_HEIGHT = (RMXOS::Options::CHATBOX_LINES * RMXOS::Data::ChatFontHeight)
    alias update_chatbox update
    def update
    if Input.trigger?(Input::Key['Mouse Left'])
      if !$game_temp.chat_visible
        elsif $mouse.x >= CHATBOX_X && $mouse.x <= CHATBOX_X + CHATBOX_WIDTH && $mouse.y >= CHATBOX_Y && $mouse.y <= CHATBOX_Y + CHATBOX_HEIGHT
            $game_temp.chat_active = true
          else
            $game_temp.chat_active = false
          end
        end

    update_chatbox
    end
end
Title: Re: [XP] Chat Mouse Click Activation
Post by: Wizered67 on November 18, 2013, 10:15:48 am
Thanks Chaucer. I messaged Aegisrox about that, but he never wrote me back.