<container color='#00000080' size='400' size-func="unpack(gui.get_viewport())">
    <panel interval="0"
           orientation="horizontal"
           color="#00000010"
           size-func="gui.get_viewport()[1]-350,30">
        <button id="s_chat" size="110,30" onclick="modes:set('chat')">@Chat</button>
        <button id="s_console" size="110,30" onclick="modes:set('console')">@Console</button>
        <button id="s_debug" size="110,30" onclick="modes:set('debug')">@Debug</button>
    </panel>
    <container pos="0,30" size-func="gui.get_viewport()[1]-350,30" color="#00000020">
        <label id="title" pos="8,8"></label>
    </container>
    
    <container id="logContainer" pos="0,60"
               size-func="unpack(vec2.add(gui.get_viewport(), {0,-100}))">
        <textbox 
            id='log' 
            color='0'
            autoresize='true' 
            margin='0'
            editable='false' 
            multiline='true' 
            size-func="gui.get_viewport()[1],40"
            gravity="bottom-left"
        ></textbox>
    </container>
    <container id="editorContainer" pos="0,60" color="#00000080"
               size-func="unpack(vec2.add(gui.get_viewport(), {-350,-230}))">
        <textbox
            id='editor'
            color='0'
            autoresize='true'
            margin='0'
            padding='5'
            editable='false'
            multiline='true'
            line-numbers='true'
            text-color="#FFFFFFA0"
            size-func="gui.get_viewport()[1]-350,40"
            gravity="top-left"
            text-wrap='false'
            scroll-step='50'
        ></textbox>
    </container>
    <panel id="traceback" gravity="bottom-left" padding="4" color="#000000A0" 
        max-length="170" size-func="gui.get_viewport()[1]-350,170">
    </panel>
    <panel id="problemsLog"
        color="#00000010" 
        position-func="gui.get_viewport()[1]-350,0" 
        size-func="350,gui.get_viewport()[2]-40"
        padding="5,15,5,15">
        <label margin="0,0,0,5">@Problems</label>
    </panel>
    <textbox id='prompt' 
             consumer='submit' 
             margin='0' 
             gravity='bottom-left' 
             size-func="gui.get_viewport()[1],40"
             onup="on_history_up()"
             ondown="on_history_down()">
    </textbox>
</container>
