getResolution

getResolution v1.20

About

This library obtains the player's resolution, UI resolution, and scale value with a mouseclick.

Changelog

New from v1.10

  • Works better on battle.net (No longer have to ask the player to hold while clicking)
  • Screen flips due to the validation trigger removed
  • Able to check if the player's resolution has changed with the use of a dialog
  • Incorrect numbers clicking while moving the mouse fixed

New from v1.00

  • Will now work with ANY resolution
  • Retrieves the player's UI screen size (Essential for creating dialogs)
  • Now works in Windowed Mode
  • Nearly half the size of v1.00 (5.30KB compressed)
  • Ability to check resolution to ensure its validity
  • Able to initiate the system for individual players
  • No longer required to enter Camera bounds

How to use

There are two functions that can be used:

  • Player Resolution, UI Resolution, Scale Value

Use this function to initiate the system and obtain the selected player's resolution information.

InitializationGrammar

  • Check Resolution

Use this function to check if the player's resolution has changed. It will display an invisible dialog button at the location of their mouse relative to the UI resolution of what it has stored. If the mouse does not enter the dialog then the resolution has been changed. The system will then be reinitialized for that player.

Check Resolution Grammar

Creating Dialogs/Screen objects

After the system has been initiated for the selected player, the information obtained will be stored in three variables:

  • getResolution_PlayerResolution[15][1]
  • getResolution_PlayerUIResolution[15][1]
  • getResolution_PlayerScaleValue[15]

The first dimension of the arrays are the player's number (0-15). The second dimension of the resolution variables are the Width(0) and Height(1).

When creating dialog or screen objects, you use the PlayerUIResolution variable. You multiply this variable from a range of 0 to 1. 1 being 100%. Here is an example dialog that takes up 25% of the player's screen.

Example Dialog Setup

If the player's UI resolution were 1600x1200, then the above example dialog would translate to:

Set size of ExampleDialog to ((1600 * .5),(1200 * .5))

which is 25%.

With this, you can setup dialogs to be exact sizes and at exact positions on the player's screen. Example Dialogs in-game

Debug

Here is with debugging enabled:

Debug

Download

Library

http://www.sc2mapster.com/media/files/543/832/getResolutionv120_GUI.SC2Lib

Map

http://www.sc2mapster.com/media/files/543/831/getResolution_v1.20_GUI.SC2Map

Download

File Name Status Version Downloads Date
getResolution v1.20 Library GUI R - 702 26/09/2011
getResolution
getResolution

Dear youtuber!
Have you a channel youtube and want to bring your Video to quality visitors?
Do you want your video to appear on our website?
Do you want to become partner with us?
Just 3 steps to become our partner:
Step 1: Make video review for mods, addons, plugins, ... which you like
Step 2: Upload this video to youtube and our link to your video description
Step 3: Send the youtube video link via message to http://fb.com/9lifehack or leave a comment in the post. We will add your video in the our post, it will help you have more view.
JOIN to get more youtube view with us!!!!

Related Posts

Smarty Productivity Happiness

9LifeHack.com - make things smart