Legacy:MoCheckBox - Unreal Wiki

# Legacy:MoCheckBox

### From Unreal Wiki, The Unreal Engine Documentation Site

UT2003 :: GUI >> GUIComponent >> GUIMultiComponent >> GUIMenuOption >> MoCheckBox (Package: XInterface)

Combines a label and check box button.

This GUI control behaves a little oddly: the checkbox fills up ALL space to the right of the caption. Therefore, you need to make that space SMALL for the button to be a 'normal' size, ie the same sort of size and shape as the other checkboxes in the UT2003 GUI.

Sample properties (to get the same proportions as built-in UT2004 controls):

    CaptionWidth  = 0.9; // prevent button from being too big
    bHeightFromComponent = False; // prevents TINY button
    bSquare=True; // makes the button round
    WinHeight = 0.07; // not too big for button to be right size,
       //obviously this depends on the panel that holds this component
    // WinWidth then sets how far the button is from the left edge of the widget

## Properties

### Option

These properties are available to edit.

string CheckStyleName
GUICheckBoxButton MyCheckBox (noexport, editconst)
bool bChecked (noexport, editconst, deprecated)

## Functions

InitComponent( GUIController MyController, GUIComponent MyOwner )
  Initializes checkbox.
SetComponentValue( coerce string NewValue, optional bool bNoChange )
  If `bNoChange` is false, sets `bIgnoreChange` to false and calls `Checked(NewValue)`. Otherwise sets `bIgnoreChange` to true.
string GetComponentValue()
  Returns `string(IsChecked())`.
ResetComponent()
  Calls `MyCheckBox.SetChecked(False)`.
bool IsChecked()
  Returns `MyCheckBox.bChecked`.
bool Checked( coerce bool C )
  Calls `MyCheckBox.SetChecked(C)`. Returns true.
ButtonChecked( GUIComponent Sender )
  If `Sender == MyCheckBox`, calls `InternalOnChange(self)`.
bool InternalClick( GUIComponent Sender ) (private)
  If `bValueReadOnly`, returns true. Otherwise returns `MyCheckBox.InternalOnClick(Sender)`.

## Discussion

EntropicLqd: From what I remember you can specify widget sizes in two ways. One is as a ratio of the holding panels height and width. The other is in absoloute pixels. Maybe absoloute pixels would be the way to go here. Just be careful about people playing on lower resolution screens.

Categories: Legacy Class (UT2003) | Legacy Class (UT2004)

##### Views

- Legacy
- Discussion
- Current revision

##### Search