GUI

From WarCraft3

< wc3
Jump to: navigation, search
The default "Melee Initialization" trigger.

GUI (Graphical User Interface) is a graphic interface that allows users to code in JASS without learning a programming language, by using a series of drop-down menus and input boxes, as well as other methods such as radioboxes and a complete UI. The basic syntax for GUI is events, conditions, and actions to run when the event runs if the conditions return true. The GUI Editor is formally called the Trigger Editor, and is one of the modules of the World Editor. The Trigger Editor, and therefore the GUI, is bugged for Macs, it is sometimes difficult to use and tends to crash.

The GUI is updated as time goes on, the most recent notable change was the introduction of hashtables and a Blizzard defined GetHandleId function in the GUI and in JASS, allowing GUI users to create MUI spells more easily, and create systems using unique handle integers. The GUI has not been updated since patch 1.23b.[Citation needed]

Contents

Triggers

A GUI action on Mac OS X.

Triggers in GUI are both a type and a part of the interface. Users can create a new trigger with the toolbar by selecting New > Trigger, using the hotkey CTRL+T (⌘T for mac users), or right clicking on the side palette and selecting New Trigger. Triggers consist of three parts: events, conditions, and actions.

Events register events to the trigger and execute the rest of the trigger when the events are run. Conditions are requirements that must be fulfilled for the actions to be run. The final section, actions, contains all of the code that should be run if all the conditions are true.

GUI users can use the Custom Script action to put lines of JASS in their triggers in order to access otherwise unavailable functions, remove leaks, and use local variables. Several systems, including GUI-Friendly Damage Detection, GUI-Friendly Timer System, GUI-Friendly Double Click, and others, have been created specially for GUI usage with an unmodified World Editor, mostly working with an event fireing when a real equals a certain value, or more complicated, making you run several actions to just start a timer. For the most part, in order to use arguments players must set global variables to the value of their arguments, and then the system will check the value of the variables to take input. These systems, although usually only slightly slower, are often less efficient than normal JASS systems, and if made for use with the unmodified world editor, considerably less efficient without vJASS.

Disadvantages and Criticism

There are many disadvantages to using GUI, with reasons in the output code and coding with the GUI. Creating code with GUI is often difficult. It requires users to select all different kinds of values and boxes in a rather complicated manner. GUI also misses several functions, such as the ones to remove memory leaks, that must be handled with lines of custom script inside of a GUI trigger.

GUI also uses BJ functions, which are notorious for wasting time and efficiency (though more notorious than they ought to be), and almost all of them just make worthless function calls. Because of this, spells and systems in GUI perform a bit slower and with less ease than JASS systems.

GUI is heavily criticized by JASS users for its lack of capabilities, but has been extended by projects such as UMSWE and EGUI, although none of these extensions function on operating systems other than Windows. Another criticism of the GUI editor is its lack of support for creating its own functions, systems, and customizations, compared to JASS which allows users to define their own functions, and even program in an object-orientated interface with the help of third-party extensions. The GUI also uses several functions that make unnecessary function calls or act slower than JASS counterparts, called BJ's, because many of these functions have a BJ suffix.

Despite its numerous faults, the GUI is still heavily used due to being user friendly and easy to pick up, compared to JASS. Many people also believe that the Warcraft III community will be replaced by Starcraft II, and therefore it is a waste of time to learn JASS when you will just be switching to Starcraft II.

See Also

Personal tools