Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: Amo on August 16, 2006, 08:38:44 PM
-
Good evening. We tried to define a separate font type for a entity. In this case: When the cursor rolls over the entity a text with another font type shall be load (black text on black ground isn't that good
-
Are you using the default game_daemon.script for the caption displaying?
-
Yes it is still standard.
-
For example, to inherit the font assigned to the entity in SceneEdit, you'd have to do the following:
Edit game_daemon.script, find the line:
WinCaption.Text = ActObj.Caption;
and add this:
WinCaption.Text = ActObj.Caption;
WinCaption.SetFont(ActObj.GetFont());
-
Thank you works fine!
-
OK, I need to correct myself. It works only fine in debugging mode, after compiling the game we get script errors in main menu. In the game itself it works fine.
-
Please, whenever there is a problem post the errors from the log files.
-
Ok, here we go:
WME Log:
13:27: ********** DEBUG LOG OPENED 17-08-2006 (Release Build) *****************
13:27: Wintermute Engine ver 1.6.1, Compiled on May 20 2006, 16:55:09
13:27: Platform: Windows XP Service Pack 2 (Build 2600)
13:27: DirectX version: 9.0
13:27: BugslayerUtil.dll is bound
13:27:
13:27: Scanning packages...
13:27: Registered 0 files in 0 package(s)
13:27: Initializing scripting engine...
13:27: Script compiler 'dcscomp.dll' bound successfuly
13:27: Loading plugins...
13:27: wme_sample_pixel.dll
13:27: wme_snow.dll
13:27: Loading string table...
13:27: 42 strings loaded
13:27: Enumerating Direct3D devices...
13:27: Enumerating DirectSound devices...
13:27: Available video devices:
13:27: NVIDIA GeForce 6600 GT (accelerated)
13:27: nv4_disp.dll 6.14.10.7189
13:27: NVIDIA GeForce 6600 GT (accelerated)
13:27: nv4_disp.dll 6.14.10.7189
13:27: Available audio devices:
13:27: Primärer Soundtreiber
13:27: Creative Sound Blaster-PCI
13:27: [no sound]
13:27:
13:27: User selected:
13:27: Video: NVIDIA GeForce 6600 GT (accelerated)
13:27: Windowed:no Colors:32bit T&L:no Multisample:4
13:27: Audio: Primärer Soundtreiber
13:27: Maximum texture size: 4096x4096
13:27: Engine initialized in 547 ms
13:27:
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:27: Runtime error. Script 'scripts\game_daemon.script', line 21
13:27: Call to undefined method 'GetFont'. Ignored.
13:27: Error opening file '[null]'
13:27: Error opening file '[null]'
13:27: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28: Runtime error. Script 'scripts\game_daemon.script', line 21
13:28: Call to undefined method 'GetFont'. Ignored.
13:28: Error opening file '[null]'
13:28: Error opening file '[null]'
13:28: CBFontBitmap::LoadFile failed for file '[null]'
13:28:
13:28: Shutting down...
13:28: Shutting down scripting engine
13:28: ********** DEBUG LOG CLOSED ********************************************
-
Ok, change the line to:
if(ActObj.Type=="entity") WinCaption.SetFont(ActObj.GetFont());
That should do the trick.
-
That should do the trick.
And it does the trick. Thank you.