def build_sound(self): table = GlassTablePlus(); table.setFrame(0); table.horizontalJustification = glass.Graphics.LEFT; MasterVolume = glass.GlassSlider(); MasterVolume.linkCvar( "sound_mastervolume" ); MasterVolume.setScaleEnd(1.0); MasterVolume.setScaleStart(0); table.addRow("Master Volume", MasterVolume); MusicVolume = glass.GlassSlider(); MusicVolume.linkCvar( "sound_musicvolume" ); MusicVolume.setScaleEnd(1.0); MusicVolume.setScaleStart(0); table.addRow("Music Volume", MusicVolume); SoundVolume = glass.GlassSlider(); SoundVolume.linkCvar( "sound_sfxVolume" ); SoundVolume.setScaleEnd(1.0); SoundVolume.setScaleStart(0); TestSoundButton = glass.GlassButton("Test"); TestSoundButton.setClickAction("Sound_PlaySound('/sound/human/player/male/good_game_1.ogg');"); table.addRow("Sound Effect Volume", SoundVolume,TestSoundButton); #TODO play this sound when the slider loses focus, ie when the car is released softwareMode = glass.GlassCheckbox(); softwareMode.linkCvar("sound_softwareMode"); table.addRow("Software Mode", softwareMode); mixrate = glass.GlassDropMenu(); mixrate.linkCvar("sound_mixrate"); mixrate.addOption("22050", "22050") mixrate.addOption("44100", "44100") mixrate.addOption("48000", "48000") table.addRow("Sampling Rate", mixrate); channels = glass.GlassSpinner(); channels.linkCvar("sound_numChannels"); channels.setStep(32); channels.setWidth(50); table.addRow("Sound Channels", channels); VoIPVolume = glass.GlassSlider(); VoIPVolume.linkCvar( "sound_voipvolume" ); VoIPVolume.setScaleEnd(1.0); VoIPVolume.setScaleStart(0); table.addRow("Voice Volume", VoIPVolume); table.adjustSizeTo(); tableHolder = glass.GlassScrollArea(table); tableHolder.setSize(table.getWidth(), table.getHeight()); return tableHolder;
def build_network(self): table = GlassTablePlus(); table.setFrame(0); table.horizontalJustification = glass.Graphics.LEFT; preset = glass.GlassDropMenu(); preset.addOption("Dial-up","dialup"); preset.addOption("ISDN","isdn"); preset.addOption("DSL/Cable","dslcable"); preset.addOption("LAN","lan"); preset.addSelectionListener(self); table.addRow( "Presets:", preset); bandwidth = glass.GlassSpinner(); bandwidth.linkCvar("netBPS"); bandwidth.setStep(200); bandwidth.setWidth(50); table.addRow("Bandwidth", bandwidth); netfps = glass.GlassSpinner(); netfps.linkCvar("netFrames"); netfps.setStep(1); table.addRow("Updates per second:", netfps); maxPacketSize = glass.GlassSpinner(); maxPacketSize.linkCvar("maxPacketSize"); maxPacketSize.setStep(20); table.addRow("Max. Packet Size:", maxPacketSize); lagcompensation = glass.GlassDropMenu(); lagcompensation.linkCvar("cl_lerpshift"); lagcompensation.addOption("Off","0"); lagcompensation.addOption("Low", "0.1"); #TODO test these values lagcompensation.addOption("Medium", "0.2"); lagcompensation.addOption("High", "0.4"); table.addRow("Lag Compensation", lagcompensation); table.adjustSizeTo(); tableHolder = glass.GlassScrollArea(table); tableHolder.setSize(table.getWidth(), table.getHeight()); return tableHolder;
def __init__(self): glass.GlassWindow.__init__(self, 'Graphics Panel') self.first = True self.setBackgroundColor(glass.Color(0, 0, 0, 128)) self.setTitleVisible(0) self.setSizePct(0.55, 0.8) self.setVisible(False) # config self.table = GlassTablePlus() self.table.setFrame(0) self.table.setCellPadding(2) self.table.horizontalJustification = glass.Graphics.LEFT self.table.addRow("^gConfig", "") self.table.addRow() blockLeap = glass.GlassCheckbox() blockLeap.linkCvar("cl_blockLeapSwitch") self.table.addRow("Block / Leap Switch", blockLeap) showFPS = glass.GlassDropMenu() showFPS.linkCvar("cl_showfps") showFPS.addOption("Off", "0") showFPS.addOption("Instant", "1") showFPS.addOption("Average", "2") showFPS.addOption("Both", "3") self.table.addRow("Show FPS", showFPS) showServerFPS = glass.GlassCheckbox() showServerFPS.linkCvar("cl_showfpsserver") self.table.addRow("Show Server FPS", showServerFPS) showPing = glass.GlassDropMenu() showPing.linkCvar("gui_showping") showPing.addOption("Off", "0") showPing.addOption("Instant", "1") showPing.addOption("Average", "2") self.table.addRow("Show Ping", showPing) showTeamStatus = glass.GlassCheckbox() showTeamStatus.linkCvar("gui_showteamstatus") self.table.addRow("Show Team Status", showTeamStatus) thirdPerson = glass.GlassCheckbox() thirdPerson.linkCvar("cl_alwaysThirdPerson") self.table.addRow("Force Third Person", thirdPerson) cameraView = glass.GlassDropMenu() cameraView.linkCvar("cl_cameraPosLerp") cameraView.addOption("Smoothed", "6") cameraView.addOption("Snappy", "9999") self.table.addRow("Camera Snap", cameraView) cameraSmoothing = glass.GlassDropMenu() cameraSmoothing.linkCvar("cl_cameraAngleLerp") cameraSmoothing.addOption("Snap", "9999") cameraSmoothing.addOption("Quick", "50") cameraSmoothing.addOption("Smooth", "35") cameraSmoothing.addOption("Very Smooth", "15") cameraSmoothing.addOption("Demo Spectate", "5") self.table.addRow("Camera Smoothing", cameraSmoothing) # Graphics self.table.addRow() self.table.addRow("^gGraphics", "") self.table.addRow() gamma = glass.GlassSlider() gamma.linkCvar("vid_gamma") gamma.setScaleEnd(2.5) gamma.setScaleStart(0.5) self.table.addRow("Brightness", gamma) showArmor = glass.GlassCheckbox() showArmor.linkCvar("cl_showLevelArmor") self.table.addRow("Show Armor", showArmor) showImpacts = glass.GlassCheckbox() showImpacts.linkCvar("cl_collisionDecals") self.table.addRow("Show Impact Effects", showImpacts) showBlood = glass.GlassCheckbox() showBlood.linkCvar("cl_bloodSplatter") self.table.addRow("Show Blood Splatter", showBlood) grassFalloff = glass.GlassDropMenu() grassFalloff.linkCvar("gfx_foliageFalloff") grassFalloff.addOption("Off", "0") grassFalloff.addOption("Near", "100") grassFalloff.addOption("Far", "700") grassFalloff.addOption("Very Far", "1500") self.table.addRow("Grass Falloff", grassFalloff) showClouds = glass.GlassCheckbox() showClouds.linkCvar("gfx_clouds") self.table.addRow("Show Clouds", showClouds) showShadows = glass.GlassDropMenu() showShadows.linkCvar("gfx_shadow") showShadows.addOption("Off", "0") showShadows.addOption("Fast", "1") showShadows.addOption("Nice", "3") self.table.addRow("Shadows", showShadows) useShaders = glass.GlassDropMenu() useShaders.linkCvar("gfx_GLSLQuality") useShaders.addOption("^900Off", "0") useShaders.addOption("Low", "1") useShaders.addOption("High", "3") self.table.addRow("Shaders", useShaders) forceSoft = glass.GlassCheckbox() forceSoft.linkCvar("gfx_forceSoftware") self.table.addRow("Force CPU Animation", forceSoft) postProcMaster = glass.GlassCheckbox() postProcMaster.linkCvar("gfx_postProcessing") #TODO: disable the other post proc checkboxes if this is disabled self.table.addRow("Post-Processing", postProcMaster) postBloom = glass.GlassCheckbox() postBloom.linkCvar("gfx_postBloom") self.table.addRow(" Bloom Filter", postBloom) postMotion = glass.GlassCheckbox() postMotion.linkCvar("gfx_postMotion") self.table.addRow(" Motion Blur", postMotion) showGlow = glass.GlassCheckbox() showGlow.linkCvar("gfx_glowFilter") self.table.addRow(" Glow Filter", showGlow) postWater = glass.GlassCheckbox() postWater.linkCvar("gfx_postWater") self.table.addRow(" Water Effects", postWater) postSSAO = glass.GlassCheckbox() postSSAO.linkCvar("gfx_postSSAO") self.table.addRow(" Ambient Occlusion", postSSAO) # Sound self.table.addRow() self.table.addRow("^gSound", "") self.table.addRow() MasterVolume = glass.GlassSlider() MasterVolume.linkCvar("sound_mastervolume") MasterVolume.setScaleEnd(1.0) MasterVolume.setScaleStart(0) self.table.addRow("Master Volume", MasterVolume) MusicVolume = glass.GlassSlider() MusicVolume.linkCvar("sound_musicvolume") MusicVolume.setScaleEnd(1.0) MusicVolume.setScaleStart(0) self.table.addRow("Music Volume", MusicVolume) SoundVolume = glass.GlassSlider() SoundVolume.linkCvar("sound_sfxVolume") SoundVolume.setScaleEnd(1.0) SoundVolume.setScaleStart(0) VoIPVolume = glass.GlassSlider() VoIPVolume.linkCvar("sound_voipvolume") VoIPVolume.setScaleEnd(1.0) VoIPVolume.setScaleStart(0) self.table.addRow("Voice Volume", VoIPVolume) internalHeight = self.getChildrenArea().height self.scrollArea = glass.GlassScrollArea(self.table) self.add(self.scrollArea) self.scrollArea.setScrollPolicy(glass.GlassScrollArea.SHOW_NEVER, glass.GlassScrollArea.SHOW_ALWAYS) bar = self.scrollArea.getScrollbarWidth() self.scrollArea.setWidth( min(self.getWidth() + bar, self.getWidth() - 8)) self.scrollArea.setHeight(min(internalHeight + bar, internalHeight - 4))
def create(self): self.setBackgroundColor(glass.Color(22, 13, 10)); # Top area top = DefaultContainer(); top.setSize(self.getWidth(), 35); top.setBackgroundColor(glass.Color(85, 21, 11)); top.setOpaque(True); self.add(top); title = DefaultImage(); title.setImage("txt_hostgame.png"); top.add(title, "center", "center"); go = DefaultImageButton(); go.setImage("btn_host.png"); go.setCaption("Host"); go.addActionListener(self) top.add(go, 10, "center", "right"); # return to game stuff: self.reconnectBar = DefaultContainer(); self.reconnectBar.setSize(self.getWidth(), 50); self.reconnectBar.setVisible(False); self.reconnectBar.setBackgroundColor(glass.Color(85, 21, 11)); self.reconnectBar.setOpaque(True); self.add(self.reconnectBar, 0, 35); gameProgress = DefaultLabel("GAME IN PROGRESS"); self.reconnectBar.add(gameProgress, "center"); hr = DefaultImage(); hr.setImage("divider.png"); self.reconnectBar.add(hr, "center", gameProgress.getHeight() + 3); disconnectButton = DefaultButton("LEAVE"); disconnectButton.setClickAction("""disconnect();mainmenu.modules['menu'].sectionStack['serverlist'].onShow();"""); self.reconnectBar.add(disconnectButton, 10, 10); connectedMessage = DefaultLabel("You are currently connected to a server. Do you want to return?"); connectedMessage.setFont(fontSizeSmall); self.reconnectBar.add(connectedMessage, "center", 27); returnButton = DefaultButton("RETURN"); returnButton.setClickAction("spechud.setMode('lobby');GUI_ShowScreen('spechud')"); self.reconnectBar.add(returnButton, 10, 10, "right"); self.content = DefaultContainer(); self.add(self.content, 0, 35); self.content.setSize(self.getWidth(), self.getHeight() - 85); self.columnWidth = (self.getWidth() - 40) // 3; # Left container: self.settingsContainer = DefaultContainer(); self.content.add(self.settingsContainer, 10, 0); self.settingsContainer.setSize(self.columnWidth, self.content.getHeight()); #self.settingsContainer.setBackgroundColor(white); settingsTitle = DefaultLabel("Game Settings"); self.settingsContainer.add(settingsTitle, "center", 10); typeLabel = DefaultLabel("Gametype:"); self.settingsContainer.add(typeLabel, 0, settingsTitle.getHeight() + 30 ); cvar_register("sv_gametype", 0); self.gametype = glass.GlassDropMenu(); self.gametype.linkCvar("sv_gametype"); self.gametype.addOption("RTSS",str(GAMETYPE_RTSS)); self.gametype.addOption("Duel",str(GAMETYPE_DUEL)); self.gametype.setSelectedValue("0"); self.settingsContainer.add(self.gametype, typeLabel.getWidth() + 20, typeLabel.getY()); self.gametype.setWidth(60); raceLabel = DefaultLabel("Races:"); self.settingsContainer.add(raceLabel, 0, self.gametype.getY() + 30 ); cvar_register("sv_team1race", 0, "human"); cvar_register("sv_team2race", 0, "beast"); self.race = glass.GlassDropMenu(); self.race.linkCvar("sv_team1race"); self.race.addOption("HvsB","human"); self.race.addOption("HvsH","human"); self.race.addOption("BvsB","beast"); self.race.setSelectedValue("HvsB"); self.settingsContainer.add(self.race, self.gametype.getX(), raceLabel.getY()); self.race.setWidth(60); div1 = DefaultDivider(); div1.setWidth(self.settingsContainer.getWidth()); self.settingsContainer.add(div1, 0, self.race.getY() + 40); cvar_register("sv_xp_mult", 0, "1.0"); xpSlider = DefaultSlider(); xpSlider.linkCvar("sv_xp_mult"); xpSlider.setScaleEnd(10.0); xpSlider.setScaleStart(0.0); xpSlider.setWidth(self.settingsContainer.getWidth() - 15); self.settingsContainer.add(xpSlider, 0, div1.getY() + 25 ); xpLabel = DefaultLabel("XP multiplier"); self.settingsContainer.add(xpLabel, 0, xpSlider.getY() + 13 ); div2 = DefaultDivider(); div2.setWidth(self.settingsContainer.getWidth()); self.settingsContainer.add(div2, 0, xpLabel.getY() + 35); cvar_register("sv_gold_mult", 0, "1.0"); goldSlider = DefaultSlider(); goldSlider.linkCvar("sv_gold_mult"); goldSlider.setScaleEnd(10.0); goldSlider.setScaleStart(0.0); goldSlider.setWidth(self.settingsContainer.getWidth() - 15); self.settingsContainer.add(goldSlider, 0, div2.getY() + 25 ); goldLabel = DefaultLabel("Gold multiplier"); self.settingsContainer.add(goldLabel, 0, goldSlider.getY() + 13 ); # mid container: self.listContainer = DefaultContainer(); self.content.add(self.listContainer, self.columnWidth + 20, 0); self.listContainer.setSize(self.columnWidth, self.content.getHeight()); #self.listContainer.setBackgroundColor(white); mapsTitle = DefaultLabel("Local Map List"); self.listContainer.add(mapsTitle, "center", 10); self.mapList = glass.GlassListBox(); self.mapList.addSelectionListener(self); self.mapList.setBackgroundColor(transparency); self.mapList.setForegroundColor(glass.Color(211, 201, 168)); #self.mapList.setSelectionColor() self.mapScroll = glass.GlassScrollArea(self.mapList); self.mapScroll.setSize(self.listContainer.getWidth(), self.listContainer.getHeight() - 60); self.listContainer.add(self.mapScroll, 0, mapsTitle.getHeight() + 30); # right container: self.mapContainer = DefaultContainer(); self.content.add(self.mapContainer, self.columnWidth * 2 + 30, 0); self.mapContainer.setSize(self.columnWidth, self.content.getHeight()); #self.mapContainer.setBackgroundColor(white); self.overhead = glass.GlassLabel(); #self.overhead.setImage(""); self.overhead.setSize(self.mapContainer.getWidth(), self.mapContainer.getWidth()); self.mapContainer.add(self.overhead, "center", self.mapScroll.getY()); # todo: map stats and information comingSoon = DefaultLabel("Map stats and information \ncoming soon!"); self.mapContainer.add(comingSoon, 0, self.overhead.getHeight() + 70); self.getLocalMaps();
bg = glass.GlassLabel() bg.setBackgroundColor(glass.Color(0, 0, 0, 255)) bg.setSizePct(1, 1) bg.setPosition(0, 0) glass.GUI_ScreenAddWidget("modeltest", bg) modelviewer = glass.GlassViewer() modelviewer.setModel("/models/null.model") modelviewer.setCameraPosition(0, 10, 10) modelviewer.setCameraTarget(0, 0, 10) modelviewer.setPosition(0, 0) modelviewer.setSizePct(1, 1) glass.GUI_ScreenAddWidget("modeltest", modelviewer) modeldropmenu = glass.GlassDropMenu() modeldropmenu.setPositionPct(0.2, 0) modeldropmenu.linkCvar("gui_modelviewermodel") modeldropmenu.addSelectionListener(ModelChangeHandler()) glass.GUI_ScreenAddWidget("modeltest", modeldropmenu) animdropmenu = glass.GlassDropMenu() animdropmenu.setPositionPct(0.2, 0.05) #animdropmenu.linkCvar("gui_modelviewermodel"); animdropmenu.addSelectionListener(AnimChangeHandler()) glass.GUI_ScreenAddWidget("modeltest", animdropmenu) modeltomain = glass.GlassButton("Main Menu") modeltomain.setPosition(0, 0) modeltomain.setClickAction("GUI_ShowScreen('mainmenu')") glass.GUI_ScreenAddWidget("modeltest", modeltomain)
def build_graphics(self): table = GlassTablePlus(); table.setFrame(0); table.horizontalJustification = glass.Graphics.LEFT; videoResolution = glass.GlassDropMenu(); videoResolution.linkCvar("vid_mode"); videoResolution.addSelectionListener(reshandler); i=1; mode = cvar_get("vid_mode"+str(i)); while len(mode) > 0: videoResolution.addOption(mode, mode); i += 1; mode = cvar_get("vid_mode"+str(i)); table.addRow( "Video Resolution" , videoResolution ); fullscreen = glass.GlassCheckbox(); fullscreen.linkCvar("vid_fullscreen"); fullscreen.addSelectionListener(reshandler); table.addRow( "Full Screen", fullscreen ); fov = glass.GlassDropMenu(); fov.linkCvar("cl_fov"); fov.addOption("4:3", "90"); fov.addOption("16:9", "110"); fov.addOption("16:10", "100"); table.addRow( "Frame", fov); gamma = glass.GlassSlider(); gamma.linkCvar( "vid_gamma" ); gamma.setScaleEnd(2.5); gamma.setScaleStart(0.5); table.addRow( "Brightness" , gamma ); showArmor = glass.GlassCheckbox(); showArmor.linkCvar( "cl_showLevelArmor"); table.addRow( "Show Armor" , showArmor ); showImpacts = glass.GlassCheckbox(); showImpacts.linkCvar("cl_collisionDecals"); table.addRow( "Show Impact Effects", showImpacts); showBlood = glass.GlassCheckbox(); showBlood.linkCvar("cl_bloodSplatter"); table.addRow( "Show Blood Splatter", showBlood ); antiAliasing = glass.GlassDropMenu(); antiAliasing.linkCvar("vid_multisample"); antiAliasing.addOption("None", "0"); antiAliasing.addOption("2x", "2"); antiAliasing.addOption("4x", "4"); antiAliasing.addSelectionListener(reshandler); table.addRow( "Anti-Aliasing", antiAliasing ); showClouds = glass.GlassCheckbox(); showClouds.linkCvar("gfx_clouds"); table.addRow( "Show Clouds", showClouds ); useShaders = glass.GlassDropMenu(); useShaders.linkCvar("gfx_GLSLQuality"); useShaders.addOption("^900Off", "0"); useShaders.addOption("Low", "1"); useShaders.addOption("High", "3"); table.addRow( "Shaders", useShaders); forceSoft = glass.GlassCheckbox(); forceSoft.linkCvar("gfx_forceSoftware"); table.addRow( "Force CPU Animation", forceSoft ); showGrass = glass.GlassCheckbox(); showGrass.linkCvar("gfx_grass"); table.addRow( "Show Grass", showGrass ); grassFalloff = glass.GlassDropMenu(); grassFalloff.linkCvar("gfx_grassRange") grassFalloff.addOption("Near","500"); grassFalloff.addOption("Far","1500"); grassFalloff.addOption("Very Far","3500"); table.addRow( "Grass Falloff", grassFalloff ); showShadows = glass.GlassDropMenu(); showShadows.linkCvar("gfx_shadow"); showShadows.addOption("Off", "0"); showShadows.addOption("Fast", "1"); showShadows.addOption("Nice", "3"); table.addRow( "Shadows", showShadows); postProcMaster = glass.GlassCheckbox(); postProcMaster.linkCvar("gfx_postProcessing"); #TODO: disable the other post proc checkboxes if this is disabled table.addRow( "Post-Processing", postProcMaster); postBloom = glass.GlassCheckbox(); postBloom.linkCvar("gfx_postBloom"); table.addRow( " Bloom Filter", postBloom); postMotion = glass.GlassCheckbox(); postMotion.linkCvar("gfx_postMotion"); table.addRow( " Motion Blur", postMotion); showGlow = glass.GlassCheckbox(); showGlow.linkCvar("gfx_glowFilter"); table.addRow( " Glow Filter", showGlow ); postWater = glass.GlassCheckbox(); postWater.linkCvar("gfx_postWater"); table.addRow( " Water Effects", postWater); postSSAO = glass.GlassCheckbox(); postSSAO.linkCvar("gfx_postSSAO"); table.addRow( " Ambient Occlusion", postSSAO); table.adjustSizeTo(); tableHolder = glass.GlassScrollArea(table); tableHolder.setSize(table.getWidth(), table.getHeight()); return tableHolder;
def build_config(self): table = GlassTablePlus(); table.setFrame(0); table.horizontalJustification = glass.Graphics.LEFT; self.nickname = glass.GlassTextField( cvar_get("name") ); self.nickname.setSize(150, 25); table.addRow( "Nickname", self.nickname ); blockLeap = glass.GlassCheckbox(); blockLeap.linkCvar("cl_blockLeapSwitch"); table.addRow("Block / Leap Switch", blockLeap); chatFilter = glass.GlassCheckbox(); chatFilter.linkCvar("cl_filter_filter"); table.addRow( "Chat Filter", chatFilter ); chatTimestamp = glass.GlassDropMenu(); chatTimestamp.linkCvar("gui_chatTimestamp"); chatTimestamp.addOption("Off","0"); chatTimestamp.addOption("Game Time","1"); chatTimestamp.addOption("Local Time","2"); table.addRow("Chat Timestamp", chatTimestamp); showFPS = glass.GlassDropMenu(); showFPS.linkCvar("cl_showfps"); showFPS.addOption("Off","0"); showFPS.addOption("Instant","1"); showFPS.addOption("Average","2"); showFPS.addOption("Both","3"); table.addRow("Show FPS", showFPS); showServerFPS = glass.GlassCheckbox(); showServerFPS.linkCvar("cl_showfpsserver"); table.addRow("Show Server FPS",showServerFPS); showPing = glass.GlassCheckbox(); showPing.linkCvar("cl_showping"); table.addRow("Show Ping", showPing); showTeamStatus = glass.GlassCheckbox(); showTeamStatus.linkCvar("gui_showteamstatus"); table.addRow("Show Team Status",showTeamStatus); autoRecordDemos = glass.GlassCheckbox(); autoRecordDemos.linkCvar("cl_autoRecordDemo"); table.addRow("Auto-Record Demos",autoRecordDemos); showSquadMates = glass.GlassCheckbox(); showSquadMates.linkCvar("cl_show_squad"); table.addRow("Show Squad Mates",showSquadMates); #not sure if this is the right var #there's also cl_show_squad_comm cameraView = glass.GlassDropMenu(); cameraView.linkCvar("cl_cameraPosLerp"); cameraView.addOption("Smoothed","6"); cameraView.addOption("Snappy","9999"); table.addRow("Camera Snap",cameraView); cameraSmoothing = glass.GlassDropMenu(); cameraSmoothing.linkCvar("cl_cameraAngleLerp"); cameraSmoothing.addOption("Snap","9999"); cameraSmoothing.addOption("Quick","50"); cameraSmoothing.addOption("Smooth","35"); cameraSmoothing.addOption("Very Smooth","15"); cameraSmoothing.addOption("Demo Spectate","5"); #based on two things: XR GUI and that I like 15 myself :P #with that said, people like to tweak this var a lot, perhaps it ought to be a slider table.addRow("Camera Smoothing",cameraSmoothing); minimapAlpha = glass.GlassSlider(); minimapAlpha.linkCvar("cl_minimap_brightness"); table.addRow("Minimap Alpha", minimapAlpha); #TODO toggle third person camera when using a ranged weapon? #Crosshair colors here? #Commander Tweaks for the Options tableHolder = glass.GlassScrollArea(table); tableHolder.setSize(table.getWidth(), table.getHeight()); return tableHolder;