mceutils module

Copyright (c) 2010-2012 David Rio Vierra

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

mceutils.CheckBoxLabel(title, *args, **kw)[source]
class mceutils.ChoiceButton(choices, scrolling=True, scroll_items=30, **kw)[source]

Bases: albow.controls.ValueButton

align = 'c'
choices
choose = None
get_value()[source]
selectedChoice
showMenu()[source]
mceutils.FloatInputRow(title, *args, **kw)[source]
class mceutils.HotkeyColumn(items, keysColumn=None, buttonsColumn=None, item_spacing=None)[source]

Bases: albow.widget.Widget

is_gl_container = True
mceutils.IntInputRow(title, *args, **kw)[source]
class mceutils.MenuButton(title, choices, **kw)[source]

Bases: albow.controls.Button

action()[source]
menu_picked(index)[source]
mceutils.TextInputRow(title, *args, **kw)[source]
mceutils.alertException(func)[source]
mceutils.drawCube(box, cubeType=GL_QUADS, blockType=0, texture=None, textureVertices=None, selectionBox=False)[source]

pass a different cubeType e.g. GL_LINE_STRIP for wireframes

mceutils.drawFace(box, face, type=GL_QUADS)[source]
mceutils.drawTerrainCuttingWire(box, c0=(0.75, 0.75, 0.75, 0.4), c1=(1.0, 1.0, 1.0, 1.0))[source]
mceutils.loadAlphaTerrainTexture()[source]
mceutils.loadPNGData(filename_or_data)[source]
mceutils.loadPNGFile(filename)[source]
mceutils.loadPNGTexture(filename, *a, **kw)[source]
mceutils.loadTextureFunc(w, h, ndata)[source]
mceutils.normalize(x)[source]
mceutils.normalize_size(x)[source]
mceutils.setWindowCaption(prefix)[source]
mceutils.showProgress(progressText, progressIterator, cancel=False)[source]

Show the progress for a long-running synchronous operation. progressIterator should be a generator-like object that can return either None, for an indeterminate indicator, A float value between 0.0 and 1.0 for a determinate indicator, A string, to update the progress info label or a tuple of (float value, string) to set the progress and update the label

mceutils.warn(obj)[source]