Tutorial: CSQC GUI Menus
Moderator: InsideQC Admins
50 posts
• Page 4 of 4 • 1, 2, 3, 4
Re: Tutorial: CSQC GUI Menus
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Re: Tutorial: CSQC GUI Menus
i have a problem darkplaces give me this error "command "testmenu" can not be executed" aniway "testmenu" is executed for darkplaces. How can i fix this glitch?
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
Re: Tutorial: CSQC GUI Menus
may be just register another command:)
registercommand("mytestmenu");
registercommand("mytestmenu");
Sorry for my english 
- Max_Salivan
- Posts: 93
- Joined: Thu Dec 15, 2011 1:00 pm
Re: Tutorial: CSQC GUI Menus
Okey i work a bit with the Menu and write some new code done.
Here an example what i do:

So i do an boxframe that use 9 Images for any side 1 Image:
# # #
# # #
# # #
Code:
This will use the handle for the boxframe.
aso a new update is the "spawnbox" i Change the Image Change by an exist Image string:
That allow to use custom Images like logo selection or so.
here an Example: write this to "CSQC_GUI_MenuBackground":
dont Forget to precache the Image Frames.
Here the Frames i use: DOWNLOAD
Here an example what i do:

So i do an boxframe that use 9 Images for any side 1 Image:
# # #
# # #
# # #
Code:
- Code: Select all
void (float x, float y, float w, float h, vector size, vector rgb, float alpha) drawframe = {
local vector e_position;
local float i;
e_position_x = x;
e_position_y = y;
drawpic (e_position, "gfx/csqc/frame/left_top.tga", size, rgb, alpha);
e_position_y += size_y;
for (i = 0; i < h; i++) {
drawpic (e_position, "gfx/csqc/frame/left_center.tga", size, rgb, alpha);
e_position_y += size_y;
}
drawpic (e_position, "gfx/csqc/frame/left_bottom.tga", size, rgb, alpha);
e_position_x += size_x;
while (w > 0) {
e_position_y = y;
drawpic (e_position, "gfx/csqc/frame/middle_top.tga", size, rgb, alpha);
e_position_y += size_y;
for (i = 0; i < h; i++) {
drawpic (e_position, "gfx/csqc/frame/middle_center.tga", size, rgb, alpha);
e_position_y += size_y;
}
drawpic (e_position, "gfx/csqc/frame/middle_bottom.tga", size, rgb, alpha);
w -= 1, e_position_x += size_x;
}
e_position_y = y;
drawpic (e_position, "gfx/csqc/frame/right_top.tga", size, rgb, alpha);
e_position_y += size_y;
for (i = 0; i < h; i++) {
drawpic (e_position, "gfx/csqc/frame/right_center.tga", size, rgb, alpha);
e_position_y += size_y;
}
drawpic (e_position, "gfx/csqc/frame/right_bottom.tga", size, rgb, alpha);
};
This will use the handle for the boxframe.
aso a new update is the "spawnbox" i Change the Image Change by an exist Image string:
- Code: Select all
void (vector boxpos, string boximg, vector boxsize, string boxtext, vector boxrgb, float boxalpha) spawnbox = {
drawpic (boxpos, boximg, boxsize, boxrgb, boxalpha);
drawstring (boxpos + '10 12 0', boxtext, '8 8 0', boxrgb, 1, 1);
};
That allow to use custom Images like logo selection or so.
here an Example: write this to "CSQC_GUI_MenuBackground":
- Code: Select all
menback_pos_x = screen_size_x / 2 - 25 * 8;
menback_pos_y = screen_size_y / 2 - 20 * 8;
drawframe (menback_pos_x, menback_pos_y, 23, 18, '16 16 0', '0.6 0.6 1', 0.7);
dont Forget to precache the Image Frames.
Here the Frames i use: DOWNLOAD
I am sorry for my English...
-

Rikku2000 - Posts: 49
- Joined: Wed Oct 20, 2010 6:33 pm
- Location: Germany
Re: Tutorial: CSQC GUI Menus
Does anyone still have the files for this as the links stopped working?
I found the 1.0 version on my HD from back in the day (PM me if you need it), but the newer ones would be nice to have also.
Best would be if this forum could have small files attachments enabled, so that there isn't a dependence on external links.
I also can't get version 1.0 to work on recent FTEQW builds. FTEQCC compiles it fine (safe a few warnings), but then it crashes the engine when I try to start a map (the regular main menu still works).
I found the 1.0 version on my HD from back in the day (PM me if you need it), but the newer ones would be nice to have also.
Best would be if this forum could have small files attachments enabled, so that there isn't a dependence on external links.
I also can't get version 1.0 to work on recent FTEQW builds. FTEQCC compiles it fine (safe a few warnings), but then it crashes the engine when I try to start a map (the regular main menu still works).
- Julius
- Posts: 93
- Joined: Sun Aug 29, 2010 4:32 pm
50 posts
• Page 4 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 1 guest