options menu editing (help)
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
options menu editing (help)
Okay so started by editing the options menu. so far so good , i wanted to remove the "always run" option i did so and even lined the option listings back up nicely. the only problem is the yes no sliders dont match up anymore.
im pretty sure it has to do with one of these functions.
im just not sure which one.
esp. if its the draw check box one, cause it shows x,y, then only gives one number for placement. im im guessing that may not be it. anyone mind pointing me in the right direction?
never mind! i figured it out right as i gave up xD.
to anyone starting off who might be trying to do something similar.
this is it right here.
M_Print (16, 96, " Invert Mouse");
M_DrawCheckbox (220, 96, m_pitch.value < 0);
next its time to learn how to make the selection line up with the options! lol...
all done mainly with the menu.
so next im wondering how do i implement mouse look with y coordinates as well? (with out having told hold button)
im going to replace that always run option with mouse look yes/no
im pretty sure it has to do with one of these functions.
- Code: Select all
void M_DrawSlider (int x, int y, float range)
{
int i;
if (range < 0)
range = 0;
if (range > 1)
range = 1;
M_DrawCharacter (x-8, y, 128);
for (i=0 ; i<SLIDER_RANGE ; i++)
M_DrawCharacter (x + i*8, y, 129);
M_DrawCharacter (x+i*8, y, 130);
M_DrawCharacter (x + (SLIDER_RANGE-1)*8 * range, y, 131);
}
void M_DrawCheckbox (int x, int y, int on)
{
#if 0
if (on)
M_DrawCharacter (x, y, 131);
else
M_DrawCharacter (x, y, 129);
#endif
if (on)
M_Print (x, y, "on");
else
M_Print (x, y, "off");
}
im just not sure which one.
esp. if its the draw check box one, cause it shows x,y, then only gives one number for placement. im im guessing that may not be it. anyone mind pointing me in the right direction?
never mind! i figured it out right as i gave up xD.
to anyone starting off who might be trying to do something similar.
this is it right here.
M_Print (16, 96, " Invert Mouse");
M_DrawCheckbox (220, 96, m_pitch.value < 0);
next its time to learn how to make the selection line up with the options! lol...
all done mainly with the menu.
so next im wondering how do i implement mouse look with y coordinates as well? (with out having told hold button)
im going to replace that always run option with mouse look yes/no
-

ceriux - Posts: 2223
- Joined: Sat Sep 06, 2008 3:30 pm
- Location: Indiana, USA
Heh, heh; welcome to hell!
I rewrote my entire menu system because I was annoyed at the amount of work required to add, remove or move just one option.
Adding mouselooking? Do you mean to the engine in general or just to the menus?
I rewrote my entire menu system because I was annoyed at the amount of work required to add, remove or move just one option.
Adding mouselooking? Do you mean to the engine in general or just to the menus?
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
both. like it already has a form of mouse look, that you have to hold a button down and you can look with the mouse. but that sucks. i want it to be like a normal modern day move the mouse and look gameplay. i just want it to be toggled in the options.
-

ceriux - Posts: 2223
- Joined: Sat Sep 06, 2008 3:30 pm
- Location: Indiana, USA
My "minimal fixed GLQuake" engine has this (but not in the menus); just look for the qboolean called "mouselooking" and the cvar called "freelook" for all that you need. Source: http://www.quaketastic.com/upload/files/tools/windows/engines/MHGLQFIX.zip. For bonus points it interoperates cleanly with the old +mlook method.
The freelook cvar is just a simple 1 or 0, so you can put it in the menus in much the same way as lookspring or lookstrafe are already done.
The freelook cvar is just a simple 1 or 0, so you can put it in the menus in much the same way as lookspring or lookstrafe are already done.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
We knew the words, we knew the score, we knew what we were fighting for
-

mh - Posts: 2292
- Joined: Sat Jan 12, 2008 1:38 am
5 posts
• Page 1 of 1
Return to Programming Tutorials
Who is online
Users browsing this forum: No registered users and 1 guest