img



img

getResolution


By: _ForgeUser4498566
Addon | img 2,640




Description

___________________________________________________________________________________________________________________________

Description

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.

 

  • 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.

 

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.

 

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. 

Debug

Here is with debugging enabled:




About Project

Created: September 28th 2023

Updated: September 28th 2023

Project ID: 37219

License: All Rights Reserved

__________________________________________

Game Versions:

1.01.03

1.01.03

1.01.03

1.01.03

1.01.03

__________________________________________

Flavors:

WoW Retail

__________________________________________

Categories

Companions

Battle

__________________________________________

Main File

_ForgeUser4498566_getResolution.zip
  • Release
  • September 28th 2023

    __________________________________________

    Recent File

    _ForgeUser4498566_getResolution.zip
  • Release
  • September 28th 2023

    __________________________________________

    Members

    img
    _ForgeUser4498566
    Owner

    __________________________________________

    Report