Skip to content

Commit 34731cd

Browse files
eswartzrdb
authored andcommitted
rocket: Add sample showing some Panda3D uses of libRocket. (panda3d#24)
1 parent 0493b07 commit 34731cd

18 files changed

+1155
-0
lines changed
Binary file not shown.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
body
2+
{
3+
font-family: "Perfect DOS VGA 437";
4+
font-weight: normal;
5+
font-style: normal;
6+
7+
// use all the allocated texture space
8+
min-width: 100%;
9+
min-height: 100%;
10+
11+
background-color: #000;
12+
}
13+
14+
15+
text#content
16+
{
17+
z-index: 2;
18+
font-size: 30px;
19+
20+
white-space: pre-wrap;
21+
22+
margin: auto;
23+
24+
text-align: left;
25+
position: absolute;
26+
27+
// account for non-proportionality of our 1024x512
28+
// buffer compared with VGA font proportions and
29+
// wanting to center the screen with 40 columns
30+
top: 16px;
31+
left: 32px;
32+
33+
width: 100%;
34+
height: 100%;
35+
36+
color: #888;
37+
38+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<rml>
2+
3+
<head>
4+
<title>Administrative Console</title>
5+
<link type="text/rcss" href="console.rcss"/>
6+
</head>
7+
<!-- events are bound strictly from code -->
8+
<body >
9+
<text id="content" />
10+
</body>
11+
</rml>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from www.dafont.com/perfect-dos-vga-437.font (info at http://zehfernando.com/2015/revisiting-vga-fonts/)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<rml>
2+
<head >
3+
<title>Main Menu</title>
4+
<link type="text/template" href="window.rml" />
5+
<style>
6+
body
7+
{
8+
width: 400px;
9+
height: 225px;
10+
11+
margin: auto;
12+
13+
background-color: #44f;
14+
}
15+
16+
17+
div#title_bar_content
18+
{
19+
font-size: 48;
20+
21+
//text-align: left;
22+
position: absolute;
23+
top: 40%;
24+
//vertical-align: center;
25+
26+
}
27+
28+
</style>
29+
30+
<script>
31+
32+
import _rocketcore as rocket
33+
34+
# This handler overrides the 'onkeydown' handler from the template
35+
def OnKeyDown(event, document):
36+
keyId = event.parameters['key_identifier']
37+
if keyId in [ rocket.key_identifier.RETURN,
38+
rocket.key_identifier.ESCAPE,
39+
rocket.key_identifier.SPACE ]:
40+
FireClosing(document)
41+
42+
# custom event
43+
def FireClosing(document):
44+
document.DispatchEvent("aboutToClose", { }, False)
45+
46+
</script>
47+
48+
</head>
49+
<body id='window' template="window" onclick='FireClosing(document)'>
50+
<div id="title_bar_content" >
51+
<label id="loadingLabel">Loading...</label>
52+
</div>
53+
</body>
54+
</rml>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ModeNine
2+
3+
Based on Andrew Bulhak's ModeSeven, in turn inspired by the screen
4+
output of the BBC Micro.
5+
6+
copyright:
7+
(C) 1998 Andrew C. Bulhak
8+
(C) 2001 Graham H Freeman
9+
10+
Freely Distributable.
11+
12+
All we ask is that this readme file must be included with the font package.
13+
Impresarios of free font sites and shovelware cd-roms, this means you!
14+
15+
If you think this font is doovy, let us know at fonts@grudnuk.com, and we
16+
might actually make more fonts.
17+
18+
Another fine Grudnuk Creations produkt | http://grudnuk.com/
21.7 KB
Binary file not shown.
180 KB
Binary file not shown.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
This is an edited version of this file from blendswap.com (http://www.blendswap.com/blends/view/74468).
3+
4+
VERY IMPORTANT LICENSE INFORMATION:
5+
6+
This file has been released by buzo under the following license:
7+
8+
Creative Commons Zero (Public Domain)
9+
10+
You can use this model for any purposes according to the following conditions:
11+
12+
There are no requirements for CC-Zero licensed blends.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Default styles for all the basic elements.
3+
*/
4+
5+
div
6+
{
7+
display: block;
8+
}
9+
10+
p
11+
{
12+
display: block;
13+
}
14+
15+
h1
16+
{
17+
display: block;
18+
}
19+
20+
em
21+
{
22+
font-style: italic;
23+
}
24+
25+
strong
26+
{
27+
font-weight: bold;
28+
}
29+
30+
datagrid
31+
{
32+
display: block;
33+
}
34+
35+
select, dataselect, datacombo
36+
{
37+
text-align: left;
38+
}
39+
40+
tabset tabs
41+
{
42+
display: block;
43+
}
44+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy