NoiseyRain Posted November 29, 2016 Share Posted November 29, 2016 I'm working on a mod that will display the HUD properly with a 16:9 widescreen resolution instead of resizing the textures to stretch properly, but I'm having issues with getting it to output the image properly.I started with the logo and background in the main.menu file and used this formula for the rect command:X+80 Y W-160 H I've managed to get it to display a 4:3 image, but it hasn't stretched things properly. Any clue for what I might be doing wrong? Also, is it possible to change the color of the bars on the sides to black?How it normally looks How it looks with my mod Link to comment
ent Posted November 30, 2016 Share Posted November 30, 2016 Are you modifying only menu files? Link to comment
JaceSolarisVIII Posted November 30, 2016 Share Posted November 30, 2016 First you need to edit the code to look something like this. const vidmode_t r_vidModes[] = { { "Mode 0: 320x240", 320, 240 }, { "Mode 1: 400x300", 400, 300 }, { "Mode 2: 512x384", 512, 384 }, { "Mode 3: 640x480", 640, 480 }, { "Mode 4: 800x600", 800, 600 }, { "Mode 5: 856x480", 856, 480 }, { "Mode 6: 960x720", 960, 720 }, { "Mode 7: 1024x768", 1024, 768 }, { "Mode 8: 1152x864", 1152, 864 }, { "Mode 9: 1280x1024", 1280, 1024 }, { "Mode 10: 1366x768", 1366, 768 }, { "Mode 11: 1600x900", 1600, 900 }, { "Mode 12: 1600x1200", 1600, 1200 }, { "Mode 13: 1920x1080", 1920, 1080 }, { "Mode 14: 2048x1536", 2048, 1536 }, { "Mode 15: 2560x1440", 2560, 1440 } }; then compile your code and then you need to alter the setupmenu in UI to look like this. itemDef { name video_mode group video type ITEM_TYPE_MULTI text @MENUS_VIDEO_MODE cvarFloatList { "640 x 480" 3 "800 x 600" 4 "856 x 480" 5 "960 x 720" 6 "1024 x 768" 7 "1152 x 864" 8 "1280 x 1024" 9 "1366 x 768" 10 "1600 X 900" 11 "1600 X 1200" 12 "1920 X 1080" 13 "2048 X 1536" 14 "2560 x 1440" 15 } cvar "ui_r_mode" rect 260 216 340 14 textalign ITEM_ALIGN_RIGHT textalignx 174 textaligny 0 font 4 textscale 1 textstyle 4 style WINDOW_STYLE_FILLED forecolor .615 .615 .956 1 descText @MENUS_CHANGE_THE_DISPLAY_RESOLUTION visible 0 mouseenter { show highlight3 } mouseexit { hide highlight3 } action { play "sound/interface/button1.wav" ; uiScript glCustom ; setcvar ui_r_modified 1 ; show applyChanges } } This will give you the effect you want. You will want to add your own individual screen sizes but this should help. Bek likes this Link to comment
NoiseyRain Posted December 1, 2016 Author Share Posted December 1, 2016 Are you modifying only menu files?Yes, I was only modifying the menu files. First you need to edit the code to look something like this.-snip-then compile your code and then you need to alter the setupmenu in UI to look like this.-snip-This will give you the effect you want. You will want to add your own individual screen sizes but this should help.Thanks for the help Jace; I edited sdl_window.cpp, compiled OpenJK, and edited both setup.menu and ingamesetup.menu, but the resolutions aren't listed in the menu and the screen is still stretched as well as the HUD. I'd like to mention that the only .menu files I included this time were setup and ingamesetup. Link to comment
ensiform Posted December 1, 2016 Share Posted December 1, 2016 The HUD is rendered at virtual coords and you need to scale everything by hand. Pretty sure jaMME and joMME are the only mods that have it available fully. But neither are SP. Link to comment
JaceSolarisVIII Posted December 1, 2016 Share Posted December 1, 2016 Yes, I was only modifying the menu files. Thanks for the help Jace; I edited sdl_window.cpp, compiled OpenJK, and edited both setup.menu and ingamesetup.menu, but the resolutions aren't listed in the menu and the screen is still stretched as well as the HUD. I'd like to mention that the only .menu files I included this time were setup and ingamesetup. I think outcast menus are read differently through the MENU files .I know JKA has @MENUS_VIDEO_MODE in strings I think the outcast ones are numbered @MENUS1_VIDEO_MODE or maybe @MENUS_VIDEO_MODE1 or maybe you have to physically add the edits to the outcast MENUS1 strings?. Sorry I've never done it for outcast so I'm just guessing how it may work. The code edit should be solid but I think there is more than 1 instance of const vidmode_t r_vidModes[] = in openjk.I think there is also one in the rederer section. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now