settings_gui.c
changeset 5141 05a806850445
parent 5116 2a33a74925c5
child 5163 83acad83bbdd
equal deleted inserted replaced
5140:3d58647a202a 5141:05a806850445
   717 		x = 5;
   717 		x = 5;
   718 		y = 47;
   718 		y = 47;
   719 		for (i = 0; i != page->num; i++) {
   719 		for (i = 0; i != page->num; i++) {
   720 			const SettingDesc *sd = page->entries[i].setting;
   720 			const SettingDesc *sd = page->entries[i].setting;
   721 			const SettingDescBase *sdb = &sd->desc;
   721 			const SettingDescBase *sdb = &sd->desc;
   722 			const void *var = ini_get_variable(&sd->save, patches_ptr);
   722 			const void *var = GetVariableAddress(patches_ptr, &sd->save);
   723 			bool editable = true;
   723 			bool editable = true;
   724 			bool disabled = false;
   724 			bool disabled = false;
   725 
   725 
   726 			// We do not allow changes of some items when we are a client in a networkgame
   726 			// We do not allow changes of some items when we are a client in a networkgame
   727 			if (!(sd->save.conv & SLF_NETWORK_NO) && _networking && !_network_server) editable = false;
   727 			if (!(sd->save.conv & SLF_NETWORK_NO) && _networking && !_network_server) editable = false;
   786 
   786 
   787 			/* return if action is only active in network, or only settable by server */
   787 			/* return if action is only active in network, or only settable by server */
   788 			if ((sd->desc.flags & SGF_NETWORK_ONLY) && !_networking) return;
   788 			if ((sd->desc.flags & SGF_NETWORK_ONLY) && !_networking) return;
   789 			if (!(sd->save.conv & SLF_NETWORK_NO) && _networking && !_network_server) return;
   789 			if (!(sd->save.conv & SLF_NETWORK_NO) && _networking && !_network_server) return;
   790 
   790 
   791 			var = ini_get_variable(&sd->save, patches_ptr);
   791 			var = GetVariableAddress(patches_ptr, &sd->save);
   792 			value = (int32)ReadValue(var, sd->save.conv);
   792 			value = (int32)ReadValue(var, sd->save.conv);
   793 
   793 
   794 			/* clicked on the icon on the left side. Either scroller or bool on/off */
   794 			/* clicked on the icon on the left side. Either scroller or bool on/off */
   795 			if (x < 21) {
   795 			if (x < 21) {
   796 				const SettingDescBase *sdb = &sd->desc;
   796 				const SettingDescBase *sdb = &sd->desc;