Resource:Dgs

From Multi Theft Auto: Wiki
Revision as of 19:05, 2 February 2018 by Skully (talk | contribs) (Adjusted grammar and fixed english.)

DGS Network Monitor

This resource is designed to allow you to create directX GUI's as an alternative to the original MTA:SA GUI functions.


Full Name: Thisdp's DirectX Graphical User Interface System (DxGUI Lib)

Author: thisdp

State: OpenSource (WIP)

GitHub Source: https://github.com/thisdp/dgs/tree/master


Features

DGSS.png


How does it work?

  • DGS is just like the original gui system that is based on element system. I use a simple way that can make it easier to understand.
  • DGS elements are rendered in "onClientRender". There is two or more tables store DGS elements. When "onClientRender" is called, "for" loop will loop and calculate every DGS element.


What's different?

  • This resource is based on dx* functions. It allows us to edit our gui and make it in customlization.


Update System

  • It have an update system that can keep your DGS latest.
  • When a newer version has been pushed, it will detected and notice you to update dgs.
  • Execute command "updatedgs" to check the least version and update your DGS.
  • You can check the version of DGS by command "dgsver"


Update Logs


You Should Know

  • Scroll Pane/Grid List/Combo Box/Memo/Edit use Render Target, which means if you don't have enough video memory, Render Target won't be created.


Example DGS Cmd

Examples scripts


Auto Completion


Debug

  • You can enter the debug mode by executing the command "debugdgs".


DGS Type

Hurt World GUI Example
  • Button (dgs-dxbutton): A button.
  • Command (dgs-dxcmd): A command just like windows.
  • Ellipse Detect Area (dgs-dxeda): An oval detect area.
  • Edit (dgs-dxedit): An edit.
  • Memo (dgs-dxmemo): A memo.
  • Gridlist (dgs-dxgridlist): A grid list.
  • Image (dgs-dximage): A dynamic image.
  • Label (dgs-dxlabel): A text label.
  • Ellipse Detect Area (EDA)
  • ScrollBar (dgs-dxscrollbar): A scroll bar.
  • ScrollPane (dgs-dxscrollpane): A scroll pane.
  • Tab Panel (dgs-dxtabpanel + dgs-dxtab) : A tab panel.
  • Window (dgs-dxwindow): A window.
  • Progress Bar (dgs-dxprogressbar): A Progress Bar.
  • Radio Button (dgs-dxradiobutton): A Radio Button.
  • Combo Box (dgs-dxcombobox + dgs-dxcombobox-Box) : A combo box.
  • Check Box (dgs-dxcheckbox) : A check box that with 3 states (checked, unchecked and indeterminate).


Notice

  • It is recommended to change the resource name to 'dgs'.
  • This is a resource, if you want to use the functions exported by this resource, you should use a exported function call in your code, such as "exports.dgs:dgsCreateLabel(0, 0, 0.5, 0.1, "text", true)".
  • Here is a feasible way to shorten the name of an exported function:
DGS = exports.dgs --shorten the export function prefix
label = DGS:dgsCreateLabel(0,0,0.5,0.1,"text",false) --create a label


Special thanks to the following for their help :

Example tab panel and label .
  • Axel: Gives some tips and provide some functions.
  • Senpai: Helps write wiki.
  • ZoNe: Helps write wiki.
  • DiGiTal: Helps write wiki.
  • #Dv^: Helps write wiki.

-->Especially For:

  • Ahmed Ly: Helps write wiki, release auto completion for N++.

DGS Element Properties

General Properties

Unique Properties

Client Functions

Multi Language Supports

Animation

3D Interface

3D Text

Arrow List

Browser

Button

Check Box

Combo Box

Edit

Ellipse Detect Area

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Switch Button

Tab Panel

Window

Plugin

Media Browser

Rounded Rectangle

Color Picker

Blur Box

Effect 3D

Client Events

Plugin

Media

Color Picker

Last

Everyone is welcome to make suggestions, test the script, help make adjustments/finish the wiki, etc.