Author Topic: Scene Window Opacity  (Read 672 times)

0 Members and 1 Guest are viewing this topic.
modern algebra Male
*
Rep: +330/-113
Offline Offline
Level 79 (01%)
Scene Window Opacity
« on: February 10, 2010, 03:17:55 PM »

  • Scene Window Opacity
    Version: 1.0
    Author: modern algebra
    Date: January 29, 2010

    Version History


    • <Version 1.0> 01.29.2010 - Original Release

    Description


    This is a simple and perhaps a little useless script that allows you to easily alter the transparency of all the windows in any given scene. It's only really useful if you want, for instance, all of the menu scenes to be a little more transparent so you can see more of the map.

    Features

    • Can set the opacity of the windows in any scene you want
    • Easy to configure

    Screenshots



    Instructions

    Place this script into its own slot in the Script Editor (F11) below the default scripts but still above Main. If you want it to apply to any custom scripts you've added to your game, it should also be put below them.

    It's not very customizable, but it is easy to use. All you need to do is set up the constants below to specify what you want the opacity of the back of the window and the window altogether to be in all of the scenes that you want this script to apply. Then, you merely need to add the name of the scene to the WT_APPLICABLE_SCENES array. See line 33, 35, and 39.

    Script


    Code: [Select]
    #==============================================================================
    #    Scene Window Opacity
    #    Version: 1.0
    #    Author: modern algebra (rmrk.net)
    #    Date: January 29, 2010
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Description:
    #
    #    This is a simple and perhaps a little useless script that allows you to
    #   easily alter the transparency of all the windows in any given scene. It's
    #   only really useful if you want, for instance, all of the menu scenes to be
    #   a little more transparent so you can see more of the map.
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Instructions:
    #
    #    Place this script into its own slot in the Script Editor (F11) below the
    #   default scripts but still above Main. If you want it to apply to any custom
    #   scripts you've added to your game, it should also be put below them.
    #
    #    It's not very customizable, but it is easy to use. All you need to do is
    #   set up the constants below to specify what you want the opacity of the back
    #   of the window and the window altogether to be in all of the scenes that you
    #   want this script to apply. Then, you merely need to add the name of the
    #   scene to the WT_APPLICABLE_SCENES array. See line 33, 35, and 39.
    #==============================================================================

    #==============================================================================
    #  CONSTANTS
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Change this to whatever you want the opacity of the windowskin (excluding the
    # border) to be. It can be any value from 0-255, where 0 is fully transparent
    # and 255 is fully opaque
    WT_ALTERED_BACK_OPACITY = 0
    #  The default opacity of the entire windowskin, including the border.
    WT_ALTERED_WINDOW_OPACITY = 255
    #  This is an array of the scenes to which this script applies. To have the
    # opacities of the windows of a scene be affected by this script, merely
    # include the class name of the scene in the following array.
    WT_APPLICABLE_SCENES = [Scene_Menu, Scene_Item, Scene_Skill, Scene_Equip,
      Scene_Status]
      
    #==============================================================================
    # ** Window_Base
    #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    #  Summary of Changes:
    #    aliased method - initialize
    #==============================================================================

    class Window_Base
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      # * Object Initialization
      #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      alias molgba_wintransprncy_inze_7jf2 initialize
      def initialize (*args)
        molgba_wintransprncy_inze_7jf2 (*args)
        if WT_APPLICABLE_SCENES.include? ($scene.class)
          self.opacity = WT_ALTERED_WINDOW_OPACITY
          self.back_opacity = WT_ALTERED_BACK_OPACITY
        end
      end
    end

    Credit


    • modern algebra

    Support


    Please post in this topic at rmrk.net for assistance. Do not PM me, as it is more beneficial to other people coming to this thread to see the problems others have had and the solutions.

    Known Compatibility Issues

    No currently known compatibility problems. If you do encounter any, please try putting this script below the other script in order and see if that fixes the problem before requesting assistance.

    Author's Notes


    Probably not a very useful script to very many people, but I remember using a script like this for RMXP and so I figure if I could have once found a use for it, someone else might be able to as well. It is a nice and easy way to alter the visual layout of the menu scenes.


    Creative Commons License
    This work by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
    « Last Edit: February 11, 2010, 04:57:03 PM by Modern Algebra »

     

    hi

    RMRK.net Theme Super Ultra Mega Beta

    Follow RMRK on Twitter Ask RMRK Questions on Formspring Get RMRK Updates via Windows Live

    Page created in 0.13 seconds with 20 queries.