Search in sources :

Example 1 with GUINodeConditions

use of net.drewke.tdme.gui.nodes.GUINodeConditions in project tdme by andreasdr.

the class GUIDropDownOptionController method select.

/**
	 * Select
	 */
protected void select() {
    // select current
    GUINodeConditions nodeConditions = ((GUIElementNode) node).getActiveConditions();
    nodeConditions.remove(this.selected == true ? CONDITION_SELECTED : CONDITION_UNSELECTED);
    this.selected = true;
    nodeConditions.add(this.selected == true ? CONDITION_SELECTED : CONDITION_UNSELECTED);
    // set text from option to heading text
    GUITextNode dropDownOptionTextNode = (GUITextNode) node.getScreenNode().getNodeById(node.getId() + "_unselected");
    GUITextNode dropDownTextNodeEnabled = (GUITextNode) node.getScreenNode().getNodeById(dropDownNode.getId() + "_text_enabled");
    dropDownTextNodeEnabled.getText().reset();
    dropDownTextNodeEnabled.getText().append(dropDownOptionTextNode.getText());
    GUITextNode dropDownTextNodeDisabled = (GUITextNode) node.getScreenNode().getNodeById(dropDownNode.getId() + "_text_disabled");
    dropDownTextNodeDisabled.getText().reset();
    dropDownTextNodeDisabled.getText().append(dropDownOptionTextNode.getText());
}
Also used : GUINodeConditions(net.drewke.tdme.gui.nodes.GUINodeConditions) GUITextNode(net.drewke.tdme.gui.nodes.GUITextNode) GUIElementNode(net.drewke.tdme.gui.nodes.GUIElementNode)

Example 2 with GUINodeConditions

use of net.drewke.tdme.gui.nodes.GUINodeConditions in project tdme by andreasdr.

the class GUISelectBoxMultipleOptionController method unselect.

/**
	 * Unselect
	 * @param checked
	 */
protected void unselect() {
    // unselect current
    GUINodeConditions nodeConditions = ((GUIElementNode) node).getActiveConditions();
    nodeConditions.remove(this.selected == true ? CONDITION_SELECTED : CONDITION_UNSELECTED);
    this.selected = false;
    nodeConditions.add(this.selected == true ? CONDITION_SELECTED : CONDITION_UNSELECTED);
    // disabled
    boolean disabled = ((GUISelectBoxMultipleController) selectBoxMultipleNode.getController()).isDisabled();
    nodeConditions.remove(CONDITION_DISABLED);
    nodeConditions.remove(CONDITION_ENABLED);
    nodeConditions.add(disabled == true ? CONDITION_DISABLED : CONDITION_ENABLED);
}
Also used : GUINodeConditions(net.drewke.tdme.gui.nodes.GUINodeConditions) GUIElementNode(net.drewke.tdme.gui.nodes.GUIElementNode)

Example 3 with GUINodeConditions

use of net.drewke.tdme.gui.nodes.GUINodeConditions in project tdme by andreasdr.

the class GUISelectBoxMultipleOptionController method unfocus.

/**
	 * Unfocus
	 * @param checked
	 */
protected void unfocus() {
    // unselect current
    GUINodeConditions nodeConditions = ((GUIElementNode) node).getActiveConditions();
    nodeConditions.remove(this.focussed == true ? CONDITION_FOCUSSED : CONDITION_UNFOCUSSED);
    this.focussed = false;
    nodeConditions.add(this.focussed == true ? CONDITION_FOCUSSED : CONDITION_UNFOCUSSED);
}
Also used : GUINodeConditions(net.drewke.tdme.gui.nodes.GUINodeConditions) GUIElementNode(net.drewke.tdme.gui.nodes.GUIElementNode)

Example 4 with GUINodeConditions

use of net.drewke.tdme.gui.nodes.GUINodeConditions in project tdme by andreasdr.

the class GUISelectBoxMultipleOptionController method focus.

/**
	 * Focus
	 */
protected void focus() {
    // select current
    GUINodeConditions nodeConditions = ((GUIElementNode) node).getActiveConditions();
    nodeConditions.remove(this.focussed == true ? CONDITION_FOCUSSED : CONDITION_UNFOCUSSED);
    this.focussed = true;
    nodeConditions.add(this.focussed == true ? CONDITION_FOCUSSED : CONDITION_UNFOCUSSED);
}
Also used : GUINodeConditions(net.drewke.tdme.gui.nodes.GUINodeConditions) GUIElementNode(net.drewke.tdme.gui.nodes.GUIElementNode)

Example 5 with GUINodeConditions

use of net.drewke.tdme.gui.nodes.GUINodeConditions in project tdme by andreasdr.

the class GUIRadioButtonController method setDisabled.

/*
	 * (non-Javadoc)
	 * @see net.drewke.tdme.gui.nodes.GUINodeController#setDisabled(boolean)
	 */
public void setDisabled(boolean disabled) {
    GUINodeConditions nodeConditions = ((GUIElementNode) node).getActiveConditions();
    nodeConditions.remove(this.disabled == true ? CONDITION_DISABLED : CONDITION_ENABLED);
    this.disabled = disabled;
    nodeConditions.add(this.disabled == true ? CONDITION_DISABLED : CONDITION_ENABLED);
}
Also used : GUINodeConditions(net.drewke.tdme.gui.nodes.GUINodeConditions) GUIElementNode(net.drewke.tdme.gui.nodes.GUIElementNode)

Aggregations

GUIElementNode (net.drewke.tdme.gui.nodes.GUIElementNode)20 GUINodeConditions (net.drewke.tdme.gui.nodes.GUINodeConditions)20 GUIColor (net.drewke.tdme.gui.nodes.GUIColor)1 GUINode (net.drewke.tdme.gui.nodes.GUINode)1 GUITextNode (net.drewke.tdme.gui.nodes.GUITextNode)1