Package populusgui :: Module PopulusGui :: Class OnscreenMessage
[frames] | no frames]

Class OnscreenMessage

A general purpose on-screen message with a fade out animation.

Nested Classes

Inherited from libpanda.NodePath: NodePath

Instance Methods
Make a text node from string, put it into the 2d sg and set it up with all the indicated parameters.
setMsg(self, text)
Sets the message of the OnscreenMessage.

Inherited from direct.gui.OnscreenText.OnscreenText: __getitem__, __setitem__, appendText, cget, cleanup, clearText, configure, destroy, freeze, getDecal, getFont, getPos, getRoll, getScale, getText, getWordwrap, setAlign, setBg, setDecal, setFg, setFont, setFrame, setPos, setRoll, setScale, setShadow, setText, setWordwrap, setX, setY, thaw, updateTransformMat

Inherited from direct.showbase.DirectObject.DirectObject: accept, acceptOnce, addTask, classTree, detectLeaks, doMethodLater, getAllAccepting, ignore, ignoreAll, isAccepting, isIgnoring, removeAllTasks, removeTask

Inherited from libpanda.NodePath: __cmp__, __delattr__, __getattribute__, __hash__, __new__, __nonzero__, __repr__, __setattr__, __str__, adjustAllPriorities, analyze, anyPath, applyTextureColors, assign, attachCollisionRay, attachCollisionSegment, attachCollisionSphere, attachNewNode, calcTightBounds, clearAntialias, clearAttrib, clearAudioVolume, clearBillboard, clearBin, clearClipPlane, clearColor, clearColorScale, clearCompass, clearDepthTest, clearDepthWrite, clearEffect, clearEffects, clearFog, clearLight, clearMat, clearMaterial, clearModelNodes, clearNormalMap, clearProjectTexture, clearPythonTag, clearRenderMode, clearScissor, clearShader, clearShaderInput, clearTag, clearTexGen, clearTexProjector, clearTexTransform, clearTexture, clearTransform, clearTransparency, clearTwoSided, colorInterval, colorScaleInterval, compareTo, composeColorScale, copyTo, countNumDescendants, deselect, detachNode, doBillboardAxis, doBillboardPointEye, doBillboardPointWorld, eq, explore, fail, find, findAllMatches, findAllMaterials, findAllPathsTo, findAllTexcoords, findAllTextureStages, findAllTextures, findAllVertexColumns, findMaterial, findNetPythonTag, findNetTag, findPathTo, findTexture, findTextureStage, flattenLight, flattenMedium, flattenMultitex, flattenStrong, forceRecomputeBounds, getAncestor, getAncestors, getAncestry, getAntialias, getAttrib, getAudioVolume, getBinDrawOrder, getBinName, getBounds, getChild, getChildren, getChildrenAsList, getClassType, getCollideMask, getColor, getColorScale, getCommonAncestor, getDepthTest, getDepthWrite, getDistance, getEffect, getEffects, getErrorType, getFog, getH, getHiddenAncestor, getHpr, getKey, getMat, getMaterial, getMaxSearchDepth, getName, getNetAudioVolume, getNetPrevTransform, getNetPythonTag, getNetState, getNetTag, getNetTransform, getNode, getNodes, getNumChildren, getNumDescendants, getNumNodes, getP, getParent, getPosDelta, getPrevTransform, getPythonTag, getQuat, getR, getRelativePoint, getRelativeVector, getRenderMode, getRenderModePerspective, getRenderModeThickness, getSa, getSb, getSg, getShader, getShaderInput, getShear, getShxy, getShxz, getShyz, getSort, getSr, getStashedAncestor, getStashedChildren, getState, getSx, getSy, getSz, getTag, getTexGen, getTexGenLight, getTexHpr, getTexOffset, getTexPos, getTexProjectorFrom, getTexProjectorTo, getTexRotate, getTexScale, getTexScale3d, getTexTransform, getTexture, getTightBounds, getTop, getTopNode, getTransform, getTransparency, getTwoSided, getX, getY, getZ, hasAntialias, hasAttrib, hasAudioVolume, hasBillboard, hasBin, hasClipPlane, hasClipPlaneOff, hasColor, hasColorScale, hasCompass, hasDepthTest, hasDepthWrite, hasEffect, hasFog, hasFogOff, hasLight, hasLightOff, hasMat, hasMaterial, hasNetPythonTag, hasNetTag, hasParent, hasPythonTag, hasRenderMode, hasScissor, hasTag, hasTexGen, hasTexProjector, hasTexTransform, hasTexcoord, hasTexture, hasTextureOff, hasTransparency, hasTwoSided, hasVertexColumn, headsUp, hide, hideBounds, hideCS, hideSiblings, hprInterval, hprScaleInterval, iHpr, iPos, iPosHpr, iPosHprScale, iScale, id, instanceTo, instanceUnderNode, isAncestorOf, isEmpty, isHidden, isSameGraph, isSingleton, isStashed, isolate, lerpColor, lerpColorRGBA, lerpColorRGBARGBA, lerpColorScale, lerpColorScaleRGBA, lerpColorScaleRGBARGBA, lerpColorScaleVBase4, lerpColorScaleVBase4VBase4, lerpColorVBase4, lerpColorVBase4VBase4, lerpHpr, lerpHprHPR, lerpHprVBase3, lerpPos, lerpPosHpr, lerpPosHprPoint3VBase3, lerpPosHprScale, lerpPosHprXYZHPR, lerpPosPoint3, lerpPosXYZ, lerpScale, lerpScaleVBase3, lerpScaleXYZ, lessThan, listTags, lookAt, ls, lsNames, lsNamesRecurse, ne, node, notFound, output, pPrintString, place, posHprInterval, posHprScaleInterval, posHprScaleShearInterval, posInterval, posQuatInterval, posQuatScaleInterval, posQuatScaleShearInterval, premungeScene, prepareScene, printChildren, printHpr, printPos, printPosHpr, printPosHprScale, printScale, printTransform, projectTexture, quatInterval, quatScaleInterval, r_constructCollisionTree, r_subdivideCollisions, remove, removeChildren, removeNode, removeNonCollisions, removed, reparentTo, reverseLs, reverseLsNames, rgbPanel, scaleInterval, select, setAllColorScale, setAlphaScale, setAntialias, setAttrib, setAudioVolume, setAudioVolumeOff, setBillboardAxis, setBillboardPointEye, setBillboardPointWorld, setBin, setClipPlane, setClipPlaneOff, setCollideMask, setColor, setColorOff, setColorScale, setColorScaleOff, setCompass, setDepthTest, setDepthWrite, setEffect, setEffects, setFluidPos, setFluidX, setFluidY, setFluidZ, setFog, setFogOff, setH, setHpr, setHprScale, setLight, setLightOff, setMat, setMaterial, setMaterialOff, setMaxSearchDepth, setName, setNormalMap, setP, setPosHpr, setPosHprScale, setPosHprScaleShear, setPosQuat, setPosQuatScale, setPosQuatScaleShear, setPrevTransform, setPythonTag, setQuat, setQuatScale, setR, setRenderMode, setRenderModeFilled, setRenderModePerspective, setRenderModeThickness, setRenderModeWireframe, setSa, setSb, setScissor, setSg, setShader, setShaderAuto, setShaderInput, setShaderOff, setShear, setShxy, setShxz, setShyz, setSr, setState, setSx, setSy, setSz, setTag, setTexGen, setTexHpr, setTexOffset, setTexPos, setTexProjector, setTexRotate, setTexScale, setTexTransform, setTexture, setTextureOff, setTransform, setTransparency, setTwoSided, setZ, shearInterval, show, showAllDescendants, showBounds, showCS, showSiblings, showThrough, showTightBounds, stash, stashTo, subdivideCollisions, toggleVis, unifyTextureStages, unstash, unstashAll, verifyComplete, writeBamFile, writeBamStream, writeBounds, wrtReparentTo

Inherited from unreachable.DTOOL_SUPPER_BASE111: DtoolGetSupperBase

Inherited from object: __reduce__, __reduce_ex__

Class Variables

Inherited from libpanda.NodePath: DtoolClassDict, ETFail, ETNotFound, ETOk, ETRemoved


Inherited from libpanda.NodePath: this, this_metatype

Inherited from object: __class__

Method Details



Make a text node from string, put it into the 2d sg and set it
up with all the indicated parameters.

The parameters are as follows:

  text: the actual text to display.  This may be omitted and
      specified later via setText() if you don't have it
      available, but it is better to specify it up front.

  style: one of the pre-canned style parameters defined at the
      head of this file.  This sets up the default values for
      many of the remaining parameters if they are
      unspecified; however, a parameter may still be specified
      to explicitly set it, overriding the pre-canned style.

  pos: the x, y position of the text on the screen.

  scale: the size of the text.  This may either be a single
      float (and it will usually be a small number like 0.07)
      or it may be a 2-tuple of floats, specifying a different
      x, y scale.

  fg: the (r, g, b, a) foreground color of the text.  This is
      normally a 4-tuple of floats or ints.

  bg: the (r, g, b, a) background color of the text.  If the
      fourth value, a, is nonzero, a card is created to place
      behind the text and set to the given color.

  shadow: the (r, g, b, a) color of the shadow behind the text.
      If the fourth value, a, is nonzero, a little drop shadow
      is created and placed behind the text.

  frame: the (r, g, b, a) color of the frame drawn around the
      text.  If the fourth value, a, is nonzero, a frame is
      created around the text.

  align: one of TextNode.ALeft, TextNode.ARight, or TextNode.ACenter.

  wordwrap: either the width to wordwrap the text at, or None
      to specify no automatic word wrapping.

  drawOrder: the drawing order of this text with respect to
      all other things in the 'fixed' bin within render2d.
      The text will actually use drawOrder through drawOrder +

  decal: if this is True, the text is decalled onto its
      background card.  Useful when the text will be parented
      into the 3-D scene graph.

  font: the font to use for the text.

  parent: the NodePath to parent the text to initially.

  mayChange: pass true if the text or its properties may need
      to be changed at runtime, false if it is static once
      created (which leads to better memory optimization).

Overrides: object.__init__
(inherited documentation)

setMsg(self, text)


Sets the message of the OnscreenMessage.

Arguments: text -- The text to display (type: string).