Author Topic: [XP] Chat Mouse Click Activation  (Read 2757 times)

Offline Aegisrox

  • Transcended Spirit
  • ***
  • Posts: 167
  • LV: 6
  • Gender: Male
  • Looking for inner peace, together with all :3
    • View Profile
    • Pokemon Remexos
[XP] Chat Mouse Click Activation
« on: November 07, 2013, 04:38:02 PM »
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

  • Press inside the chat box input line to activate the chat
  • Press outside of the chat box to desactivate

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.

Code: [Select]
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

  • Wizered67 for doing
  • Aegisrox for setting constants


Author's Notes
Enjoy it ;).
« Last Edit: November 07, 2013, 05:55:35 PM by Aegisrox »
Crushing girls in the vanishing point......

Offline ForeverZer0

  • CP's Pedophile
  • Global Moderator
  • Guardian of Chaos
  • ****
  • Posts: 3255
  • LV: 298
  • Gender: Male
  • Remember you are unique, just like everyone else.
    • View Profile
Re: [XP] Chat Mouse Click Activation
« Reply #1 on: November 07, 2013, 05:41:36 PM »
Nice work.  :)
If you could fix the "Key Term" to one of the terms specified here, we can move it to the database. 
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Offline Aegisrox

  • Transcended Spirit
  • ***
  • Posts: 167
  • LV: 6
  • Gender: Male
  • Looking for inner peace, together with all :3
    • View Profile
    • Pokemon Remexos
Re: [XP] Chat Mouse Click Activation
« Reply #2 on: November 07, 2013, 05:57:21 PM »
Thanks! ForeverZer0

I Just changed the key term! ;)

Regards

Aegis
Crushing girls in the vanishing point......

Offline chaucer

  • Transcended Spirit
  • ***
  • Posts: 154
  • LV: 14
  • Gender: Male
    • View Profile
Re: [XP] Chat Mouse Click Activation
« Reply #3 on: November 18, 2013, 11: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.

(click to show/hide)

Offline Wizered67

  • Astral Trancist
  • *****
  • Posts: 512
  • LV: 16
    • View Profile
Re: [XP] Chat Mouse Click Activation
« Reply #4 on: November 18, 2013, 05:15:48 PM »
Thanks Chaucer. I messaged Aegisrox about that, but he never wrote me back.