I’m using 1.9.0 and trying to get libRocket to work, using sample code from another post everything in the rml file renders properly, but when I try to put input fields in they don’t render at all, almost like they’re disabled? I don’t get an error in debug or anything.
from direct.showbase.ShowBase import ShowBase
import _rocketcore as rocket
from panda3d.rocket import RocketRegion, RocketInputHandler
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
rocket.LoadFontFace("./data/Delicious-Roman.otf")
rocket.LoadFontFace("./data/Delicious-Bold.otf")
rocket.LoadFontFace("./data/Delicious-BoldItalic.otf")
rocket.LoadFontFace("./data/Delicious-Italic.otf")
r = RocketRegion.make('pandaRocket', base.win)
r.setActive(1)
ih = RocketInputHandler()
base.mouseWatcher.attachNewNode(ih)
r.setInputHandler(ih)
context = r.getContext()
document = context.LoadDocument("./data/demo.rml");
if document:
document.Show();
app = MyApp()
app.run()
RML file
<rml>
<head>
<title>Panda Rocket</title>
<link type="text/rcss" href="rkt.rcss"/>
</head>
<body class="window">
<div id="title-bar">
<handle move_target="#document">
<span id="title">Panda World!</span>
</handle>
</div>
<form name="pandaform" onsubmit="close()">
<br/><input type="text" name="pandainput" size="16" maxlength="32" />
<br/><input type="submit" name="pandasubmit" value="GO!" size="4">GO!</input>
</form>
<handle size_target="#document" style="position:absolute; width: 16px; height:16px; bottom: 0px; right: 0px;"/>
</body>
</rml>
rcss File
/*
* Default styles for all the basic elements.
*/
body
{
font-family: Delicious;
font-weight: normal;
font-style: normal;
font-size: 15;
color: white;
}
div
{
display: block;
}
p
{
display: block;
}
h1
{
display: block;
}
em
{
font-style: italic;
}
strong
{
font-weight: bold;
}
datagrid
{
display: block;
}
select, dataselect, datacombo
{
text-align: left;
}
tabset tabs
{
display: block;
}
Any help would be appreciated.