|
strange screen issues
#234937
11/05/08 11:14
11/05/08 11:14
|
Joined: Oct 2008
Posts: 67
pewpew
OP
Junior Member
|
OP
Junior Member
Joined: Oct 2008
Posts: 67
|
i am trying to create a main menu for my game, but its doing strange things. first i create a panel, with a bitmap as the background. There is one button inside the panel. when i put my mouse over the button, the "over" bitmap wont appear. if i draw text to the screen, it stays on the screen. any text that i place just writes straight over the top.
is there some sort of "refresh screen" command? or do i need to put the button or menu into some sort of loop? i am really lost here and its hard to explain
HURRR DERP DERP DEERRPP HURR
|
|
|
Re: strange screen issues
[Re: pewpew]
#234972
11/05/08 13:11
11/05/08 13:11
|
Joined: Aug 2008
Posts: 153 Germany,Stuttgart
kwpsp
Member
|
Member
Joined: Aug 2008
Posts: 153
Germany,Stuttgart
|
I don't understand really but you can use the layers. Or try it with e.g. text1.visible=off;
kwpsp
My system: - Core 2 Quad 6600(4x 2,4GhZ) - 2GB Ram - GeForce 7050(:-)) - Windows seven
|
|
|
Re: strange screen issues
[Re: kwpsp]
#234975
11/05/08 13:16
11/05/08 13:16
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Your second problem can be solved by typing "vec_set(screen_color,vector(128,128,128));" where you can replace the 128s with any color you like, apart from 0,0,0.
For the first problem it would be helpfull to see the panel definition.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: strange screen issues
[Re: Uhrwerk]
#235104
11/05/08 23:03
11/05/08 23:03
|
Joined: Oct 2008
Posts: 67
pewpew
OP
Junior Member
|
OP
Junior Member
Joined: Oct 2008
Posts: 67
|
PANEL* main_menu = { bmap = image_menu; button = 300, 200, image_join_on, image_join_off, image_join_on, NULL, NULL, NULL; flags = VISIBLE; }
//loads the menu function load_menu() { main_menu.size_x = 800; main_menu.size_y = 600; main_menu.pos_x = (screen_size.x - 800) / 2; main_menu.pos_y = (screen_size.y - 600) / 2; }
function main() { while(1) { wait(1); } return 0; }
thats the panel. i couldnt get it to work properly when i put my mouse over it... so i decided to create a level for the background... but that wont work either. all the level contains is a sphere with an earth-like skin. When it loads, it says "error loading planet.mdl". is there something you have to do to a model after u put it into an empty map? i was just thinking of having a planet rotating in the background of the menu.
Last edited by pewpew; 11/05/08 23:07.
HURRR DERP DERP DEERRPP HURR
|
|
|
Re: strange screen issues
[Re: pewpew]
#235105
11/05/08 23:12
11/05/08 23:12
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
Serious User
|
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
are you sure you have set the right mouse_mode? by default, the mouse pointer is inactive. ...
function main() { mouse_mode = 1;
while(1) { mouse_pos.x = mouse_cursor.x; // snap mouse mouse_pos.y = mouse_cursor.y; // snap mouse wait(1); } }
Last edited by DJBMASTER; 11/05/08 23:12.
|
|
|
Re: strange screen issues
[Re: DJBMASTER]
#235106
11/05/08 23:28
11/05/08 23:28
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
It is "button(x, y, bmapOn, bmapOff, bmapOver, functionOn, functionOff, functionOver);". You forgot the brackets. And if you define a background bitmap you don't need to set the size of the panel.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: strange screen issues
[Re: DJBMASTER]
#235116
11/06/08 01:46
11/06/08 01:46
|
Joined: Oct 2008
Posts: 67
pewpew
OP
Junior Member
|
OP
Junior Member
Joined: Oct 2008
Posts: 67
|
ohhhh hahahah it works now. didnt realise that engine mouse and actual mouse had to be snapped together  mouse_mode = 1 and snapping worked. thanks heaps. just another question tho - any ideas as to why i cant get a model into the map? i made a sphere, put it into the level editor, built the map and loaded it into the game. the primitives created by the level appear (i tested with a cube etc.) but the sphere just wont load 
Last edited by pewpew; 11/06/08 01:52.
HURRR DERP DERP DEERRPP HURR
|
|
|
Re: strange screen issues
[Re: DJBMASTER]
#235121
11/06/08 02:40
11/06/08 02:40
|
Joined: Oct 2008
Posts: 67
pewpew
OP
Junior Member
|
OP
Junior Member
Joined: Oct 2008
Posts: 67
|
i needed an earth-like model, and MED's spheres dont have enough vertices to look like a smooth planet (unless there is an option i have missed). so, i created a sphere in maya imported it into MED used 2-sided mapping pasted a quick atlas image onto the planet imported it into the level.
is there something i missed? or would it be a better option just o use a basic sphere from MED
HURRR DERP DERP DEERRPP HURR
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|