Xonotic
dialog_settings_input_userbind.qc File Reference
#include "dialog_settings_input_userbind.qh"
#include "keybinder.qh"
#include "textlabel.qh"
#include "inputbox.qh"
#include "button.qh"
+ Include dependency graph for dialog_settings_input_userbind.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void XonoticUserbindEditDialog_fill (entity me)
 
void XonoticUserbindEditDialog_loadUserBind (entity me, string theName, string theCommandPress, string theCommandRelease)
 
void XonoticUserbindEditDialog_Save (entity btn, entity me)
 

Function Documentation

◆ XonoticUserbindEditDialog_fill()

void XonoticUserbindEditDialog_fill ( entity  me)

Definition at line 24 of file dialog_settings_input_userbind.qc.

References entity(), and makeXonoticTextLabel().

25 {
26  entity e;
27  me.TR(me);
28  me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Name:")));
29  me.TD(me, 1, me.columns - 1, me.nameBox = makeXonoticInputBox(0, string_null));
30  me.TR(me);
31  me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Command when pressed:")));
32  me.TD(me, 1, me.columns - 1, me.commandPressBox = makeXonoticInputBox(0, string_null));
33  me.TR(me);
34  me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Command when released:")));
35  me.TD(me, 1, me.columns - 1, me.commandReleaseBox = makeXonoticInputBox(0, string_null));
36  me.TR(me);
37  me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Save"), '0 0 0'));
39  e.onClickEntity = me;
40  me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Cancel"), '0 0 0'));
41  e.onClick = Dialog_Close;
42  e.onClickEntity = me;
43 }
void XonoticUserbindEditDialog_Save(entity btn, entity me)
string string_null
Definition: nil.qh:9
entity() spawn
entity makeXonoticTextLabel(float theAlign, string theText)
Definition: textlabel.qc:3
entity makeXonoticInputBox(float doEditColorCodes, string theCvar)
Definition: inputbox.qc:10
+ Here is the call graph for this function:

◆ XonoticUserbindEditDialog_loadUserBind()

void XonoticUserbindEditDialog_loadUserBind ( entity  me,
string  theName,
string  theCommandPress,
string  theCommandRelease 
)

Definition at line 14 of file dialog_settings_input_userbind.qc.

References K_END.

15 {
16  me.nameBox.setText(me.nameBox, theName);
17  me.nameBox.keyDown(me.nameBox, K_END, 0, 0);
18  me.commandPressBox.setText(me.commandPressBox, theCommandPress);
19  me.nameBox.keyDown(me.commandPressBox, K_END, 0, 0);
20  me.commandReleaseBox.setText(me.commandReleaseBox, theCommandRelease);
21  me.nameBox.keyDown(me.commandReleaseBox, K_END, 0, 0);
22 }
float K_END
Definition: keycodes.qc:42

◆ XonoticUserbindEditDialog_Save()

void XonoticUserbindEditDialog_Save ( entity  btn,
entity  me 
)

Definition at line 8 of file dialog_settings_input_userbind.qc.

References Dialog_Close().

9 {
10  me.keybindBox.editUserbind(me.keybindBox, me.nameBox.text, me.commandPressBox.text, me.commandReleaseBox.text);
11  Dialog_Close(btn, me);
12 }
+ Here is the call graph for this function: