MultipleMaids.Gui.cs 410 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080
  1. using ExIni;
  2. using MyRoomCustom;
  3. using System;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Text;
  9. using UnityEngine;
  10. using UnityEngine.Rendering;
  11. using Object = UnityEngine.Object;
  12. namespace CM3D2.MultipleMaids.Plugin
  13. {
  14. public partial class MultipleMaids
  15. {
  16. public void OnGUI()
  17. {
  18. for (int index1 = 0; index1 < maidCnt; ++index1)
  19. {
  20. if (isPoseIti[index1])
  21. {
  22. Maid maid = maidArray[index1];
  23. isPoseIti[index1] = false;
  24. maid.transform.position = poseIti[index1];
  25. Vector3 eulerAngles = maid.transform.eulerAngles;
  26. for (int index2 = 0; index2 < 10; ++index2)
  27. {
  28. Transform transform1 = maid.transform;
  29. Vector3 position1 = maid.transform.position;
  30. Vector3 right = Vector3.right;
  31. Quaternion rotation = maid.transform.rotation;
  32. double num1 = -rotation.eulerAngles.x;
  33. transform1.RotateAround(position1, right, (float)num1);
  34. Transform transform2 = maid.transform;
  35. Vector3 position2 = maid.transform.position;
  36. Vector3 forward = Vector3.forward;
  37. rotation = maid.transform.rotation;
  38. double num2 = -rotation.eulerAngles.z;
  39. transform2.RotateAround(position2, forward, (float)num2);
  40. }
  41. Transform transform = CMT.SearchObjName(maid.body0.m_Bones.transform, "Bip01", true);
  42. transform.position = new Vector3(poseIti[index1].x, transform.position.y, poseIti[index1].z);
  43. maid.transform.eulerAngles = eulerAngles;
  44. }
  45. }
  46. GUIStyle style = GUI.skin.box;
  47. style.fontSize = GetPix(11);
  48. style.alignment = TextAnchor.UpperRight;
  49. if (isGuiInit || screenSize != new Vector2(Screen.width, Screen.height))
  50. {
  51. screenSize = new Vector2(Screen.width, Screen.height);
  52. isGuiInit = false;
  53. rectWin2.width = Screen.width * 0.4f;
  54. rectWin2.height = Screen.height * 0.15f;
  55. rectWin2.x = (float)(Screen.width / 2.0 - rectWin2.width / 2.0);
  56. rectWin2.y = sceneLevel != 5
  57. ? Screen.height - rectWin2.height
  58. : Screen.height * 0.94f - rectWin2.height;
  59. rectWin.width = GetPix(kankyoFlg || kankyo2Flg ? 220 : 180);
  60. rectWin.height = Screen.height * 0.9f;
  61. rectWin.x = Screen.width - rectWin.width;
  62. rectWin.y = GetPix(65);
  63. }
  64. if (bGuiMessage)
  65. {
  66. rectWin2.width = Screen.width * 0.4f;
  67. rectWin2.height = Screen.height * 0.15f;
  68. rectWin2.x = Mathf.Clamp(rectWin2.x, -rectWin2.width + GetPix(20), Screen.width - GetPix(20));
  69. rectWin2.y = Mathf.Clamp(rectWin2.y, -rectWin2.height + GetPix(20), Screen.height - GetPix(20));
  70. rectWin2 = GUI.Window(130, rectWin2, MessageWindow, "", style);
  71. }
  72. if (bGui)
  73. {
  74. rectWin.x = Mathf.Clamp(rectWin.x, 0, Screen.width - rectWin.width);
  75. rectWin.y = Mathf.Clamp(rectWin.y, -rectWin.height + GetPix(20), Screen.height - GetPix(20));
  76. rectWin.height = Screen.height * 0.9f;
  77. rectWin.width = GetPix(kankyoFlg || kankyo2Flg ? 220 : 180);
  78. if (sceneLevel == 5 || sceneLevel == 14)
  79. rectWin.height *= 0.85f;
  80. comboBoxControl.height = rectWin.height;
  81. faceCombo.height = rectWin.height;
  82. poseCombo.height = rectWin.height;
  83. poseGroupCombo.height = rectWin.height;
  84. itemCombo.height = rectWin.height;
  85. bgmCombo.height = rectWin.height;
  86. itemCombo2.height = rectWin.height;
  87. bgCombo2.height = rectWin.height;
  88. kankyoCombo.height = rectWin.height;
  89. bgCombo.height = rectWin.height;
  90. slotCombo.height = rectWin.height;
  91. doguCombo.height = rectWin.height;
  92. parCombo.height = rectWin.height;
  93. lightCombo.height = rectWin.height;
  94. GameMain.Instance.MainCamera.SetControl(true);
  95. if (!sceneFlg && !faceFlg && !poseFlg && !kankyoFlg && !kankyo2Flg && !isF6 && okFlg)
  96. {
  97. rectWin = GUI.Window(129, rectWin, MaidCallWindow, "", style);
  98. }
  99. else if (sceneFlg)
  100. {
  101. rectWin = GUI.Window(129, rectWin, SaveSceneWindow, "", style);
  102. Rect rect = default;
  103. dispNo = 0;
  104. for (int index = 0; index < 10; ++index)
  105. {
  106. rect = new Rect(0.0f, 0.0f, GetPix(170), GetPix(36));
  107. rect.x = rectWin.x;
  108. rect.y = rectWin.y - saveSceneScrollPos.y + GetPix(64 + 50 * index);
  109. if (rect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
  110. {
  111. dispNo = index + 1;
  112. break;
  113. }
  114. }
  115. if (saveScene2 > 0)
  116. {
  117. dispNo = 0;
  118. }
  119. if (dispNo == 0)
  120. {
  121. texture2D = null;
  122. dispNoOld = 0;
  123. }
  124. else if (dispNo != dispNoOld)
  125. {
  126. dispNoOld = dispNo;
  127. texture2D = null;
  128. try
  129. {
  130. IniKey iniKey = Preferences["scene"]["ss" + (page * 10 + dispNo)];
  131. if (iniKey.Value != null && iniKey.Value != "")
  132. {
  133. byte[] data = Convert.FromBase64String(iniKey.Value);
  134. texture2D = new Texture2D(1, 1, TextureFormat.ARGB32, false);
  135. texture2D.LoadImage(data);
  136. }
  137. }
  138. catch { }
  139. }
  140. if (texture2D != null)
  141. {
  142. if (waku == null)
  143. {
  144. waku = MakeTex(2, 2, new Color(1f, 1f, 1f, 1f));
  145. waku2 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.4f));
  146. }
  147. Rect position1 = new Rect(rect.x - texture2D.width - GetPix(18),
  148. rect.y - texture2D.height / 2 + GetPix(12),
  149. texture2D.width + GetPix(12),
  150. texture2D.height + GetPix(12));
  151. Rect position2 = new Rect(rect.x - texture2D.width - GetPix(12),
  152. rect.y - texture2D.height / 2 + GetPix(18),
  153. texture2D.width,
  154. texture2D.height);
  155. Rect position3 = new Rect(rect.x - texture2D.width - GetPix(16),
  156. rect.y - texture2D.height / 2 + GetPix(14),
  157. texture2D.width + GetPix(12),
  158. texture2D.height + GetPix(12));
  159. if (position1.y + (double)position1.height > Screen.height)
  160. {
  161. float num = position3.y + position3.height - Screen.height;
  162. position1.y -= num;
  163. position2.y -= num;
  164. position3.y -= num;
  165. }
  166. if (position1.y < 0)
  167. {
  168. position3.y -= position1.y;
  169. position2.y -= position1.y;
  170. position1.y -= position1.y;
  171. }
  172. if (rect.x + rect.width / 2 <= Screen.width / 2)
  173. {
  174. float offset = texture2D.width + rect.width + GetPix(24);
  175. position1.x += offset;
  176. position2.x += offset;
  177. position3.x += offset;
  178. }
  179. GUI.DrawTexture(position3, waku2);
  180. GUI.DrawTexture(position1, waku);
  181. GUI.DrawTexture(position2, texture2D);
  182. }
  183. }
  184. else if (kankyoFlg)
  185. {
  186. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  187. && rectWin.Contains(Event.current.mousePosition)
  188. && Input.GetMouseButtonDown(0))
  189. {
  190. Input.ResetInputAxes();
  191. }
  192. rectWin = GUI.Window(129, rectWin, BGSelectWindow, "", style);
  193. }
  194. else if (kankyo2Flg)
  195. {
  196. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  197. && rectWin.Contains(Event.current.mousePosition)
  198. && Input.GetMouseButtonDown(0))
  199. {
  200. Input.ResetInputAxes();
  201. }
  202. rectWin = GUI.Window(129, rectWin, BGSelectWindow2, "", style);
  203. }
  204. else if (poseFlg)
  205. {
  206. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  207. && rectWin.Contains(Event.current.mousePosition)
  208. && Input.GetMouseButtonDown(0))
  209. {
  210. Input.ResetInputAxes();
  211. }
  212. rectWin = GUI.Window(129, rectWin, PoseWindow, "", style);
  213. }
  214. else // implies faceFlg == true
  215. {
  216. if (!yotogiFlg && sceneLevel != 3 && sceneLevel != 5
  217. && rectWin.Contains(Event.current.mousePosition)
  218. && Input.GetMouseButtonDown(0))
  219. {
  220. Input.ResetInputAxes();
  221. }
  222. rectWin = GUI.Window(129, rectWin, FaceWindow, "", style);
  223. }
  224. }
  225. }
  226. private void SaveSceneWindow(int winID)
  227. {
  228. GUIStyle style1 = "label";
  229. style1.fontSize = GetPix(12);
  230. style1.alignment = TextAnchor.UpperLeft;
  231. GUIStyle style2 = "button";
  232. style2.fontSize = GetPix(12);
  233. style2.alignment = TextAnchor.MiddleCenter;
  234. GUI.Label(new Rect(GetPix(50), GetPix(6), GetPix(100), GetPix(25)),
  235. "シーン管理",
  236. style1);
  237. if (GUI.Button(new Rect(GetPix(135), GetPix(3), GetPix(23), GetPix(23)),
  238. "→",
  239. style2))
  240. {
  241. faceFlg = false;
  242. poseFlg = false;
  243. sceneFlg = false;
  244. kankyoFlg = true;
  245. kankyo2Flg = false;
  246. bGui = true;
  247. copyIndex = 0;
  248. }
  249. if (GUI.Button(new Rect(GetPix(25), GetPix(31), GetPix(23), GetPix(23)),
  250. "<",
  251. style2))
  252. {
  253. saveSceneScrollPos.y = 0.0f;
  254. --page;
  255. if (page < 0)
  256. {
  257. page = maxPage - 1;
  258. }
  259. for (int index = 0; index < 10; ++index)
  260. {
  261. date[index] = "未保存";
  262. ninzu[index] = "";
  263. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + index + 1)];
  264. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  265. {
  266. string[] strArray1 = iniKey.Value.Split('_');
  267. if (strArray1.Length >= 2)
  268. {
  269. string[] strArray2 = strArray1[0].Split(',');
  270. date[index] = strArray2[0];
  271. ninzu[index] = strArray2[1] + "人";
  272. }
  273. }
  274. }
  275. }
  276. if (GUI.Button(new Rect(GetPix(115), GetPix(31), GetPix(23), GetPix(23)),
  277. ">",
  278. style2))
  279. {
  280. saveSceneScrollPos.y = 0.0f;
  281. ++page;
  282. if (page >= maxPage)
  283. {
  284. page = 0;
  285. }
  286. for (int index = 0; index < 10; ++index)
  287. {
  288. date[index] = "未保存";
  289. ninzu[index] = "";
  290. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + index + 1)];
  291. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  292. {
  293. string[] strArray1 = iniKey.Value.Split('_');
  294. if (strArray1.Length >= 2)
  295. {
  296. string[] strArray2 = strArray1[0].Split(',');
  297. date[index] = strArray2[0];
  298. ninzu[index] = strArray2[1] + "人";
  299. }
  300. }
  301. }
  302. }
  303. GUI.Label(new Rect(GetPix(60), GetPix(32), GetPix(100), GetPix(25)),
  304. (page * 10 + 1).ToString() + " ~ " + (page * 10 + 10),
  305. style1);
  306. if (saveScene2 > 0 && string.IsNullOrEmpty(thum_byte_to_base64_) && File.Exists(thum_file_path_))
  307. {
  308. try
  309. {
  310. Texture2D tex = new Texture2D(1, 1, TextureFormat.ARGB32, false);
  311. tex.LoadImage(File.ReadAllBytes(thum_file_path_));
  312. float num2 = tex.width / (float)tex.height;
  313. Vector2 vector2 = new Vector2(480f, 270f);
  314. int newWidth = tex.width;
  315. int newHeight = tex.height;
  316. if (vector2.x < (double)tex.width && vector2.y < (double)tex.height)
  317. {
  318. newWidth = (int)vector2.x;
  319. newHeight = Mathf.RoundToInt(newWidth / num2);
  320. if (vector2.y < (double)newHeight)
  321. {
  322. newHeight = (int)vector2.y;
  323. newWidth = Mathf.RoundToInt(newHeight * num2);
  324. }
  325. }
  326. else if (vector2.x < (double)tex.width)
  327. {
  328. newWidth = (int)vector2.x;
  329. newHeight = Mathf.RoundToInt(newWidth / num2);
  330. }
  331. else if (vector2.y < (double)tex.height)
  332. {
  333. newHeight = (int)vector2.y;
  334. newWidth = Mathf.RoundToInt(newHeight * num2);
  335. }
  336. TextureScale.Bilinear(tex, newWidth, newHeight);
  337. thum_byte_to_base64_ = Convert.ToBase64String(tex.EncodeToPNG());
  338. DestroyImmediate(tex);
  339. Preferences["scene"]["ss" + saveScene2].Value = thum_byte_to_base64_;
  340. SaveConfig();
  341. thum_file_path_ = "";
  342. saveScene2 = 0;
  343. }
  344. catch { }
  345. }
  346. int offsetTop = GetPix(31) + GetPix(23) + GetPix(5);
  347. int UIHeight = GetPix(500);
  348. Rect saveSceneScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  349. Rect saveSceneScrollView = new Rect(0, 0, rectWin.width - 20, UIHeight);
  350. saveSceneScrollPos = GUI.BeginScrollView(saveSceneScrollRect, saveSceneScrollPos, saveSceneScrollView);
  351. int saveSlotOffset = 50;
  352. for (int index = 0; index < 10; ++index)
  353. {
  354. GUI.Label(new Rect(GetPix(5),
  355. GetPix(saveSlotOffset * index),
  356. GetPix(25),
  357. GetPix(25)),
  358. string.Concat(page * 10 + index + 1),
  359. style1);
  360. GUI.Label(new Rect(GetPix(25),
  361. GetPix(saveSlotOffset * index),
  362. GetPix(100),
  363. GetPix(25)),
  364. date[index],
  365. style1);
  366. GUI.Label(new Rect(GetPix(130),
  367. GetPix(saveSlotOffset * index),
  368. GetPix(100),
  369. GetPix(25)),
  370. ninzu[index],
  371. style1);
  372. if (GUI.Button(new Rect(GetPix(20),
  373. GetPix(18 + saveSlotOffset * index),
  374. GetPix(50),
  375. GetPix(20)),
  376. "保存",
  377. style2))
  378. {
  379. saveScene = page * 10 + index + 1;
  380. saveScene2 = saveScene;
  381. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  382. isScreen2 = true;
  383. if (!isMessage)
  384. {
  385. ui_cam_hide_list_.Clear();
  386. foreach (UICamera uiCamera in NGUITools.FindActive<UICamera>())
  387. {
  388. if (uiCamera.GetComponent<Camera>().enabled)
  389. {
  390. uiCamera.GetComponent<Camera>().enabled = false;
  391. ui_cam_hide_list_.Add(uiCamera);
  392. }
  393. }
  394. }
  395. else
  396. {
  397. editUI = GameObject.Find("/UI Root/Camera");
  398. if (editUI != null)
  399. {
  400. editUI.SetActive(false);
  401. }
  402. if (GameMain.Instance.CMSystem.ViewFps)
  403. {
  404. UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/FpsCounter", false).SetActive(false);
  405. }
  406. GameObject childObject1 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemDialog", false);
  407. GameObject childObject2 = UTY.GetChildObject(GameMain.Instance.gameObject, "SystemUI Root/SystemShortcut", false);
  408. childObject1.SetActive(false);
  409. childObject2.SetActive(false);
  410. }
  411. isGui = bGui;
  412. bGui = false;
  413. try
  414. {
  415. thum_byte_to_base64_ = string.Empty;
  416. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  417. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, true);
  418. }
  419. catch { }
  420. }
  421. if (date[index] != "未保存" && GUI.Button(new Rect(GetPix(100),
  422. GetPix(18 + saveSlotOffset * index),
  423. GetPix(50),
  424. GetPix(20)),
  425. "読込",
  426. style2))
  427. {
  428. loadScene = page * 10 + index + 1;
  429. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  430. }
  431. }
  432. GUI.EndScrollView();
  433. GUI.DragWindow();
  434. }
  435. private void BGSelectWindow2(int winID)
  436. {
  437. GUIStyle guiStyle1 = "label";
  438. guiStyle1.fontSize = GetPix(12);
  439. guiStyle1.alignment = TextAnchor.UpperLeft;
  440. GUIStyle style1 = "label";
  441. style1.fontSize = GetPix(11);
  442. style1.alignment = TextAnchor.UpperLeft;
  443. GUIStyle style2 = "button";
  444. style2.fontSize = GetPix(20);
  445. GUIStyle buttonStyle = "button";
  446. buttonStyle.fontSize = GetPix(14);
  447. buttonStyle.alignment = TextAnchor.MiddleLeft;
  448. GUIStyle guiStyle2 = "button";
  449. guiStyle2.fontSize = GetPix(12);
  450. guiStyle2.alignment = TextAnchor.MiddleLeft;
  451. GUIStyle style3 = new GUIStyle("toggle")
  452. {
  453. fontSize = GetPix(13)
  454. };
  455. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  456. Maid maid = maidArray[selectMaidIndex];
  457. if (!kankyo2InitFlg)
  458. {
  459. listStyle2.normal.textColor = Color.white;
  460. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  461. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  462. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  463. listStyle2.fontSize = GetPix(11);
  464. listStyle3.normal.textColor = Color.white;
  465. listStyle3.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  466. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  467. listStyle3.padding.left = listStyle3.padding.right = listStyle3.padding.top = GetPix(0);
  468. listStyle3.padding.bottom = GetPix(0);
  469. listStyle3.fontSize = GetPix(14);
  470. bgCombo2.selectedItemIndex = bgIndexB;
  471. bgCombo2List = new GUIContent[bgArray.Length];
  472. for (int index = 0; index < bgArray.Length; ++index)
  473. {
  474. bgCombo2List[index] = bgUiNames.TryGetValue(bgArray[index], out string name)
  475. ? new GUIContent(name)
  476. : new GUIContent(bgArray[index]);
  477. }
  478. slotCombo.selectedItemIndex = 0;
  479. slotComboList = slotArray.Select(s => slotUiNames.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  480. itemCombo2.selectedItemIndex = 0;
  481. itemCombo2List = itemBArray.Select(s => itemComboUiName.TryGetValue(s, out string name) ? name : s)
  482. .Select(s => new GUIContent(s)).ToArray();
  483. kankyoCombo.selectedItemIndex = 0;
  484. kankyoComboList = new GUIContent[kankyoMax];
  485. for (int index = 0; index < kankyoMax; ++index)
  486. {
  487. IniKey iniKey = Preferences["kankyo"]["kankyo" + (index + 1)];
  488. kankyoComboList[index] = new GUIContent(iniKey.Value);
  489. }
  490. kankyo2InitFlg = true;
  491. }
  492. listStyle3.padding.top = GetPix(1);
  493. listStyle3.padding.bottom = GetPix(0);
  494. listStyle3.fontSize = GetPix(13);
  495. if (poseCombo.isClickedComboButton)
  496. {
  497. GUI.enabled = false;
  498. }
  499. if (poseGroupCombo.isClickedComboButton)
  500. {
  501. GUI.enabled = false;
  502. }
  503. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  504. {
  505. if (!isF6)
  506. {
  507. bool flag = true;
  508. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  509. {
  510. flag = false;
  511. }
  512. if (GUI.Toggle(new Rect(GetPix(2),
  513. GetPix(2),
  514. GetPix(39),
  515. GetPix(20)),
  516. flag,
  517. "配置",
  518. style3))
  519. {
  520. faceFlg = false;
  521. poseFlg = false;
  522. sceneFlg = false;
  523. kankyoFlg = false;
  524. kankyo2Flg = false;
  525. bGui = true;
  526. }
  527. }
  528. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(42),
  529. GetPix(2),
  530. GetPix(39),
  531. GetPix(20)),
  532. poseFlg,
  533. "操作",
  534. style3))
  535. {
  536. poseFlg = true;
  537. faceFlg = false;
  538. sceneFlg = false;
  539. kankyoFlg = false;
  540. kankyo2Flg = false;
  541. }
  542. if (GUI.Toggle(new Rect(GetPix(82), GetPix(2), GetPix(39), GetPix(20)),
  543. faceFlg,
  544. "表情",
  545. style3))
  546. {
  547. faceFlg = true;
  548. poseFlg = false;
  549. sceneFlg = false;
  550. kankyoFlg = false;
  551. kankyo2Flg = false;
  552. if (!faceFlg2)
  553. {
  554. isFaceInit = true;
  555. faceFlg2 = true;
  556. maidArray[selectMaidIndex].boMabataki = false;
  557. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  558. }
  559. isFaceInit = true;
  560. }
  561. if (GUI.Toggle(new Rect(GetPix(122), GetPix(2), GetPix(39), GetPix(20)),
  562. kankyoFlg,
  563. "環境",
  564. style3))
  565. {
  566. poseFlg = false;
  567. faceFlg = false;
  568. sceneFlg = false;
  569. kankyoFlg = true;
  570. kankyo2Flg = false;
  571. }
  572. if (GUI.Toggle(new Rect(GetPix(162), GetPix(2), GetPix(39), GetPix(20)),
  573. kankyo2Flg,
  574. "環2",
  575. style3))
  576. {
  577. poseFlg = false;
  578. faceFlg = false;
  579. sceneFlg = false;
  580. kankyoFlg = false;
  581. kankyo2Flg = true;
  582. }
  583. if (!line1)
  584. {
  585. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  586. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  587. }
  588. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 2f), line1);
  589. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 1f), line2);
  590. }
  591. if (isDanceStop)
  592. {
  593. isStop[selectMaidIndex] = true;
  594. isDanceStop = false;
  595. }
  596. if (kankyoCombo.isClickedComboButton || slotCombo.isClickedComboButton
  597. || itemCombo2.isClickedComboButton || bgCombo2.isClickedComboButton)
  598. {
  599. GUI.enabled = false;
  600. }
  601. if (!modItemsOnly)
  602. {
  603. bool previousGUIState = GUI.enabled;
  604. GUI.enabled = slotIndex > 1;
  605. modItemsToggle = GUI.Toggle(new Rect(GetPix(156),
  606. GetPix(115),
  607. GetPix(50),
  608. GetPix(20)),
  609. modItemsToggle,
  610. "Mods",
  611. style3
  612. );
  613. GUI.enabled = previousGUIState;
  614. }
  615. int iconSize = GetPix(45);
  616. Rect position1;
  617. Rect viewRect;
  618. int bg2ItemCount = slotIndex == 1 ?
  619. creativeSortList.Count :
  620. (!modItemsOnly && modItemsToggle) ?
  621. numberOfModItems : sortList.Count;
  622. if (sceneLevel != 5)
  623. {
  624. position1 = new Rect(GetPix(7),
  625. GetPix(138),
  626. GetPix(44) * 4 + GetPix(20),
  627. rectWin.height - GetPix(148));
  628. viewRect = new Rect(0.0f,
  629. 0.0f,
  630. position1.width * 0.845f,
  631. Mathf.Ceil(bg2ItemCount / 4f) * iconSize + GetPix(10));
  632. }
  633. else
  634. {
  635. position1 = new Rect(GetPix(7),
  636. GetPix(138),
  637. GetPix(44) * 4 + GetPix(20),
  638. rectWin.height - GetPix(148));
  639. viewRect = new Rect(0.0f,
  640. 0.0f,
  641. position1.width * 0.845f,
  642. Mathf.Ceil(bg2ItemCount / 4f) * iconSize + GetPix(10));
  643. }
  644. bg2ScrollPos = GUI.BeginScrollView(position1, bg2ScrollPos, viewRect);
  645. int bg2Index = 0;
  646. List<SortItem> bg2List = slotIndex == 1 ? creativeSortList : sortList;
  647. foreach (SortItem sortItem in bg2List)
  648. {
  649. if (slotIndex > 1 && modItemsToggle && !sortItem.isMod)
  650. {
  651. continue;
  652. }
  653. Rect position2 = new Rect(
  654. bg2Index % 4 * iconSize,
  655. bg2Index / 4 * iconSize,
  656. iconSize,
  657. iconSize
  658. );
  659. if (GUI.Button(position2, ""))
  660. {
  661. GameObject gameObject = null;
  662. if (slotIndex > 1)
  663. {
  664. string menu = sortItem.menu;
  665. byte[] modBuf = null;
  666. bool ready = true;
  667. if (sortItem.isOfficialMod)
  668. {
  669. menu = sortItem.baseMenu;
  670. using (FileStream fileStream = new FileStream(sortItem.menu, FileMode.Open))
  671. {
  672. if (fileStream == null)
  673. {
  674. ready = false;
  675. }
  676. else
  677. {
  678. modBuf = new byte[fileStream.Length];
  679. fileStream.Read(modBuf, 0, (int)fileStream.Length);
  680. }
  681. }
  682. }
  683. byte[] menuBuf = null;
  684. using (AFileBase afileBase = GameUty.FileOpen(menu, null))
  685. {
  686. if (ready = afileBase.IsValid())
  687. {
  688. menuBuf = afileBase.ReadAll();
  689. }
  690. }
  691. if (ready)
  692. {
  693. string[] meshInfo = ProcScriptBin(menuBuf);
  694. gameObject = ImportCM2.LoadSkinMesh_R(meshInfo[0], meshInfo, 1);
  695. gameObject.name = menu;
  696. if (sortItem.isOfficialMod)
  697. {
  698. gameObject.name += $"#{Path.GetFileName(sortItem.menu)}";
  699. ProcModScriptBin(modBuf, gameObject);
  700. }
  701. }
  702. }
  703. else
  704. {
  705. // My Room Custom content
  706. PlacementData.Data data = PlacementData.GetData(int.Parse(sortItem.menu));
  707. gameObject = Instantiate(data.GetPrefab());
  708. gameObject.name = $"creative_{sortItem.baseMenu}";
  709. }
  710. if (gameObject != null)
  711. {
  712. doguBObject.Add(gameObject);
  713. gameObject.transform.position = new Vector3(0, 0, 0.4f);
  714. doguCnt = doguBObject.Count - 1;
  715. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  716. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  717. gDogu[doguCnt].layer = 8;
  718. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  719. gDogu[doguCnt].SetActive(false);
  720. gDogu[doguCnt].transform.position = gameObject.transform.position;
  721. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  722. mDogu[doguCnt].isScale = false;
  723. mDogu[doguCnt].obj = gDogu[doguCnt];
  724. mDogu[doguCnt].maid = gameObject;
  725. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  726. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  727. mDogu[doguCnt].ido = 1;
  728. }
  729. }
  730. GUI.DrawTexture(position2, sortItem.tex);
  731. bg2Index++;
  732. }
  733. GUI.EndScrollView();
  734. GUI.enabled = true;
  735. GUI.Label(new Rect(GetPix(3), GetPix(108), GetPix(100), GetPix(25)),
  736. "服装",
  737. style1);
  738. style1.fontSize = GetPix(9);
  739. GUI.Label(new Rect(GetPix(3), GetPix(119), GetPix(100), GetPix(25)),
  740. "アクセサリ",
  741. style1);
  742. style1.fontSize = GetPix(11);
  743. GUI.Label(new Rect(GetPix(3), GetPix(58), GetPix(100), GetPix(25)),
  744. "アイテム",
  745. style1);
  746. GUI.Label(new Rect(GetPix(3), GetPix(86), GetPix(100), GetPix(24)),
  747. "背景(小)",
  748. style1);
  749. if (kankyoCombo.isClickedComboButton || itemCombo2.isClickedComboButton || bgCombo2.isClickedComboButton)
  750. {
  751. GUI.enabled = false;
  752. }
  753. int num1 =
  754. slotCombo.List(new Rect(GetPix(51),
  755. GetPix(111),
  756. GetPix(100),
  757. GetPix(23)),
  758. slotComboList[slotIndex].text,
  759. slotComboList,
  760. buttonStyle,
  761. "box",
  762. listStyle3);
  763. GUI.enabled = true;
  764. if (kankyoCombo.isClickedComboButton || itemCombo2.isClickedComboButton)
  765. {
  766. GUI.enabled = false;
  767. }
  768. bgIndexB =
  769. bgCombo2.List(new Rect(GetPix(51),
  770. GetPix(83),
  771. GetPix(100),
  772. GetPix(23)),
  773. bgCombo2List[bgIndexB].text,
  774. bgCombo2List,
  775. buttonStyle,
  776. "box",
  777. listStyle3);
  778. if (GUI.Button(new Rect(GetPix(156), GetPix(83), GetPix(38), GetPix(23)),
  779. "追加",
  780. style2))
  781. {
  782. Object original = GameMain.Instance.BgMgr.CreateAssetBundle(bgArray[bgIndexB]);
  783. if (original == null)
  784. {
  785. original = Resources.Load("BG/" + bgArray[bgIndexB]);
  786. }
  787. GameObject gameObject = Instantiate(original) as GameObject;
  788. doguBObject.Add(gameObject);
  789. gameObject.name = "BG_" + bgArray[bgIndexB];
  790. Vector3 zero1 = Vector3.zero;
  791. Vector3 zero2 = Vector3.zero;
  792. zero1.z = 0.4f;
  793. gameObject.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
  794. gameObject.transform.localPosition = zero1;
  795. gameObject.transform.localRotation = Quaternion.Euler(zero2);
  796. doguCnt = doguBObject.Count - 1;
  797. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  798. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  799. gDogu[doguCnt].layer = 8;
  800. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  801. gDogu[doguCnt].SetActive(false);
  802. gDogu[doguCnt].transform.position = gameObject.transform.position;
  803. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  804. mDogu[doguCnt].isScale = false;
  805. mDogu[doguCnt].obj = gDogu[doguCnt];
  806. mDogu[doguCnt].maid = gameObject;
  807. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  808. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  809. mDogu[doguCnt].ido = 1;
  810. }
  811. GUI.enabled = true;
  812. if (kankyoCombo.isClickedComboButton)
  813. {
  814. GUI.enabled = false;
  815. }
  816. itemIndexB =
  817. itemCombo2.List(new Rect(GetPix(51),
  818. GetPix(55),
  819. GetPix(100),
  820. GetPix(23)),
  821. itemCombo2List[itemIndexB].text,
  822. itemCombo2List,
  823. buttonStyle,
  824. "box",
  825. listStyle3);
  826. if (GUI.Button(new Rect(GetPix(156), GetPix(55), GetPix(38), GetPix(23)),
  827. "追加",
  828. style2))
  829. {
  830. string str = itemBArray[itemIndexB].Split(',')[1];
  831. byte[] f_byBuf = null;
  832. using (AFileBase afileBase = GameUty.FileOpen(str, null))
  833. {
  834. NDebug.Assert(afileBase.IsValid(), "メニューファイルが存在しません。 :" + str);
  835. if (f_byBuf == null || f_byBuf.Length < afileBase.GetSize())
  836. {
  837. f_byBuf = new byte[afileBase.GetSize()];
  838. }
  839. afileBase.Read(ref f_byBuf, afileBase.GetSize());
  840. }
  841. string[] filename2 = ProcScriptBin(f_byBuf);
  842. GameObject gameObject = ImportCM2.LoadSkinMesh_R(filename2[0], filename2, 1);
  843. doguBObject.Add(gameObject);
  844. gameObject.name = str;
  845. Vector3 zero1 = Vector3.zero;
  846. Vector3 zero2 = Vector3.zero;
  847. zero1.z = 0.4f;
  848. switch (itemIndexB)
  849. {
  850. case 0:
  851. zero2.z = 90f;
  852. zero1.y = 0.04f;
  853. goto case 19;
  854. case 1:
  855. zero2.z = 90f;
  856. goto case 19;
  857. case 4:
  858. zero2.x = 90f;
  859. goto case 19;
  860. case 19:
  861. case 20:
  862. case 21:
  863. case 22:
  864. case 23:
  865. switch (gameObject.name)
  866. {
  867. case "HandItemL_Etoile_Saucer_I_.menu":
  868. case "HandItemL_Karte_I_.menu":
  869. case "HandItemL_Katuramuki_Daikon_I_.menu":
  870. case "HandItemR_BeerBottle(cap_off)_I_.menu":
  871. case "HandItemR_BeerBottle(cap_on)_I_.menu":
  872. case "HandItemR_BeerGlass_I_.menu":
  873. case "HandItemR_Etoile_Teacup_I_.menu":
  874. case "HandItemR_Jyouro_I_.menu":
  875. case "HandItemR_Ketchup_I_.menu":
  876. case "HandItemR_Kobin_I_.menu":
  877. case "HandItemR_MelonSoda_I_.menu":
  878. case "HandItemR_MilkBottle(cap_off)_I_.menu":
  879. case "HandItemR_MilkBottle(cap_on)_I_.menu":
  880. case "HandItemR_Mugcup_I_.menu":
  881. case "HandItemR_Natumikan_I_.menu":
  882. case "HandItemR_Nei_Heartful_I_.menu":
  883. case "HandItemR_Ochoko_I_.menu":
  884. case "HandItemR_Shaker_I_.menu":
  885. case "HandItemR_SmartPhone_I_.menu":
  886. case "HandItemR_Suika_I_.menu":
  887. case "HandItemR_Tomato_I_.menu":
  888. case "HandItemR_TropicalGlass_I_.menu":
  889. case "HandItemR_cocktail_blue_I_.menu":
  890. case "HandItemR_cocktail_red_I_.menu":
  891. case "HandItemR_cocktail_yellow_I_.menu":
  892. case "HandItemR_smoothie_green_I_.menu":
  893. case "HandItemR_smoothie_red_I_.menu":
  894. zero2.x = 0.0f;
  895. zero2.z = 90f;
  896. break;
  897. case "HandItemL_Karaoke_Mike_I_.menu":
  898. case "HandItemR_Crops_Suika_I_.menu":
  899. case "HandItemR_Curry_I_.menu":
  900. case "HandItemR_DVD1_I_.menu":
  901. case "HandItemR_DVD2_I_.menu":
  902. case "HandItemR_DVD3_I_.menu":
  903. case "HandItemR_DVD4_I_.menu":
  904. case "HandItemR_DVD5_I_.menu":
  905. case "HandItemR_Folk_I_.menu":
  906. case "HandItemR_Hanabi_I_.menu":
  907. case "HandItemR_Kushiyaki_I_.menu":
  908. case "HandItemR_Ninjin_I_.menu":
  909. case "HandItemR_Omurice1_I_.menu":
  910. case "HandItemR_Omurice2_I_.menu":
  911. case "HandItemR_Omurice3_I_.menu":
  912. case "HandItemR_Pasta_I_.menu":
  913. case "HandItemR_Satumaimo_I_.menu":
  914. case "HandItemR_Scoop_I_.menu":
  915. case "HandItemR_Senkouhanabi_I_.menu":
  916. case "HandItemR_Shell_I_.menu":
  917. case "HandItemR_Spoon_Curry_I_.menu":
  918. case "HandItemR_Spoon_Omurice_I_.menu":
  919. case "HandItemR_Tomorokoshi_I_.menu":
  920. case "HandItemR_Tomorokoshi_yaki_I_.menu":
  921. case "HandItemR_Uchiwa_I_.menu":
  922. zero2.z = 90f;
  923. break;
  924. }
  925. gameObject.transform.localPosition = zero1;
  926. gameObject.transform.localRotation = Quaternion.Euler(zero2);
  927. doguCnt = doguBObject.Count - 1;
  928. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  929. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  930. gDogu[doguCnt].layer = 8;
  931. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  932. gDogu[doguCnt].SetActive(false);
  933. gDogu[doguCnt].transform.position = gameObject.transform.position;
  934. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  935. mDogu[doguCnt].isScale = false;
  936. mDogu[doguCnt].obj = gDogu[doguCnt];
  937. mDogu[doguCnt].maid = gameObject;
  938. mDogu[doguCnt].angles = gameObject.transform.eulerAngles;
  939. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  940. mDogu[doguCnt].ido = 1;
  941. break;
  942. case 25:
  943. zero2.z = 90f;
  944. goto case 19;
  945. case 26:
  946. zero2.z = 90f;
  947. goto case 19;
  948. case 27:
  949. zero2.z = 90f;
  950. goto case 19;
  951. default:
  952. zero2.x = -90f;
  953. goto case 19;
  954. }
  955. }
  956. GUI.enabled = true;
  957. if (nameFlg)
  958. {
  959. inName2 = GUI.TextField(new Rect(GetPix(5),
  960. GetPix(27),
  961. GetPix(100),
  962. GetPix(20)),
  963. inName2);
  964. if (GUI.Button(new Rect(GetPix(110),
  965. GetPix(27),
  966. GetPix(35),
  967. GetPix(20)),
  968. "更新",
  969. style2))
  970. {
  971. nameFlg = false;
  972. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  973. Preferences["kankyo"]["kankyo" + (kankyoCombo.selectedItemIndex + 1)].Value = inName2;
  974. SaveConfig();
  975. kankyoComboList = new GUIContent[kankyoMax];
  976. for (int index = 0; index < kankyoMax; ++index)
  977. {
  978. IniKey iniKey = Preferences["kankyo"]["kankyo" + (index + 1)];
  979. kankyoComboList[index] = new GUIContent(iniKey.Value);
  980. }
  981. }
  982. }
  983. else
  984. {
  985. if (GUI.Button(new Rect(GetPix(180),
  986. GetPix(27),
  987. GetPix(24),
  988. GetPix(20)),
  989. "名",
  990. style2))
  991. {
  992. nameFlg = true;
  993. inName2 = kankyoComboList[kankyoIndex].text;
  994. }
  995. kankyoIndex =
  996. kankyoCombo.List(new Rect(GetPix(4),
  997. GetPix(27),
  998. GetPix(91),
  999. GetPix(23)),
  1000. kankyoComboList[kankyoIndex].text,
  1001. kankyoComboList,
  1002. buttonStyle,
  1003. "box",
  1004. listStyle3);
  1005. if (GUI.Button(new Rect(GetPix(100),
  1006. GetPix(27),
  1007. GetPix(35),
  1008. GetPix(20)),
  1009. "保存",
  1010. style2))
  1011. {
  1012. saveScene = 10000 + kankyoIndex;
  1013. saveScene2 = saveScene;
  1014. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  1015. try
  1016. {
  1017. thum_byte_to_base64_ = string.Empty;
  1018. thum_file_path_ = Path.Combine(Path.GetTempPath(), "cm3d2_" + Guid.NewGuid().ToString() + ".png");
  1019. GameMain.Instance.MainCamera.ScreenShot(thum_file_path_, 1, false);
  1020. }
  1021. catch { }
  1022. }
  1023. GUI.enabled = false;
  1024. IniKey iniKey = Preferences["scene"]["s" + (10000 + kankyoIndex)];
  1025. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  1026. {
  1027. GUI.enabled = true;
  1028. }
  1029. if (GUI.Button(new Rect(GetPix(140),
  1030. GetPix(27),
  1031. GetPix(35),
  1032. GetPix(20)),
  1033. "読込",
  1034. style2))
  1035. {
  1036. loadScene = 10000 + kankyoIndex;
  1037. kankyoLoadFlg = true;
  1038. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  1039. }
  1040. }
  1041. GUI.enabled = true;
  1042. GUI.DragWindow();
  1043. if (num1 == slotIndex)
  1044. {
  1045. return;
  1046. }
  1047. numberOfModItems = 0;
  1048. slotIndex = num1;
  1049. sortList.Clear();
  1050. bg2ScrollPos = new Vector2(0.0f, 0.0f);
  1051. if (slotIndex == 0)
  1052. {
  1053. return;
  1054. }
  1055. else if (slotIndex == 1)
  1056. {
  1057. if (creativeSortList.Count == 0)
  1058. {
  1059. PlacementData.CreateData();
  1060. List<PlacementData.Data> creativeData = PlacementData.GetAllDatas(false);
  1061. creativeData = creativeData.OrderBy(data => data.categoryID).ThenBy(data => data.ID).ToList();
  1062. creativeSortList = new List<SortItem>(creativeData.Count);
  1063. foreach (var data in creativeData)
  1064. {
  1065. string asset = !string.IsNullOrEmpty(data.resourceName) ? data.resourceName : data.assetName;
  1066. SortItem item = new SortItem()
  1067. {
  1068. menu = data.ID.ToString(),
  1069. baseMenu = asset,
  1070. isCreative = true,
  1071. tex = data.GetThumbnail() as Texture2D
  1072. };
  1073. creativeSortList.Add(item);
  1074. }
  1075. }
  1076. }
  1077. else
  1078. {
  1079. if (itemDataList.Count == 0)
  1080. {
  1081. #region menu files
  1082. HashSet<string> modMenus = null;
  1083. if (!modItemsOnly)
  1084. {
  1085. modMenus = new HashSet<string>(GameUty.ModOnlysMenuFiles);
  1086. }
  1087. string[] menuFiles = modItemsOnly ? GameUty.ModOnlysMenuFiles : GameUty.MenuFiles;
  1088. foreach (string menuFile in menuFiles)
  1089. {
  1090. if (menuFile.EndsWith("_del.menu"))
  1091. {
  1092. continue;
  1093. }
  1094. byte[] buf;
  1095. using (AFileBase aFileBase = GameUty.FileOpen(menuFile))
  1096. {
  1097. if (!aFileBase.IsValid())
  1098. {
  1099. continue;
  1100. }
  1101. buf = aFileBase.ReadAll();
  1102. }
  1103. ItemData item = new ItemData()
  1104. {
  1105. menu = menuFile,
  1106. isMod = modItemsOnly || modMenus.Contains(menuFile)
  1107. };
  1108. BinaryReader binaryReader = new BinaryReader(new MemoryStream(buf), Encoding.UTF8);
  1109. if (binaryReader.ReadString() != "CM3D2_MENU")
  1110. {
  1111. binaryReader.Close();
  1112. }
  1113. else
  1114. {
  1115. try
  1116. {
  1117. binaryReader.ReadInt32();
  1118. binaryReader.ReadString();
  1119. item.name = binaryReader.ReadString();
  1120. item.category = binaryReader.ReadString();
  1121. binaryReader.ReadString();
  1122. binaryReader.ReadInt32();
  1123. bool run = true;
  1124. do
  1125. {
  1126. int size;
  1127. do
  1128. {
  1129. size = binaryReader.ReadByte();
  1130. } while (size == 0);
  1131. for (int index = 0; index < size; ++index)
  1132. {
  1133. string header = binaryReader.ReadString();
  1134. if (header == "icons" || header == "icon")
  1135. {
  1136. run = false;
  1137. item.icon = binaryReader.ReadString();
  1138. break;
  1139. }
  1140. if (header == "priority")
  1141. {
  1142. int.TryParse(binaryReader.ReadString(), out item.priority);
  1143. break;
  1144. }
  1145. }
  1146. } while (run);
  1147. itemDataList.Add(item);
  1148. }
  1149. catch { }
  1150. binaryReader.Close();
  1151. }
  1152. }
  1153. #endregion
  1154. #region mod files
  1155. foreach (string modFile in Menu.GetModFiles())
  1156. {
  1157. byte[] buf = null;
  1158. try
  1159. {
  1160. using (FileStream fileStream = new FileStream(modFile, FileMode.Open))
  1161. {
  1162. if (fileStream == null)
  1163. {
  1164. continue;
  1165. }
  1166. buf = new byte[fileStream.Length];
  1167. fileStream.Read(buf, 0, (int)fileStream.Length);
  1168. }
  1169. }
  1170. catch { }
  1171. if (buf == null)
  1172. {
  1173. continue;
  1174. }
  1175. ItemData item = new ItemData()
  1176. {
  1177. isMod = true,
  1178. isOfficialMod = true,
  1179. menu = modFile,
  1180. priority = 1000
  1181. };
  1182. BinaryReader binaryReader = new BinaryReader(new MemoryStream(buf), Encoding.UTF8);
  1183. if (binaryReader.ReadString() != "CM3D2_MOD")
  1184. {
  1185. binaryReader.Close();
  1186. }
  1187. else
  1188. {
  1189. try
  1190. {
  1191. binaryReader.ReadInt32();
  1192. string iconName = binaryReader.ReadString();
  1193. string baseItemPath = binaryReader.ReadString().Replace(":", " ");
  1194. item.baseItem = Path.GetFileName(baseItemPath);
  1195. item.name = binaryReader.ReadString();
  1196. item.category = binaryReader.ReadString();
  1197. binaryReader.ReadString();
  1198. string mpnValue = binaryReader.ReadString();
  1199. MPN mpn = MPN.null_mpn;
  1200. try
  1201. {
  1202. mpn = (MPN)Enum.Parse(typeof(MPN), mpnValue, true);
  1203. }
  1204. catch
  1205. {
  1206. binaryReader.Close();
  1207. continue;
  1208. }
  1209. if (mpn != MPN.null_mpn)
  1210. {
  1211. binaryReader.ReadString();
  1212. }
  1213. binaryReader.ReadString();
  1214. int size = binaryReader.ReadInt32();
  1215. for (int i = 0; i < size; i++)
  1216. {
  1217. string key = binaryReader.ReadString();
  1218. int count = binaryReader.ReadInt32();
  1219. byte[] data = binaryReader.ReadBytes(count);
  1220. if (string.Equals(key, iconName, StringComparison.InvariantCultureIgnoreCase))
  1221. {
  1222. Texture2D tex = new Texture2D(1, 1, TextureFormat.RGBA32, false);
  1223. tex.LoadImage(data);
  1224. item.tex = tex;
  1225. break;
  1226. }
  1227. }
  1228. itemDataList.Add(item);
  1229. }
  1230. catch { }
  1231. binaryReader.Close();
  1232. }
  1233. }
  1234. #endregion
  1235. }
  1236. foreach (ItemData itemData in itemDataList)
  1237. {
  1238. if (itemData.category == slotArray[slotIndex])
  1239. {
  1240. sortList.Add(new SortItem()
  1241. {
  1242. category = itemData.category,
  1243. priority = itemData.priority,
  1244. name = itemData.name,
  1245. icon = itemData.icon,
  1246. menu = itemData.menu,
  1247. tex = itemData.tex,
  1248. isMod = itemData.isMod,
  1249. isOfficialMod = itemData.isOfficialMod,
  1250. baseMenu = itemData.baseItem
  1251. });
  1252. }
  1253. }
  1254. IOrderedEnumerable<SortItem> sortedItemList = sortList
  1255. .OrderBy(item => item.priority)
  1256. .ThenBy(item => item.name);
  1257. List<SortItem> sortItemList = new List<SortItem>();
  1258. string previousMenu = "";
  1259. foreach (SortItem item in sortedItemList)
  1260. {
  1261. try
  1262. {
  1263. if (item.menu != previousMenu)
  1264. {
  1265. if (!modItemsOnly && item.isMod) numberOfModItems++;
  1266. if (item.tex == null)
  1267. {
  1268. byte[] data = ImportCM.LoadTexture(GameUty.FileSystem, item.icon, false).data;
  1269. Texture2D texture2D = new Texture2D(50, 50, TextureFormat.RGB565, false);
  1270. texture2D.LoadImage(data);
  1271. item.tex = texture2D;
  1272. }
  1273. previousMenu = item.menu;
  1274. sortItemList.Add(item);
  1275. }
  1276. }
  1277. catch { }
  1278. }
  1279. sortList = sortItemList;
  1280. }
  1281. }
  1282. private void BGSelectWindow(int winID)
  1283. {
  1284. GUIStyle guistyle = "label";
  1285. guistyle.fontSize = GetPix(12);
  1286. guistyle.alignment = TextAnchor.UpperLeft;
  1287. GUIStyle guistyle2 = "label";
  1288. guistyle2.fontSize = GetPix(11);
  1289. guistyle2.alignment = TextAnchor.UpperLeft;
  1290. GUIStyle guistyle3 = "button";
  1291. guistyle3.fontSize = GetPix(20);
  1292. GUIStyle guistyle4 = "button";
  1293. guistyle4.fontSize = GetPix(14);
  1294. guistyle4.alignment = TextAnchor.MiddleLeft;
  1295. GUIStyle guistyle5 = "button";
  1296. guistyle5.fontSize = GetPix(12);
  1297. guistyle5.alignment = TextAnchor.MiddleLeft;
  1298. GUIStyle guistyle6 = new GUIStyle("toggle")
  1299. {
  1300. fontSize = GetPix(13)
  1301. };
  1302. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  1303. Maid maid = maidArray[selectMaidIndex];
  1304. if (!kankyoInitFlg)
  1305. {
  1306. listStyle2.normal.textColor = Color.white;
  1307. listStyle2.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  1308. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  1309. RectOffset padding = listStyle2.padding;
  1310. RectOffset padding2 = listStyle2.padding;
  1311. RectOffset padding3 = listStyle2.padding;
  1312. int num = listStyle2.padding.bottom = GetPix(0);
  1313. num = padding3.top = num;
  1314. num = padding2.right = num;
  1315. padding.left = num;
  1316. listStyle2.fontSize = GetPix(11);
  1317. listStyle3.normal.textColor = Color.white;
  1318. listStyle3.normal.background = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.5f));
  1319. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  1320. RectOffset padding4 = listStyle3.padding;
  1321. RectOffset padding5 = listStyle3.padding;
  1322. num = listStyle3.padding.top = GetPix(0);
  1323. num = padding5.right = num;
  1324. padding4.left = num;
  1325. listStyle3.padding.bottom = GetPix(0);
  1326. listStyle3.fontSize = GetPix(12);
  1327. bgmCombo.selectedItemIndex = bgmIndex;
  1328. if (sceneLevel == 5)
  1329. {
  1330. bgmCombo.selectedItemIndex = 2;
  1331. }
  1332. bgmComboList = bgmArray.Select(s => dancesDict.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  1333. bgCombo.selectedItemIndex = bgIndex;
  1334. bgComboList = new GUIContent[bgArray.Length];
  1335. for (int j = 0; j < bgArray.Length; j++)
  1336. {
  1337. // Dicts merged during init
  1338. if (bgDict.TryGetValue(bgArray[j], out string name))
  1339. {
  1340. bgComboList[j] = new GUIContent(name);
  1341. }
  1342. else
  1343. {
  1344. bgComboList[j] = new GUIContent(bgArray[j]);
  1345. }
  1346. }
  1347. doguCombo.selectedItemIndex = 0;
  1348. doguComboList = new GUIContent[doguBArray.Length];
  1349. for (int j = 0; j < doguComboList.Length; j++)
  1350. {
  1351. // Dicts merged during init
  1352. if (doguUiNames.TryGetValue(doguBArray[j], out string name))
  1353. {
  1354. doguComboList[j] = new GUIContent(name);
  1355. }
  1356. else
  1357. {
  1358. doguComboList[j] = new GUIContent(doguBArray[j]);
  1359. }
  1360. }
  1361. parCombo.selectedItemIndex = 0;
  1362. parComboList = parArray.Select(s => parUiDict.TryGetValue(s, out string name) ? name : s).Select(s => new GUIContent(s)).ToArray();
  1363. lightCombo.selectedItemIndex = 0;
  1364. lightList = new List<GameObject>
  1365. {
  1366. GameMain.Instance.MainLight.gameObject
  1367. };
  1368. lightComboList = new GUIContent[lightList.Count];
  1369. for (int i = 0; i < lightList.Count; i++)
  1370. {
  1371. if (i == 0)
  1372. {
  1373. lightComboList[i] = new GUIContent("メイン");
  1374. }
  1375. else
  1376. {
  1377. lightComboList[i] = new GUIContent("追加" + i);
  1378. }
  1379. }
  1380. kankyoInitFlg = true;
  1381. }
  1382. listStyle3.padding.top = GetPix(1);
  1383. listStyle3.padding.bottom = GetPix(0);
  1384. listStyle3.fontSize = GetPix(12);
  1385. if (poseCombo.isClickedComboButton)
  1386. {
  1387. GUI.enabled = false;
  1388. }
  1389. if (poseGroupCombo.isClickedComboButton)
  1390. {
  1391. GUI.enabled = false;
  1392. }
  1393. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  1394. {
  1395. if (!isF6)
  1396. {
  1397. bool value = true;
  1398. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  1399. {
  1400. value = false;
  1401. }
  1402. if (GUI.Toggle(new Rect(GetPix(2),
  1403. GetPix(2),
  1404. GetPix(39),
  1405. GetPix(20)),
  1406. value,
  1407. "配置",
  1408. guistyle6))
  1409. {
  1410. faceFlg = false;
  1411. poseFlg = false;
  1412. sceneFlg = false;
  1413. kankyoFlg = false;
  1414. kankyo2Flg = false;
  1415. bGui = true;
  1416. }
  1417. }
  1418. if (!yotogiFlg)
  1419. {
  1420. if (GUI.Toggle(new Rect(GetPix(42),
  1421. GetPix(2),
  1422. GetPix(39),
  1423. GetPix(20)),
  1424. poseFlg,
  1425. "操作",
  1426. guistyle6))
  1427. {
  1428. poseFlg = true;
  1429. faceFlg = false;
  1430. sceneFlg = false;
  1431. kankyoFlg = false;
  1432. kankyo2Flg = false;
  1433. }
  1434. }
  1435. if (GUI.Toggle(new Rect(GetPix(82), GetPix(2), GetPix(39), GetPix(20)),
  1436. faceFlg,
  1437. "表情",
  1438. guistyle6))
  1439. {
  1440. faceFlg = true;
  1441. poseFlg = false;
  1442. sceneFlg = false;
  1443. kankyoFlg = false;
  1444. kankyo2Flg = false;
  1445. if (!faceFlg2)
  1446. {
  1447. isFaceInit = true;
  1448. faceFlg2 = true;
  1449. maidArray[selectMaidIndex].boMabataki = false;
  1450. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  1451. }
  1452. isFaceInit = true;
  1453. }
  1454. if (GUI.Toggle(new Rect(GetPix(122), GetPix(2), GetPix(39), GetPix(20)),
  1455. kankyoFlg,
  1456. "環境",
  1457. guistyle6))
  1458. {
  1459. poseFlg = false;
  1460. faceFlg = false;
  1461. sceneFlg = false;
  1462. kankyoFlg = true;
  1463. kankyo2Flg = false;
  1464. }
  1465. if (GUI.Toggle(new Rect(GetPix(162), GetPix(2), GetPix(39), GetPix(20)),
  1466. kankyo2Flg,
  1467. "環2",
  1468. guistyle6))
  1469. {
  1470. poseFlg = false;
  1471. faceFlg = false;
  1472. sceneFlg = false;
  1473. kankyoFlg = false;
  1474. kankyo2Flg = true;
  1475. }
  1476. if (!line1)
  1477. {
  1478. line1 = MakeTex(2, 2, new Color(0f, 0f, 0f, 0.3f));
  1479. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  1480. }
  1481. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 2f), line1);
  1482. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(200), 1f), line2);
  1483. }
  1484. if (isDanceStop)
  1485. {
  1486. isStop[selectMaidIndex] = true;
  1487. isDanceStop = false;
  1488. }
  1489. yotogiFlg = false;
  1490. if (sceneLevel == 14)
  1491. {
  1492. if (GameObject.Find("/UI Root/YotogiPlayPanel/CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit"))
  1493. {
  1494. yotogiFlg = true;
  1495. }
  1496. }
  1497. if (!isF6)
  1498. {
  1499. if (GUI.Button(new Rect(GetPix(157),
  1500. GetPix(32),
  1501. GetPix(46),
  1502. GetPix(35)),
  1503. "シーン\n 管 理",
  1504. guistyle3))
  1505. {
  1506. sceneFlg = true;
  1507. faceFlg = false;
  1508. poseFlg = false;
  1509. kankyoFlg = false;
  1510. kankyo2Flg = false;
  1511. bGui = true;
  1512. for (int i = 0; i < 10; i++)
  1513. {
  1514. date[i] = "未保存";
  1515. ninzu[i] = "";
  1516. IniKey iniKey = Preferences["scene"]["s" + (page * 10 + i + 1)];
  1517. if (iniKey.Value != null && iniKey.Value.ToString() != "")
  1518. {
  1519. string[] array = iniKey.Value.Split(new char[] { '_' });
  1520. if (array.Length >= 2)
  1521. {
  1522. string[] array2 = array[0].Split(new char[] { ',' });
  1523. date[i] = array2[0];
  1524. ninzu[i] = array2[1] + "人";
  1525. }
  1526. }
  1527. }
  1528. }
  1529. }
  1530. if (doguCombo.isClickedComboButton || parCombo.isClickedComboButton || bgCombo.isClickedComboButton
  1531. || bgmCombo.isClickedComboButton || lightCombo.isClickedComboButton)
  1532. {
  1533. GUI.enabled = false;
  1534. }
  1535. int num2 = -1;
  1536. if (lightIndex[selectLightIndex] == 0)
  1537. {
  1538. isIdx1 = true;
  1539. }
  1540. if (lightIndex[selectLightIndex] == 1)
  1541. {
  1542. isIdx2 = true;
  1543. }
  1544. if (lightIndex[selectLightIndex] == 2)
  1545. {
  1546. isIdx3 = true;
  1547. }
  1548. if (lightIndex[selectLightIndex] == 3)
  1549. {
  1550. isIdx4 = true;
  1551. }
  1552. int offsetTop = GetPix(80);
  1553. int UIHeight = GetPix(550);
  1554. Rect BGWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  1555. Rect BGWindowScrollView = new Rect(0, offsetTop, rectWin.width - 20, UIHeight);
  1556. bgScrollPos = GUI.BeginScrollView(BGWindowScrollRect, bgScrollPos, BGWindowScrollView);
  1557. if (GUI.Toggle(new Rect(GetPix(5), GetPix(215), GetPix(45), GetPix(20)),
  1558. isIdx1,
  1559. "通常",
  1560. guistyle6))
  1561. {
  1562. if (lightIndex[selectLightIndex] != 0)
  1563. {
  1564. isIdx1 = true;
  1565. isIdx2 = false;
  1566. isIdx3 = false;
  1567. isIdx4 = false;
  1568. num2 = 0;
  1569. }
  1570. }
  1571. if (GUI.Toggle(new Rect(GetPix(50), GetPix(215), GetPix(45), GetPix(20)),
  1572. isIdx2,
  1573. "Spot",
  1574. guistyle6))
  1575. {
  1576. if (lightIndex[selectLightIndex] != 1)
  1577. {
  1578. isIdx1 = false;
  1579. isIdx2 = true;
  1580. isIdx3 = false;
  1581. isIdx4 = false;
  1582. num2 = 1;
  1583. }
  1584. }
  1585. if (GUI.Toggle(new Rect(GetPix(99), GetPix(215), GetPix(45), GetPix(20)),
  1586. isIdx3,
  1587. "Point",
  1588. guistyle6))
  1589. {
  1590. if (lightIndex[selectLightIndex] != 2)
  1591. {
  1592. isIdx1 = false;
  1593. isIdx2 = false;
  1594. isIdx3 = true;
  1595. isIdx4 = false;
  1596. num2 = 2;
  1597. }
  1598. }
  1599. if (selectLightIndex == 0)
  1600. {
  1601. if (GUI.Toggle(new Rect(GetPix(150),
  1602. GetPix(215),
  1603. GetPix(45),
  1604. GetPix(20)),
  1605. isIdx4,
  1606. "単色",
  1607. guistyle6))
  1608. {
  1609. if (lightIndex[selectLightIndex] != 3)
  1610. {
  1611. isIdx1 = false;
  1612. isIdx2 = false;
  1613. isIdx3 = false;
  1614. isIdx4 = true;
  1615. num2 = 3;
  1616. }
  1617. }
  1618. }
  1619. else if (GUI.Toggle(new Rect(GetPix(150),
  1620. GetPix(215),
  1621. GetPix(45),
  1622. GetPix(20)),
  1623. isIdx4,
  1624. "無効",
  1625. guistyle6))
  1626. {
  1627. if (lightIndex[selectLightIndex] != 3)
  1628. {
  1629. isIdx1 = false;
  1630. isIdx2 = false;
  1631. isIdx3 = false;
  1632. isIdx4 = true;
  1633. num2 = 3;
  1634. }
  1635. }
  1636. if (num2 >= 0)
  1637. {
  1638. lightIndex[selectLightIndex] = num2;
  1639. if (selectLightIndex == 0)
  1640. {
  1641. GameMain.Instance.MainLight.Reset();
  1642. GameMain.Instance.MainLight.SetIntensity(0.95f);
  1643. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  1644. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  1645. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  1646. if (lightIndex[selectLightIndex] == 0)
  1647. {
  1648. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1649. bgObject.SetActive(true);
  1650. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1651. }
  1652. else if (lightIndex[selectLightIndex] == 1)
  1653. {
  1654. GameMain.Instance.MainLight.transform.eulerAngles += Vector3.right * 40f;
  1655. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Spot;
  1656. bgObject.SetActive(true);
  1657. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1658. }
  1659. else if (lightIndex[selectLightIndex] == 2)
  1660. {
  1661. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Point;
  1662. bgObject.SetActive(true);
  1663. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  1664. }
  1665. else if (lightIndex[selectLightIndex] == 3)
  1666. {
  1667. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  1668. mainCamera.GetComponent<Camera>().backgroundColor = new Color(lightColorR[0], lightColorG[0], lightColorB[0]);
  1669. bgObject.SetActive(false);
  1670. }
  1671. }
  1672. else
  1673. {
  1674. lightList[selectLightIndex].SetActive(true);
  1675. if (lightIndex[selectLightIndex] == 0)
  1676. {
  1677. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Directional;
  1678. }
  1679. else if (lightIndex[selectLightIndex] == 1)
  1680. {
  1681. lightList[selectLightIndex].transform.eulerAngles += Vector3.right * 40f;
  1682. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Spot;
  1683. }
  1684. else if (lightIndex[selectLightIndex] == 2)
  1685. {
  1686. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Point;
  1687. }
  1688. else if (lightIndex[selectLightIndex] == 3)
  1689. {
  1690. lightList[selectLightIndex].GetComponent<Light>().type = LightType.Directional;
  1691. lightList[selectLightIndex].SetActive(false);
  1692. }
  1693. }
  1694. lightColorR[selectLightIndex] = 1f;
  1695. lightColorG[selectLightIndex] = 1f;
  1696. lightColorB[selectLightIndex] = 1f;
  1697. lightX[selectLightIndex] = 40f;
  1698. lightY[selectLightIndex] = 180f;
  1699. lightAkarusa[selectLightIndex] = 0.95f;
  1700. lightKage[selectLightIndex] = 0.098f;
  1701. lightRange[selectLightIndex] = 50f;
  1702. if (lightIndex[selectLightIndex] == 1)
  1703. {
  1704. lightX[selectLightIndex] = 90f;
  1705. }
  1706. }
  1707. GUI.Label(new Rect(GetPix(10), GetPix(138), GetPix(100), GetPix(25)),
  1708. "キューブ表示",
  1709. guistyle2);
  1710. guistyle6.fontSize = GetPix(12);
  1711. isCube2 = GUI.Toggle(new Rect(GetPix(5),
  1712. GetPix(153),
  1713. GetPix(55),
  1714. GetPix(20)),
  1715. isCube2,
  1716. "大道具(",
  1717. guistyle6);
  1718. if (!isF6)
  1719. {
  1720. isCube = GUI.Toggle(new Rect(GetPix(102),
  1721. GetPix(153),
  1722. GetPix(54),
  1723. GetPix(20)),
  1724. isCube,
  1725. "メイド",
  1726. guistyle6);
  1727. }
  1728. bool flag = GUI.Toggle(new Rect(GetPix(160),
  1729. GetPix(153),
  1730. GetPix(44),
  1731. GetPix(20)),
  1732. isCube3,
  1733. "背景",
  1734. guistyle6);
  1735. guistyle6.fontSize = GetPix(13);
  1736. bool flag2 = GUI.Toggle(new Rect(GetPix(61),
  1737. GetPix(153),
  1738. GetPix(38),
  1739. GetPix(20)),
  1740. isCubeS,
  1741. "小)",
  1742. guistyle6);
  1743. if (isCubeS != flag2)
  1744. {
  1745. isCubeS = flag2;
  1746. if (isCubeS)
  1747. {
  1748. cubeSize = 0.05f;
  1749. }
  1750. else
  1751. {
  1752. cubeSize = 0.12f;
  1753. }
  1754. for (int i = 0; i < doguBObject.Count; i++)
  1755. {
  1756. gDogu[i].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  1757. }
  1758. }
  1759. if (isCube3 != flag)
  1760. {
  1761. isCube3 = flag;
  1762. if (gBg == null)
  1763. {
  1764. gBg = GameObject.CreatePrimitive(PrimitiveType.Cube);
  1765. gBg.GetComponent<Renderer>().material = m_material;
  1766. gBg.layer = 8;
  1767. gBg.GetComponent<Renderer>().enabled = false;
  1768. gBg.SetActive(false);
  1769. gBg.transform.position = bgObject.transform.position;
  1770. mBg = gBg.AddComponent<MouseDrag6>();
  1771. mBg.obj = gBg;
  1772. mBg.maid = bgObject;
  1773. mBg.angles = bg.eulerAngles;
  1774. gBg.transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  1775. mBg.ido = 1;
  1776. mBg.isScale = false;
  1777. }
  1778. if (isCube3)
  1779. {
  1780. gBg.SetActive(true);
  1781. }
  1782. else
  1783. {
  1784. gBg.SetActive(false);
  1785. }
  1786. }
  1787. int num3 = 0;
  1788. if (lightIndex[selectLightIndex] == 0 || lightIndex[selectLightIndex] == 1
  1789. || (selectLightIndex == 0 && lightIndex[selectLightIndex] == 3))
  1790. {
  1791. GUI.Label(new Rect(GetPix(10), GetPix(237), GetPix(100), GetPix(25)),
  1792. "向きX",
  1793. guistyle2);
  1794. lightX[selectLightIndex] =
  1795. GUI.HorizontalSlider(new Rect(GetPix(8),
  1796. GetPix(251),
  1797. GetPix(192),
  1798. GetPix(20)),
  1799. lightX[selectLightIndex],
  1800. 220f,
  1801. -140f);
  1802. GUI.Label(new Rect(GetPix(10), GetPix(261), GetPix(100), GetPix(25)),
  1803. "向きY",
  1804. guistyle2);
  1805. lightY[selectLightIndex] =
  1806. GUI.HorizontalSlider(new Rect(GetPix(8),
  1807. GetPix(275),
  1808. GetPix(192),
  1809. GetPix(20)),
  1810. lightY[selectLightIndex],
  1811. 0f,
  1812. 360f);
  1813. }
  1814. else
  1815. {
  1816. num3 = 50;
  1817. }
  1818. if (lightIndex[selectLightIndex] != 3 || selectLightIndex <= 0)
  1819. {
  1820. GUI.Label(new Rect(GetPix(10),
  1821. GetPix(285 - num3),
  1822. GetPix(100),
  1823. GetPix(25)),
  1824. "明るさ",
  1825. guistyle2);
  1826. lightAkarusa[selectLightIndex] =
  1827. GUI.HorizontalSlider(new Rect(GetPix(8),
  1828. GetPix(299 - num3),
  1829. GetPix(192),
  1830. GetPix(20)),
  1831. lightAkarusa[selectLightIndex],
  1832. 0f,
  1833. 1.9f);
  1834. if (lightIndex[selectLightIndex] == 0 || lightIndex[selectLightIndex] == 3)
  1835. {
  1836. if (selectLightIndex == 0)
  1837. {
  1838. GUI.Label(new Rect(GetPix(10),
  1839. GetPix(309 - num3),
  1840. GetPix(100),
  1841. GetPix(25)),
  1842. "影",
  1843. guistyle2);
  1844. lightKage[selectLightIndex] =
  1845. GUI.HorizontalSlider(new Rect(GetPix(8),
  1846. GetPix(323 - num3),
  1847. GetPix(192),
  1848. GetPix(20)),
  1849. lightKage[selectLightIndex],
  1850. 0f,
  1851. 1f);
  1852. }
  1853. else
  1854. {
  1855. num3 = 25;
  1856. }
  1857. }
  1858. else if (lightIndex[selectLightIndex] == 1 || lightIndex[selectLightIndex] == 2)
  1859. {
  1860. GUI.Label(new Rect(GetPix(10),
  1861. GetPix(311 - num3),
  1862. GetPix(100),
  1863. GetPix(25)),
  1864. "範囲",
  1865. guistyle2);
  1866. lightRange[selectLightIndex] =
  1867. GUI.HorizontalSlider(new Rect(GetPix(8),
  1868. GetPix(325 - num3),
  1869. GetPix(192),
  1870. GetPix(20)),
  1871. lightRange[selectLightIndex],
  1872. 0f,
  1873. 150f);
  1874. }
  1875. else
  1876. {
  1877. num3 = 75;
  1878. }
  1879. GUI.Label(new Rect(GetPix(10),
  1880. GetPix(333 - num3),
  1881. GetPix(100),
  1882. GetPix(25)),
  1883. "赤",
  1884. guistyle2);
  1885. lightColorR[selectLightIndex] =
  1886. GUI.HorizontalSlider(new Rect(GetPix(8),
  1887. GetPix(347 - num3),
  1888. GetPix(92),
  1889. GetPix(20)),
  1890. lightColorR[selectLightIndex],
  1891. 0f,
  1892. 1f);
  1893. GUI.Label(new Rect(GetPix(108),
  1894. GetPix(333 - num3),
  1895. GetPix(100),
  1896. GetPix(25)),
  1897. "緑",
  1898. guistyle2);
  1899. lightColorG[selectLightIndex] =
  1900. GUI.HorizontalSlider(new Rect(GetPix(108),
  1901. GetPix(347 - num3),
  1902. GetPix(92),
  1903. GetPix(20)),
  1904. lightColorG[selectLightIndex],
  1905. 0f,
  1906. 1f);
  1907. GUI.Label(new Rect(GetPix(10),
  1908. GetPix(357 - num3),
  1909. GetPix(100),
  1910. GetPix(25)),
  1911. "青",
  1912. guistyle2);
  1913. lightColorB[selectLightIndex] =
  1914. GUI.HorizontalSlider(new Rect(GetPix(8),
  1915. GetPix(371 - num3),
  1916. GetPix(92),
  1917. GetPix(20)),
  1918. lightColorB[selectLightIndex],
  1919. 0f,
  1920. 1f);
  1921. }
  1922. if (GUI.Toggle(new Rect(GetPix(5), GetPix(391), GetPix(67), GetPix(20)),
  1923. isBloomS,
  1924. "ブルーム",
  1925. guistyle6))
  1926. {
  1927. isBloomS = true;
  1928. isDepthS = false;
  1929. isBlurS = false;
  1930. isFogS = false;
  1931. }
  1932. if (isBloomS)
  1933. {
  1934. isBloom = GUI.Toggle(new Rect(GetPix(8),
  1935. GetPix(412),
  1936. GetPix(40),
  1937. GetPix(20)),
  1938. isBloom,
  1939. "有効",
  1940. guistyle6);
  1941. if (!isBloom)
  1942. {
  1943. GUI.enabled = false;
  1944. }
  1945. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  1946. "強さ",
  1947. guistyle2);
  1948. bloom1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1949. GetPix(445),
  1950. GetPix(92),
  1951. GetPix(20)),
  1952. bloom1,
  1953. 0f,
  1954. 5.7f);
  1955. GUI.Label(new Rect(GetPix(110), GetPix(430), GetPix(100), GetPix(25)),
  1956. "広さ",
  1957. guistyle2);
  1958. bloom2 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1959. GetPix(445),
  1960. GetPix(92),
  1961. GetPix(20)),
  1962. bloom2,
  1963. 0f,
  1964. 15f);
  1965. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  1966. "赤",
  1967. guistyle2);
  1968. bloom3 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1969. GetPix(470),
  1970. GetPix(92),
  1971. GetPix(20)),
  1972. bloom3,
  1973. 0f,
  1974. 0.5f);
  1975. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  1976. "緑",
  1977. guistyle2);
  1978. bloom4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  1979. GetPix(470),
  1980. GetPix(92),
  1981. GetPix(20)),
  1982. bloom4,
  1983. 0f,
  1984. 0.5f);
  1985. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  1986. "青",
  1987. guistyle2);
  1988. bloom5 = GUI.HorizontalSlider(new Rect(GetPix(8),
  1989. GetPix(495),
  1990. GetPix(92),
  1991. GetPix(20)),
  1992. bloom5,
  1993. 0f,
  1994. 0.5f);
  1995. isBloomA = GUI.Toggle(new Rect(GetPix(110),
  1996. GetPix(491),
  1997. GetPix(50),
  1998. GetPix(20)),
  1999. isBloomA,
  2000. "HDR",
  2001. guistyle6);
  2002. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  2003. && !bgmCombo.isClickedComboButton)
  2004. {
  2005. GUI.enabled = true;
  2006. }
  2007. }
  2008. if (GUI.Toggle(new Rect(GetPix(73), GetPix(391), GetPix(40), GetPix(20)),
  2009. isDepthS,
  2010. "深度",
  2011. guistyle6))
  2012. {
  2013. isBloomS = false;
  2014. isDepthS = true;
  2015. isBlurS = false;
  2016. isFogS = false;
  2017. }
  2018. if (isDepthS)
  2019. {
  2020. isDepth = GUI.Toggle(new Rect(GetPix(8),
  2021. GetPix(412),
  2022. GetPix(40),
  2023. GetPix(20)),
  2024. isDepth,
  2025. "有効",
  2026. guistyle6);
  2027. if (!isDepth)
  2028. {
  2029. GUI.enabled = false;
  2030. }
  2031. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  2032. "焦点距離",
  2033. guistyle2);
  2034. depth1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2035. GetPix(445),
  2036. GetPix(192),
  2037. GetPix(20)),
  2038. depth1,
  2039. 0f,
  2040. 10f);
  2041. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  2042. "焦点領域サイズ",
  2043. guistyle2);
  2044. depth2 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2045. GetPix(470),
  2046. GetPix(92),
  2047. GetPix(20)),
  2048. depth2,
  2049. 0f,
  2050. 2f);
  2051. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  2052. "カメラ絞り",
  2053. guistyle2);
  2054. depth3 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2055. GetPix(470),
  2056. GetPix(92),
  2057. GetPix(20)),
  2058. depth3,
  2059. 0f,
  2060. 60f);
  2061. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  2062. "ブレ",
  2063. guistyle2);
  2064. depth4 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2065. GetPix(495),
  2066. GetPix(92),
  2067. GetPix(20)),
  2068. depth4,
  2069. 0f,
  2070. 10f);
  2071. isDepthA = GUI.Toggle(new Rect(GetPix(110),
  2072. GetPix(491),
  2073. GetPix(100),
  2074. GetPix(20)),
  2075. isDepthA,
  2076. "深度表示",
  2077. guistyle6);
  2078. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  2079. && !bgmCombo.isClickedComboButton)
  2080. {
  2081. GUI.enabled = true;
  2082. }
  2083. }
  2084. if (GUI.Toggle(new Rect(GetPix(114), GetPix(391), GetPix(40), GetPix(20)),
  2085. isBlurS,
  2086. "光学",
  2087. guistyle6))
  2088. {
  2089. isBloomS = false;
  2090. isDepthS = false;
  2091. isBlurS = true;
  2092. isFogS = false;
  2093. }
  2094. if (isBlurS)
  2095. {
  2096. isBlur = GUI.Toggle(new Rect(GetPix(8),
  2097. GetPix(412),
  2098. GetPix(40),
  2099. GetPix(20)),
  2100. isBlur,
  2101. "有効",
  2102. guistyle6);
  2103. if (!isBlur)
  2104. {
  2105. GUI.enabled = false;
  2106. }
  2107. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  2108. "強さ",
  2109. guistyle2);
  2110. blur1 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2111. GetPix(445),
  2112. GetPix(92),
  2113. GetPix(20)),
  2114. blur1,
  2115. -40f,
  2116. 70f);
  2117. GUI.Label(new Rect(GetPix(108), GetPix(430), GetPix(100), GetPix(25)),
  2118. "ブラー",
  2119. guistyle2);
  2120. blur2 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2121. GetPix(445),
  2122. GetPix(92),
  2123. GetPix(20)),
  2124. blur2,
  2125. 0f,
  2126. 5f);
  2127. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  2128. "ブレ",
  2129. guistyle2);
  2130. blur3 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2131. GetPix(470),
  2132. GetPix(92),
  2133. GetPix(20)),
  2134. blur3,
  2135. 0f,
  2136. 40f);
  2137. GUI.Label(new Rect(GetPix(108), GetPix(455), GetPix(100), GetPix(25)),
  2138. "色収差",
  2139. guistyle2);
  2140. blur4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2141. GetPix(470),
  2142. GetPix(92),
  2143. GetPix(20)),
  2144. blur4,
  2145. -30f,
  2146. 30f);
  2147. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  2148. && !bgmCombo.isClickedComboButton)
  2149. {
  2150. GUI.enabled = true;
  2151. }
  2152. }
  2153. if (GUI.Toggle(new Rect(GetPix(155), GetPix(391), GetPix(60), GetPix(20)),
  2154. isFogS,
  2155. "フォグ",
  2156. guistyle6))
  2157. {
  2158. isBloomS = false;
  2159. isDepthS = false;
  2160. isBlurS = false;
  2161. isFogS = true;
  2162. }
  2163. if (isFogS)
  2164. {
  2165. isFog = GUI.Toggle(new Rect(GetPix(8),
  2166. GetPix(412),
  2167. GetPix(40),
  2168. GetPix(20)),
  2169. isFog,
  2170. "有効",
  2171. guistyle6);
  2172. if (!isFog)
  2173. {
  2174. GUI.enabled = false;
  2175. }
  2176. GUI.Label(new Rect(GetPix(110), GetPix(406), GetPix(100), GetPix(24)),
  2177. "発生距離",
  2178. guistyle2);
  2179. fog1 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2180. GetPix(420),
  2181. GetPix(92),
  2182. GetPix(20)),
  2183. fog1,
  2184. 0f,
  2185. 30f);
  2186. GUI.Label(new Rect(GetPix(10), GetPix(430), GetPix(100), GetPix(25)),
  2187. "密度",
  2188. guistyle2);
  2189. fog2 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2190. GetPix(445),
  2191. GetPix(92),
  2192. GetPix(20)),
  2193. fog2,
  2194. 0f,
  2195. 10f);
  2196. GUI.Label(new Rect(GetPix(110), GetPix(430), GetPix(100), GetPix(25)),
  2197. "強度",
  2198. guistyle2);
  2199. fog3 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2200. GetPix(445),
  2201. GetPix(92),
  2202. GetPix(20)),
  2203. fog3,
  2204. -5f,
  2205. 20f);
  2206. GUI.Label(new Rect(GetPix(10), GetPix(455), GetPix(100), GetPix(25)),
  2207. "高さ",
  2208. guistyle2);
  2209. fog4 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2210. GetPix(470),
  2211. GetPix(92),
  2212. GetPix(20)),
  2213. fog4,
  2214. -10f,
  2215. 10f);
  2216. GUI.Label(new Rect(GetPix(110), GetPix(455), GetPix(100), GetPix(25)),
  2217. "赤",
  2218. guistyle2);
  2219. fog5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2220. GetPix(470),
  2221. GetPix(92),
  2222. GetPix(20)),
  2223. fog5,
  2224. 0f,
  2225. 1f);
  2226. GUI.Label(new Rect(GetPix(10), GetPix(480), GetPix(100), GetPix(25)),
  2227. "緑",
  2228. guistyle2);
  2229. fog6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2230. GetPix(495),
  2231. GetPix(92),
  2232. GetPix(20)),
  2233. fog6,
  2234. 0f,
  2235. 1f);
  2236. GUI.Label(new Rect(GetPix(110), GetPix(480), GetPix(100), GetPix(25)),
  2237. "青",
  2238. guistyle2);
  2239. fog7 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2240. GetPix(495),
  2241. GetPix(92),
  2242. GetPix(20)),
  2243. fog7,
  2244. 0f,
  2245. 1f);
  2246. if (!doguCombo.isClickedComboButton && !parCombo.isClickedComboButton && !bgCombo.isClickedComboButton
  2247. && !bgmCombo.isClickedComboButton)
  2248. {
  2249. GUI.enabled = true;
  2250. }
  2251. }
  2252. isSepian = GUI.Toggle(new Rect(GetPix(5),
  2253. GetPix(515),
  2254. GetPix(80),
  2255. GetPix(20)),
  2256. isSepian,
  2257. "セピア",
  2258. guistyle6);
  2259. GUI.Label(new Rect(GetPix(108), GetPix(512), GetPix(100), GetPix(25)),
  2260. "ぼかし",
  2261. guistyle2);
  2262. bokashi = GUI.HorizontalSlider(new Rect(GetPix(108),
  2263. GetPix(527),
  2264. GetPix(92),
  2265. GetPix(20)),
  2266. bokashi,
  2267. 0f,
  2268. 18f);
  2269. if (GUI.Toggle(new Rect(GetPix(5), GetPix(545), GetPix(80), GetPix(20)),
  2270. isHairSetting,
  2271. "髪の設定",
  2272. guistyle6))
  2273. {
  2274. isHairSetting = true;
  2275. isSkirtSetting = false;
  2276. }
  2277. if (isHairSetting)
  2278. {
  2279. bool flag3 = GUI.Toggle(new Rect(GetPix(5),
  2280. GetPix(566),
  2281. GetPix(40),
  2282. GetPix(20)),
  2283. isKamiyure,
  2284. "有効",
  2285. guistyle6);
  2286. if (isKamiyure != flag3)
  2287. {
  2288. isKamiyure = flag3;
  2289. if (isKamiyure)
  2290. {
  2291. Preferences["config"]["hair_setting"].Value = "true";
  2292. Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
  2293. Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
  2294. Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
  2295. SaveConfig();
  2296. }
  2297. else
  2298. {
  2299. Preferences["config"]["hair_setting"].Value = "false";
  2300. SaveConfig();
  2301. for (int j = 0; j < maidCnt; j++)
  2302. {
  2303. for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
  2304. {
  2305. if (k >= 3 && k <= 6)
  2306. {
  2307. if (maidArray[j].body0.goSlot[k].obj != null)
  2308. {
  2309. DynamicBone component = maidArray[j].body0.goSlot[k].obj.GetComponent<DynamicBone>();
  2310. if (component != null)
  2311. {
  2312. component.m_Damping = 0.6f;
  2313. component.m_Elasticity = 1f;
  2314. if (k == 5)
  2315. {
  2316. component.m_Elasticity = 0.05f;
  2317. }
  2318. component.m_Radius = 0.02f;
  2319. component.UpdateParameters();
  2320. }
  2321. }
  2322. }
  2323. }
  2324. }
  2325. }
  2326. }
  2327. if (!isKamiyure)
  2328. {
  2329. GUI.enabled = false;
  2330. }
  2331. GUI.Label(new Rect(GetPix(108), GetPix(565), GetPix(100), GetPix(25)),
  2332. "当たり判定半径",
  2333. guistyle2);
  2334. float num4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2335. GetPix(579),
  2336. GetPix(92),
  2337. GetPix(20)),
  2338. kamiyure4,
  2339. 0f,
  2340. 0.04f);
  2341. if (kamiyure4 != num4)
  2342. {
  2343. kamiyure4 = num4;
  2344. Preferences["config"]["hair_radius"].Value = kamiyure4.ToString();
  2345. SaveConfig();
  2346. }
  2347. GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
  2348. "減衰率",
  2349. guistyle2);
  2350. float num5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2351. GetPix(604),
  2352. GetPix(92),
  2353. GetPix(20)),
  2354. kamiyure2,
  2355. 0.2f,
  2356. 1f);
  2357. if (kamiyure2 != num5)
  2358. {
  2359. kamiyure2 = num5;
  2360. Preferences["config"]["hair_damping"].Value = kamiyure2.ToString();
  2361. SaveConfig();
  2362. }
  2363. GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
  2364. "復元率",
  2365. guistyle2);
  2366. float num6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2367. GetPix(604),
  2368. GetPix(92),
  2369. GetPix(20)),
  2370. kamiyure3,
  2371. 0f,
  2372. 2f);
  2373. if (kamiyure3 != num6)
  2374. {
  2375. kamiyure3 = num6;
  2376. Preferences["config"]["hair_elasticity"].Value = kamiyure3.ToString();
  2377. SaveConfig();
  2378. }
  2379. GUI.enabled = true;
  2380. }
  2381. if (GUI.Toggle(new Rect(GetPix(105), GetPix(545), GetPix(100), GetPix(20)),
  2382. isSkirtSetting,
  2383. "スカート設定",
  2384. guistyle6))
  2385. {
  2386. isHairSetting = false;
  2387. isSkirtSetting = true;
  2388. }
  2389. if (isSkirtSetting)
  2390. {
  2391. bool flag4 = GUI.Toggle(new Rect(GetPix(5),
  2392. GetPix(566),
  2393. GetPix(40),
  2394. GetPix(20)),
  2395. isSkirtyure,
  2396. "有効",
  2397. guistyle6);
  2398. if (isSkirtyure != flag4)
  2399. {
  2400. isSkirtyure = flag4;
  2401. if (isSkirtyure)
  2402. {
  2403. Preferences["config"]["skirt_setting"].Value = "true";
  2404. Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
  2405. Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
  2406. Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
  2407. SaveConfig();
  2408. }
  2409. else
  2410. {
  2411. Preferences["config"]["skirt_setting"].Value = "false";
  2412. SaveConfig();
  2413. for (int j = 0; j < maidCnt; j++)
  2414. {
  2415. for (int k = 0; k < maidArray[j].body0.goSlot.Count; k++)
  2416. {
  2417. if (maidArray[j].body0.goSlot[k].obj != null)
  2418. {
  2419. DynamicSkirtBone fieldValue =
  2420. GetFieldValue<BoneHair3, DynamicSkirtBone>(maidArray[j].body0.goSlot[k].bonehair3,
  2421. "m_SkirtBone");
  2422. if (fieldValue != null)
  2423. {
  2424. fieldValue.m_fPanierForce = 0.05f;
  2425. fieldValue.m_fPanierForceDistanceThreshold = 0.1f;
  2426. fieldValue.m_fRegDefaultRadius = 0.1f;
  2427. }
  2428. }
  2429. }
  2430. }
  2431. }
  2432. }
  2433. if (!isSkirtyure)
  2434. {
  2435. GUI.enabled = false;
  2436. }
  2437. GUI.Label(new Rect(GetPix(108), GetPix(565), GetPix(100), GetPix(25)),
  2438. "足側カプセル半径",
  2439. guistyle2);
  2440. float num4 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2441. GetPix(579),
  2442. GetPix(92),
  2443. GetPix(20)),
  2444. skirtyure4,
  2445. 0f,
  2446. 0.2f);
  2447. if (skirtyure4 != num4)
  2448. {
  2449. skirtyure4 = num4;
  2450. Preferences["config"]["skirt_radius"].Value = skirtyure4.ToString();
  2451. SaveConfig();
  2452. }
  2453. GUI.Label(new Rect(GetPix(108), GetPix(590), GetPix(100), GetPix(25)),
  2454. "足との距離パニエ力",
  2455. guistyle2);
  2456. float num5 = GUI.HorizontalSlider(new Rect(GetPix(108),
  2457. GetPix(604),
  2458. GetPix(92),
  2459. GetPix(20)),
  2460. skirtyure2,
  2461. 0f,
  2462. 0.2f);
  2463. if (skirtyure2 != num5)
  2464. {
  2465. skirtyure2 = num5;
  2466. Preferences["config"]["skirt_damping"].Value = skirtyure2.ToString();
  2467. SaveConfig();
  2468. }
  2469. GUI.Label(new Rect(GetPix(10), GetPix(590), GetPix(100), GetPix(25)),
  2470. "パニエ力",
  2471. guistyle2);
  2472. float num6 = GUI.HorizontalSlider(new Rect(GetPix(8),
  2473. GetPix(604),
  2474. GetPix(92),
  2475. GetPix(20)),
  2476. skirtyure3,
  2477. 0f,
  2478. 0.1f);
  2479. if (skirtyure3 != num6)
  2480. {
  2481. skirtyure3 = num6;
  2482. Preferences["config"]["skirt_elasticity"].Value = skirtyure3.ToString();
  2483. SaveConfig();
  2484. }
  2485. GUI.enabled = true;
  2486. }
  2487. GUI.enabled = true;
  2488. GUI.DrawTexture(new Rect(GetPix(5), GetPix(389), GetPix(195), 2f), line1);
  2489. GUI.DrawTexture(new Rect(GetPix(5), GetPix(389), GetPix(195), 1f), line2);
  2490. if (doguCombo.isClickedComboButton || parCombo.isClickedComboButton || bgCombo.isClickedComboButton
  2491. || bgmCombo.isClickedComboButton)
  2492. {
  2493. GUI.enabled = false;
  2494. }
  2495. GUI.DrawTexture(new Rect(GetPix(5), GetPix(176), GetPix(195), 2f), line1);
  2496. GUI.DrawTexture(new Rect(GetPix(5), GetPix(176), GetPix(195), 1f), line2);
  2497. GUI.Label(new Rect(GetPix(8), GetPix(187), GetPix(100), GetPix(25)),
  2498. "照明",
  2499. guistyle2);
  2500. listStyle3.padding.top = GetPix(3);
  2501. listStyle3.padding.bottom = GetPix(2);
  2502. listStyle3.fontSize = GetPix(13);
  2503. int num7 = lightCombo.List(new Rect(GetPix(34),
  2504. GetPix(185),
  2505. GetPix(78),
  2506. GetPix(23)),
  2507. lightComboList[selectLightIndex].text,
  2508. lightComboList,
  2509. guistyle4,
  2510. "box",
  2511. listStyle3);
  2512. if (num7 != selectLightIndex)
  2513. {
  2514. selectLightIndex = num7;
  2515. isIdx1 = false;
  2516. isIdx2 = false;
  2517. isIdx3 = false;
  2518. isIdx4 = false;
  2519. }
  2520. if (GUI.Button(new Rect(GetPix(115), GetPix(185), GetPix(35), GetPix(23)),
  2521. "追加",
  2522. guistyle3))
  2523. {
  2524. GameObject gameObject = new GameObject("Light");
  2525. gameObject.AddComponent<Light>();
  2526. lightList.Add(gameObject);
  2527. lightColorR.Add(1f);
  2528. lightColorG.Add(1f);
  2529. lightColorB.Add(1f);
  2530. lightIndex.Add(0);
  2531. lightX.Add(40f);
  2532. lightY.Add(180f);
  2533. lightAkarusa.Add(0.95f);
  2534. lightKage.Add(0.098f);
  2535. lightRange.Add(50f);
  2536. gameObject.transform.position = GameMain.Instance.MainLight.transform.position;
  2537. selectLightIndex = lightList.Count - 1;
  2538. lightComboList = new GUIContent[lightList.Count];
  2539. for (int i = 0; i < lightList.Count; i++)
  2540. {
  2541. if (i == 0)
  2542. {
  2543. lightComboList[i] = new GUIContent("メイン");
  2544. }
  2545. else
  2546. {
  2547. lightComboList[i] = new GUIContent("追加" + i);
  2548. }
  2549. }
  2550. lightCombo.selectedItemIndex = selectLightIndex;
  2551. gameObject.GetComponent<Light>().intensity = 0.95f;
  2552. gameObject.GetComponent<Light>().spotAngle = 50f;
  2553. gameObject.GetComponent<Light>().range = 10f;
  2554. gameObject.GetComponent<Light>().type = LightType.Directional;
  2555. gameObject.GetComponent<Light>().color = new Color(0.5f, 1f, 0f);
  2556. if (gLight[selectLightIndex] == null)
  2557. {
  2558. gLight[selectLightIndex] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  2559. Material material = new Material(Shader.Find("Transparent/Diffuse"))
  2560. {
  2561. color = new Color(0.5f, 0.5f, 1f, 0.8f)
  2562. };
  2563. gLight[selectLightIndex].GetComponent<Renderer>().material = material;
  2564. gLight[selectLightIndex].layer = 8;
  2565. gLight[selectLightIndex].GetComponent<Renderer>().enabled = false;
  2566. gLight[selectLightIndex].SetActive(false);
  2567. gLight[selectLightIndex].transform.position = gameObject.transform.position;
  2568. mLight[selectLightIndex] = gLight[selectLightIndex].AddComponent<MouseDrag6>();
  2569. mLight[selectLightIndex].obj = gLight[selectLightIndex];
  2570. mLight[selectLightIndex].maid = gameObject.gameObject;
  2571. mLight[selectLightIndex].angles = gameObject.gameObject.transform.eulerAngles;
  2572. gLight[selectLightIndex].transform.localScale = new Vector3(0.12f, 0.12f, 0.12f);
  2573. mLight[selectLightIndex].ido = 1;
  2574. mLight[selectLightIndex].isScale = false;
  2575. }
  2576. }
  2577. if (GUI.Button(new Rect(GetPix(153), GetPix(185), GetPix(23), GetPix(23)),
  2578. "R",
  2579. guistyle3))
  2580. {
  2581. for (int i = 1; i < lightList.Count; i++)
  2582. {
  2583. Destroy(lightList[i]);
  2584. }
  2585. lightIndex = new List<int>
  2586. {
  2587. 0
  2588. };
  2589. lightColorR = new List<float>
  2590. {
  2591. 1f
  2592. };
  2593. lightColorG = new List<float>
  2594. {
  2595. 1f
  2596. };
  2597. lightColorB = new List<float>
  2598. {
  2599. 1f
  2600. };
  2601. lightX = new List<float>
  2602. {
  2603. 40f
  2604. };
  2605. lightY = new List<float>
  2606. {
  2607. 180f
  2608. };
  2609. lightAkarusa = new List<float>
  2610. {
  2611. 0.95f
  2612. };
  2613. lightKage = new List<float>
  2614. {
  2615. 0.098f
  2616. };
  2617. lightRange = new List<float>
  2618. {
  2619. 50f
  2620. };
  2621. lightCombo.selectedItemIndex = 0;
  2622. lightList = new List<GameObject>
  2623. {
  2624. GameMain.Instance.MainLight.gameObject
  2625. };
  2626. lightComboList = new GUIContent[lightList.Count];
  2627. for (int i = 0; i < lightList.Count; i++)
  2628. {
  2629. if (i == 0)
  2630. {
  2631. lightComboList[i] = new GUIContent("メイン");
  2632. }
  2633. else
  2634. {
  2635. lightComboList[i] = new GUIContent("追加" + i);
  2636. }
  2637. }
  2638. selectLightIndex = 0;
  2639. GameMain.Instance.MainLight.Reset();
  2640. GameMain.Instance.MainLight.SetIntensity(0.95f);
  2641. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 50f;
  2642. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  2643. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0f, 2f, 0f);
  2644. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  2645. bgObject.SetActive(true);
  2646. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0f, 0f, 0f);
  2647. isIdx1 = false;
  2648. isIdx2 = false;
  2649. isIdx3 = false;
  2650. isIdx4 = false;
  2651. }
  2652. GUI.enabled = true;
  2653. if (doguCombo.isClickedComboButton || bgCombo.isClickedComboButton || bgmCombo.isClickedComboButton)
  2654. {
  2655. GUI.enabled = false;
  2656. }
  2657. listStyle3.padding.top = GetPix(0);
  2658. listStyle3.padding.bottom = GetPix(0);
  2659. listStyle3.fontSize = GetPix(12);
  2660. GUI.Label(new Rect(GetPix(8), GetPix(116), GetPix(150), GetPix(25)),
  2661. "大道具2",
  2662. guistyle2);
  2663. parIndex = parCombo.List(new Rect(GetPix(51),
  2664. GetPix(113),
  2665. GetPix(100),
  2666. GetPix(23)),
  2667. parComboList[parIndex].text,
  2668. parComboList,
  2669. guistyle4,
  2670. "box",
  2671. listStyle3);
  2672. if (GUI.Button(new Rect(GetPix(156), GetPix(113), GetPix(38), GetPix(23)),
  2673. "追加",
  2674. guistyle3))
  2675. {
  2676. GameObject gameObject2 = null;
  2677. bool flag5 = false;
  2678. bool flag6 = false;
  2679. if (parArray[parIndex].Contains("#"))
  2680. {
  2681. string[] array3 = parArray[parIndex].Split(new char[] { '#' });
  2682. gameObject2 = GameMain.Instance.BgMgr.CreateAssetBundle(array3[1]);
  2683. if (gameObject2 != null)
  2684. {
  2685. gameObject2 = Instantiate(gameObject2);
  2686. MeshRenderer[] componentsInChildren = gameObject2.GetComponentsInChildren<MeshRenderer>();
  2687. for (int k = 0; k < componentsInChildren.Length; k++)
  2688. {
  2689. if (componentsInChildren[k] != null)
  2690. {
  2691. componentsInChildren[k].shadowCastingMode = ShadowCastingMode.Off;
  2692. }
  2693. }
  2694. }
  2695. flag5 = true;
  2696. if (!parArray[parIndex].Contains("Odogu_"))
  2697. {
  2698. flag6 = true;
  2699. }
  2700. doguBObject.Add(gameObject2);
  2701. }
  2702. else if (!parArray[parIndex].StartsWith("mirror") && parArray[parIndex].IndexOf(":") < 0)
  2703. {
  2704. Object @object = Resources.Load("Prefab/" + parArray[parIndex]);
  2705. gameObject2 = Instantiate(@object) as GameObject;
  2706. doguBObject.Add(gameObject2);
  2707. }
  2708. else if (parArray[parIndex].StartsWith("mirror"))
  2709. {
  2710. Material material2 = new Material(Shader.Find("Mirror"));
  2711. GameObject gameObject3 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  2712. gameObject3.GetComponent<Renderer>().material = material2;
  2713. gameObject3.AddComponent<MirrorReflection2>();
  2714. MirrorReflection2 component2 = gameObject3.GetComponent<MirrorReflection2>();
  2715. component2.m_TextureSize = 2048;
  2716. component2.m_ClipPlaneOffset = 0.07f;
  2717. gameObject3.GetComponent<Renderer>().enabled = true;
  2718. gameObject2 = gameObject3;
  2719. doguBObject.Add(gameObject2);
  2720. }
  2721. else
  2722. {
  2723. string[] array3 = parArray[parIndex].Split(new char[] { ':' });
  2724. Object @object = GameMain.Instance.BgMgr.CreateAssetBundle(array3[0]);
  2725. if (@object == null)
  2726. {
  2727. @object = Resources.Load("BG/" + array3[0]);
  2728. }
  2729. GameObject gameObject4 = Instantiate(@object) as GameObject;
  2730. int num8 = 0;
  2731. int.TryParse(array3[1], out int num9);
  2732. foreach (object obj in gameObject4.transform)
  2733. {
  2734. Transform transform = (Transform)obj;
  2735. if (num9 == num8)
  2736. {
  2737. gameObject2 = transform.gameObject;
  2738. break;
  2739. }
  2740. num8++;
  2741. }
  2742. doguBObject.Add(gameObject2);
  2743. gameObject2.transform.parent = null;
  2744. Destroy(gameObject4);
  2745. gameObject4.SetActive(false);
  2746. }
  2747. gameObject2.name = parArray[parIndex];
  2748. Vector3 zero = Vector3.zero;
  2749. Vector3 zero2 = Vector3.zero;
  2750. switch (parIndex)
  2751. {
  2752. case 0:
  2753. zero.z = -0.6f;
  2754. zero.y = 0.96f;
  2755. zero2.z = 180f;
  2756. zero2.x = -90f;
  2757. gameObject2.transform.localScale = new Vector3(0.2f, 0.4f, 0.2f);
  2758. break;
  2759. case 1:
  2760. zero.z = -0.6f;
  2761. zero.y = 0.96f;
  2762. zero2.z = 180f;
  2763. zero2.x = -90f;
  2764. gameObject2.transform.localScale = new Vector3(0.1f, 0.4f, 0.2f);
  2765. break;
  2766. case 2:
  2767. zero.z = -0.6f;
  2768. zero.y = 0.85f;
  2769. zero2.z = 180f;
  2770. zero2.x = -90f;
  2771. gameObject2.transform.localScale = new Vector3(0.03f, 0.18f, 0.124f);
  2772. break;
  2773. case 3:
  2774. case 4:
  2775. case 5:
  2776. case 6:
  2777. case 7:
  2778. case 8:
  2779. case 9:
  2780. case 10:
  2781. case 11:
  2782. case 12:
  2783. case 13:
  2784. case 14:
  2785. case 15:
  2786. case 16:
  2787. case 17:
  2788. zero.z = 0.5f;
  2789. zero2.x = -90f;
  2790. break;
  2791. }
  2792. if (flag5)
  2793. {
  2794. zero.z = 0.4f;
  2795. if (flag6)
  2796. {
  2797. zero2.x = -90f;
  2798. }
  2799. }
  2800. if (gameObject2.name == "Salon_Entrance:3" || gameObject2.name == "Salon_Entrance:4"
  2801. || gameObject2.name == "Salon_Entrance:1"
  2802. || gameObject2.name == "Salon_Entrance:2"
  2803. || gameObject2.name == "Salon_Entrance:0" || gameObject2.name == "Shitsumu:23"
  2804. || gameObject2.name == "Shitsumu_Night:23")
  2805. {
  2806. zero.z = 0.5f;
  2807. zero2.x = -90f;
  2808. }
  2809. if (gameObject2.name == "Pool:26")
  2810. {
  2811. zero.z = 0.5f;
  2812. zero2.x = -90f;
  2813. zero2.z = 90f;
  2814. zero.y = 0.15f;
  2815. }
  2816. if (gameObject2.name == "Particle/pstarY_act2")
  2817. {
  2818. zero2.y = 90f;
  2819. }
  2820. gameObject2.transform.localPosition = zero;
  2821. gameObject2.transform.localRotation = Quaternion.Euler(zero2);
  2822. doguCnt = doguBObject.Count - 1;
  2823. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  2824. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  2825. gDogu[doguCnt].layer = 8;
  2826. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  2827. gDogu[doguCnt].SetActive(false);
  2828. gDogu[doguCnt].transform.position = gameObject2.transform.position;
  2829. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  2830. mDogu[doguCnt].obj = gDogu[doguCnt];
  2831. mDogu[doguCnt].maid = gameObject2;
  2832. mDogu[doguCnt].angles = gameObject2.transform.eulerAngles;
  2833. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  2834. mDogu[doguCnt].ido = 1;
  2835. mDogu[doguCnt].isScale = false;
  2836. if (gameObject2.name == "Particle/pLineY")
  2837. {
  2838. mDogu[doguCnt].count = 180;
  2839. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2840. }
  2841. if (gameObject2.name == "Particle/pLineP02")
  2842. {
  2843. mDogu[doguCnt].count = 115;
  2844. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2845. }
  2846. if (gameObject2.name == "Particle/pLine_act2")
  2847. {
  2848. mDogu[doguCnt].count = 90;
  2849. gameObject2.transform.localScale = new Vector3(3f, 3f, 3f);
  2850. }
  2851. if (gameObject2.name == "Particle/pHeart01")
  2852. {
  2853. mDogu[doguCnt].count = 77;
  2854. }
  2855. if (parIndex < 3)
  2856. {
  2857. mDogu[doguCnt].isScale = true;
  2858. mDogu[doguCnt].isScale2 = true;
  2859. mDogu[doguCnt].scale2 = gameObject2.transform.localScale;
  2860. if (parIndex == 0)
  2861. {
  2862. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 5f,
  2863. gameObject2.transform.localScale.y * 5f,
  2864. gameObject2.transform.localScale.z * 5f);
  2865. }
  2866. if (parIndex == 1)
  2867. {
  2868. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 10f,
  2869. gameObject2.transform.localScale.y * 10f,
  2870. gameObject2.transform.localScale.z * 10f);
  2871. }
  2872. if (parIndex == 2)
  2873. {
  2874. mDogu[doguCnt].scale = new Vector3(gameObject2.transform.localScale.x * 33f,
  2875. gameObject2.transform.localScale.y * 33f,
  2876. gameObject2.transform.localScale.z * 33f);
  2877. }
  2878. }
  2879. if (gameObject2.GetComponent<Collider>() != null)
  2880. {
  2881. gameObject2.GetComponent<Collider>().enabled = false;
  2882. }
  2883. }
  2884. GUI.enabled = true;
  2885. if (bgCombo.isClickedComboButton || bgmCombo.isClickedComboButton)
  2886. {
  2887. GUI.enabled = false;
  2888. }
  2889. GUI.Label(new Rect(GetPix(8), GetPix(88), GetPix(100), GetPix(25)),
  2890. "大道具1",
  2891. guistyle2);
  2892. doguBIndex =
  2893. doguCombo.List(new Rect(GetPix(51),
  2894. GetPix(85),
  2895. GetPix(100),
  2896. GetPix(23)),
  2897. doguComboList[doguBIndex].text,
  2898. doguComboList,
  2899. guistyle4,
  2900. "box",
  2901. listStyle3);
  2902. if (GUI.Button(new Rect(GetPix(156), GetPix(85), GetPix(38), GetPix(23)),
  2903. "追加",
  2904. guistyle3))
  2905. {
  2906. GameObject gameObject2 = null;
  2907. if (doguDict.TryGetValue(doguBArray[doguBIndex], out PhotoBGObjectData objResult))
  2908. {
  2909. if (!string.IsNullOrEmpty(objResult.create_prefab_name))
  2910. {
  2911. Object tmpObj = Resources.Load("Prefab/" + objResult.create_prefab_name);
  2912. if (tmpObj == null)
  2913. {
  2914. gameObject2 = null;
  2915. }
  2916. else
  2917. {
  2918. gameObject2 = Instantiate(tmpObj) as GameObject;
  2919. }
  2920. }
  2921. else if (!string.IsNullOrEmpty(objResult.create_asset_bundle_name))
  2922. {
  2923. GameObject gameObject3 = GameMain.Instance.BgMgr.CreateAssetBundle(objResult.create_asset_bundle_name);
  2924. if (gameObject3 == null)
  2925. {
  2926. gameObject2 = null;
  2927. }
  2928. else
  2929. {
  2930. gameObject2 = Instantiate(gameObject3);
  2931. }
  2932. }
  2933. else if (!string.IsNullOrEmpty(objResult.direct_file))
  2934. {
  2935. BasePhotoCustomObject basePhotoCustomObject =
  2936. BasePhotoCustomObject.InstantiateFromFile(transform.gameObject, objResult.direct_file);
  2937. gameObject2 = basePhotoCustomObject.gameObject;
  2938. }
  2939. if (gameObject2 != null)
  2940. {
  2941. doguBObject.Add(gameObject2);
  2942. }
  2943. }
  2944. else if (!doguBArray[doguBIndex].StartsWith("mirror"))
  2945. {
  2946. Object @object;
  2947. if (doguBArray[doguBIndex].StartsWith("BG"))
  2948. {
  2949. string text2 = doguBArray[doguBIndex].Replace("BG", "");
  2950. @object = GameMain.Instance.BgMgr.CreateAssetBundle(text2);
  2951. if (@object == null)
  2952. {
  2953. @object = Resources.Load("BG/" + text2);
  2954. }
  2955. }
  2956. else
  2957. {
  2958. @object = Resources.Load("Prefab/" + doguBArray[doguBIndex]);
  2959. }
  2960. gameObject2 = Instantiate(@object) as GameObject;
  2961. doguBObject.Add(gameObject2);
  2962. }
  2963. else
  2964. {
  2965. Material material2 = new Material(Shader.Find("Mirror"));
  2966. GameObject gameObject3 = GameObject.CreatePrimitive(PrimitiveType.Plane);
  2967. gameObject3.transform.localScale = new Vector3(0.3f, 1f, 0.3f);
  2968. gameObject3.GetComponent<Renderer>().material = material2;
  2969. gameObject3.AddComponent<MirrorReflection2>();
  2970. MirrorReflection2 component2 = gameObject3.GetComponent<MirrorReflection2>();
  2971. component2.m_TextureSize = 2048;
  2972. component2.m_ClipPlaneOffset = 0f;
  2973. gameObject3.GetComponent<Renderer>().enabled = true;
  2974. gameObject2 = gameObject3;
  2975. doguBObject.Add(gameObject2);
  2976. }
  2977. gameObject2.name = doguBArray[doguBIndex];
  2978. Vector3 zero = Vector3.zero;
  2979. Vector3 zero2 = Vector3.zero;
  2980. string text = gameObject2.name;
  2981. switch (text)
  2982. {
  2983. case "Odogu_XmasTreeMini_photo_ver":
  2984. zero.z = 0.6f;
  2985. gameObject2.transform.localScale = new Vector3(4.5f, 4.5f, 4.5f);
  2986. foreach (object obj2 in gameObject2.transform)
  2987. {
  2988. Transform transform2 = (Transform)obj2;
  2989. if (transform2.GetComponent<Collider>() != null)
  2990. {
  2991. transform2.GetComponent<Collider>().enabled = false;
  2992. }
  2993. }
  2994. goto IL_A0BF;
  2995. case "Odogu_KadomatsuMini_photo_ver":
  2996. zero.z = 0.6f;
  2997. gameObject2.transform.localScale = new Vector3(3.5f, 3.5f, 3.5f);
  2998. foreach (object obj3 in gameObject2.transform)
  2999. {
  3000. Transform transform2 = (Transform)obj3;
  3001. if (transform2.GetComponent<Collider>() != null)
  3002. {
  3003. transform2.GetComponent<Collider>().enabled = false;
  3004. }
  3005. }
  3006. goto IL_A0BF;
  3007. case "Odogu_ClassRoomDesk":
  3008. zero.z = 0.5f;
  3009. zero2.x = -90f;
  3010. goto IL_A0BF;
  3011. case "Odogu_SimpleTable":
  3012. zero.z = 0.5f;
  3013. zero2.x = -90f;
  3014. goto IL_A0BF;
  3015. case "Odogu_DildoBox":
  3016. zero.z = 0.5f;
  3017. zero2.x = -90f;
  3018. goto IL_A0BF;
  3019. case "PlayAreaOut":
  3020. zero.z = 0.5f;
  3021. zero.y = 0.2f;
  3022. goto IL_A0BF;
  3023. case "Odogu_Dresser_photo_ver":
  3024. GameObject.Find("Prim.00000000").GetComponent<Collider>().enabled = false;
  3025. GameObject.Find("Prim.00000001").GetComponent<Collider>().enabled = false;
  3026. GameObject.Find("Prim.00000002").GetComponent<Collider>().enabled = false;
  3027. GameObject.Find("Prim.00000004").GetComponent<Collider>().enabled = false;
  3028. goto IL_A0BF;
  3029. case "BGodogu_bbqgrill":
  3030. case "BGodogu_bucket":
  3031. case "BGodogu_coolerbox":
  3032. case "BGodogu_game_darts":
  3033. case "BGodogu_game_dartsboard":
  3034. case "BGodogu_nabe_huta":
  3035. case "BGodogu_nabe_water":
  3036. case "BGodogu_natumikan":
  3037. case "BGodogu_rb_chair":
  3038. case "BGodogu_rb_duck":
  3039. case "BGodogu_rb_obon":
  3040. case "BGodogu_rb_tokkuri":
  3041. case "BGodogu_saracorn":
  3042. case "BGodogu_saraimo":
  3043. case "BGodogu_saratomato":
  3044. case "BGodogu_sunanoshiro":
  3045. case "BGodogu_sunanoyama":
  3046. case "BGodogu_tsutsuhanabi":
  3047. case "BGodogu_ukiwa":
  3048. case "BGodogu_vf_crops_corn":
  3049. case "BGodogu_vf_crops_gekkabijin":
  3050. case "BGodogu_vf_crops_gekkabijinflower":
  3051. case "BGodogu_vf_crops_himawari":
  3052. case "BGodogu_vf_crops_natsumikan":
  3053. case "BGodogu_vf_crops_suika":
  3054. case "BGodogu_vf_crops_zakuro":
  3055. case "BGodogu_villa_table":
  3056. case "BGodogu_villa_tvrimocon":
  3057. case "BGodogu_villabr_sideboard":
  3058. case "BGOdogu_Game_Nei_USB":
  3059. case "BGOdogu_Game_Wanage":
  3060. case "BGOdogu_Game_Wa":
  3061. case "BGodogu_pafe":
  3062. case "BGodogu_furaidopoteto":
  3063. case "BGodogu_karaoketable":
  3064. case "BGodogu_omuriceh":
  3065. case "BGodogu_omuricekao1":
  3066. case "BGodogu_omuricekao2":
  3067. case "BGodogu_omuriceoppai":
  3068. case "BGodogu_kakigori":
  3069. case "BGodogu_pretzel_sara":
  3070. case "BGodogu_karaoke_box":
  3071. case "Odogu_StandMike":
  3072. case "Odogu_StandMikeBase":
  3073. case "Odogu_HeroineChair_muku":
  3074. case "Odogu_HeroineChair_mazime":
  3075. case "Odogu_HeroineChair_rindere":
  3076. case "Odogu_HeroineChair_tsumdere":
  3077. case "Odogu_HeroineChair_cooldere":
  3078. case "Odogu_HeroineChair_junshin":
  3079. case "Odogu_TabletPC":
  3080. case "Odogu_Styluspen_black":
  3081. case "Odogu_Styluspen_white":
  3082. case "Odogu_Styluspen_red":
  3083. case "Odogu_Styluspen_blue":
  3084. case "Odogu_Styluspen_yellow":
  3085. case "Odogu_Styluspen_green":
  3086. case "Odogu_Omurice1":
  3087. case "Odogu_Omurice3":
  3088. case "Odogu_OmuriceH":
  3089. case "Odogu_OmuriceKao1":
  3090. case "Odogu_OmuriceKao2":
  3091. case "Odogu_OmuriceOppai":
  3092. case "Odogu_AcquaPazza":
  3093. case "Odogu_Sandwich":
  3094. case "Odogu_vichyssoise":
  3095. case "Odogu_BirthdayCake":
  3096. case "Odogu_Shortcake":
  3097. case "Odogu_MontBlanc":
  3098. case "Odogu_Pafe":
  3099. case "Odogu_Smoothie_Red":
  3100. case "Odogu_Smoothie_Green":
  3101. case "Odogu_Cocktail_Red":
  3102. case "Odogu_Cocktail_Blue":
  3103. case "Odogu_Cocktail_Yellow":
  3104. case "Odogu_Coffiecup":
  3105. case "Odogu_WineBottle(cap_off)":
  3106. case "Odogu_WineBottle(cap_on)":
  3107. case "Odogu_Jyouro":
  3108. case "Odogu_Planter_Red":
  3109. case "Odogu_Planter_Lightblue":
  3110. case "Odogu_MariGold":
  3111. case "Odogu_CasinoChip_10":
  3112. case "Odogu_CasinoChip_100":
  3113. case "Odogu_CasinoChip_1000":
  3114. case "Odogu_CardShooter":
  3115. case "Odogu_CardsDeck":
  3116. case "Odogu_Card_s1":
  3117. case "Odogu_Card_s2":
  3118. case "Odogu_Card_s3":
  3119. case "Odogu_Card_s4":
  3120. case "Odogu_Card_s5":
  3121. case "Odogu_Card_s6":
  3122. case "Odogu_Card_s7":
  3123. case "Odogu_Card_s8":
  3124. case "Odogu_Card_s9":
  3125. case "Odogu_Card_s10":
  3126. case "Odogu_Card_s11":
  3127. case "Odogu_Card_s12":
  3128. case "Odogu_Card_s13":
  3129. case "Odogu_Card_h1":
  3130. case "Odogu_Card_h2":
  3131. case "Odogu_Card_h3":
  3132. case "Odogu_Card_h4":
  3133. case "Odogu_Card_h5":
  3134. case "Odogu_Card_h6":
  3135. case "Odogu_Card_h7":
  3136. case "Odogu_Card_h8":
  3137. case "Odogu_Card_h9":
  3138. case "Odogu_Card_h10":
  3139. case "Odogu_Card_h11":
  3140. case "Odogu_Card_h12":
  3141. case "Odogu_Card_h13":
  3142. case "Odogu_Card_d1":
  3143. case "Odogu_Card_d2":
  3144. case "Odogu_Card_d3":
  3145. case "Odogu_Card_d4":
  3146. case "Odogu_Card_d5":
  3147. case "Odogu_Card_d6":
  3148. case "Odogu_Card_d7":
  3149. case "Odogu_Card_d8":
  3150. case "Odogu_Card_d9":
  3151. case "Odogu_Card_d10":
  3152. case "Odogu_Card_d11":
  3153. case "Odogu_Card_d12":
  3154. case "Odogu_Card_d13":
  3155. case "Odogu_Card_c1":
  3156. case "Odogu_Card_c2":
  3157. case "Odogu_Card_c3":
  3158. case "Odogu_Card_c4":
  3159. case "Odogu_Card_c5":
  3160. case "Odogu_Card_c6":
  3161. case "Odogu_Card_c7":
  3162. case "Odogu_Card_c8":
  3163. case "Odogu_Card_c9":
  3164. case "Odogu_Card_c10":
  3165. case "Odogu_Card_c11":
  3166. case "Odogu_Card_c12":
  3167. case "Odogu_Card_c13":
  3168. case "Odogu_Card_joker":
  3169. zero.z = 0.5f;
  3170. zero2.x = -90f;
  3171. goto IL_A0BF;
  3172. }
  3173. zero.z = 0.5f;
  3174. if (gameObject2.name.StartsWith("Odogu_"))
  3175. {
  3176. foreach (object obj4 in gameObject2.transform)
  3177. {
  3178. Transform transform2 = (Transform)obj4;
  3179. if (transform2.GetComponent<Collider>() != null)
  3180. {
  3181. transform2.GetComponent<Collider>().enabled = false;
  3182. }
  3183. }
  3184. }
  3185. else if (gameObject2.GetComponent<Collider>() != null)
  3186. {
  3187. gameObject2.GetComponent<Collider>().enabled = false;
  3188. }
  3189. IL_A0BF:
  3190. gameObject2.transform.localPosition = zero;
  3191. gameObject2.transform.localRotation = Quaternion.Euler(zero2);
  3192. doguCnt = doguBObject.Count - 1;
  3193. gDogu[doguCnt] = GameObject.CreatePrimitive(PrimitiveType.Cube);
  3194. gDogu[doguCnt].GetComponent<Renderer>().material = m_material;
  3195. gDogu[doguCnt].layer = 8;
  3196. gDogu[doguCnt].GetComponent<Renderer>().enabled = false;
  3197. gDogu[doguCnt].SetActive(false);
  3198. gDogu[doguCnt].transform.position = gameObject2.transform.position;
  3199. mDogu[doguCnt] = gDogu[doguCnt].AddComponent<MouseDrag6>();
  3200. mDogu[doguCnt].isScale = false;
  3201. mDogu[doguCnt].obj = gDogu[doguCnt];
  3202. mDogu[doguCnt].maid = gameObject2;
  3203. mDogu[doguCnt].angles = gameObject2.transform.eulerAngles;
  3204. gDogu[doguCnt].transform.localScale = new Vector3(cubeSize, cubeSize, cubeSize);
  3205. mDogu[doguCnt].ido = 1;
  3206. if (doguBIndex == 6 || doguBIndex == 7)
  3207. {
  3208. mDogu[doguCnt].isScale2 = true;
  3209. mDogu[doguCnt].scale2 = gameObject2.transform.localScale;
  3210. }
  3211. }
  3212. GUI.EndScrollView();
  3213. GUI.enabled = true;
  3214. if (bgmCombo.isClickedComboButton)
  3215. {
  3216. GUI.enabled = false;
  3217. }
  3218. listStyle3.padding.top = GetPix(1);
  3219. listStyle3.padding.bottom = GetPix(0);
  3220. listStyle3.fontSize = GetPix(12);
  3221. int num10 = bgCombo.List(new Rect(GetPix(31),
  3222. GetPix(53),
  3223. GetPix(95),
  3224. GetPix(23)),
  3225. bgComboList[bgIndex].text,
  3226. bgComboList,
  3227. guistyle4,
  3228. "box",
  3229. listStyle3);
  3230. if (GUI.Button(new Rect(GetPix(5), GetPix(53), GetPix(23), GetPix(23)),
  3231. "<",
  3232. guistyle3))
  3233. {
  3234. num10--;
  3235. if (num10 <= -1)
  3236. {
  3237. num10 = bgArray.Length - 1;
  3238. }
  3239. }
  3240. if (GUI.Button(new Rect(GetPix(129), GetPix(53), GetPix(23), GetPix(23)),
  3241. ">",
  3242. guistyle3))
  3243. {
  3244. num10++;
  3245. if (num10 == bgArray.Length)
  3246. {
  3247. num10 = 0;
  3248. }
  3249. }
  3250. if (bgIndex != num10)
  3251. {
  3252. bgIndex = num10;
  3253. bg.localScale = new Vector3(1f, 1f, 1f);
  3254. if (bgArray[bgIndex].Length == 36)
  3255. {
  3256. GameMain.Instance.BgMgr.ChangeBgMyRoom(bgArray[bgIndex]);
  3257. }
  3258. else
  3259. {
  3260. GameMain.Instance.BgMgr.ChangeBg(bgArray[bgIndex]);
  3261. }
  3262. bgCombo.selectedItemIndex = bgIndex;
  3263. if (bgArray[bgIndex] == "karaokeroom")
  3264. {
  3265. bg.transform.position = bgObject.transform.position;
  3266. Vector3 zero = Vector3.zero;
  3267. Vector3 zero2 = Vector3.zero;
  3268. zero2.y = 90f;
  3269. zero.z = 4f;
  3270. zero.x = 1f;
  3271. bg.transform.localPosition = zero;
  3272. bg.transform.localRotation = Quaternion.Euler(zero2);
  3273. }
  3274. }
  3275. GUI.enabled = true;
  3276. int num11 = bgmCombo.List(new Rect(GetPix(31),
  3277. GetPix(25),
  3278. GetPix(95),
  3279. GetPix(23)),
  3280. bgmComboList[bgmIndex].text,
  3281. bgmComboList,
  3282. guistyle4,
  3283. "box",
  3284. listStyle3);
  3285. if (GUI.Button(new Rect(GetPix(5), GetPix(25), GetPix(23), GetPix(23)),
  3286. "<",
  3287. guistyle3))
  3288. {
  3289. num11--;
  3290. if (num11 <= -1)
  3291. {
  3292. num11 = bgmArray.Length - 1;
  3293. }
  3294. }
  3295. if (GUI.Button(new Rect(GetPix(129), GetPix(25), GetPix(23), GetPix(23)),
  3296. ">",
  3297. guistyle3))
  3298. {
  3299. num11++;
  3300. if (num11 == bgmArray.Length)
  3301. {
  3302. num11 = 0;
  3303. }
  3304. }
  3305. if (bgmIndex != num11)
  3306. {
  3307. bgmIndex = num11;
  3308. GameMain.Instance.SoundMgr.PlayBGM(bgmArray[bgmIndex] + ".ogg", 0f, true);
  3309. bgmCombo.selectedItemIndex = bgmIndex;
  3310. }
  3311. GUI.DragWindow();
  3312. if (bgmCombo.isClickedComboButton)
  3313. {
  3314. GUI.enabled = false;
  3315. }
  3316. }
  3317. private void PoseWindow(int winID)
  3318. {
  3319. GUIStyle style1 = "label";
  3320. style1.fontSize = GetPix(12);
  3321. style1.alignment = TextAnchor.UpperLeft;
  3322. GUIStyle style2 = "label";
  3323. style2.fontSize = GetPix(11);
  3324. style2.alignment = TextAnchor.UpperLeft;
  3325. GUIStyle style3 = "button";
  3326. style3.fontSize = GetPix(20);
  3327. GUIStyle buttonStyle1 = "button";
  3328. buttonStyle1.fontSize = GetPix(14);
  3329. buttonStyle1.alignment = TextAnchor.MiddleLeft;
  3330. GUIStyle buttonStyle2 = "button";
  3331. buttonStyle2.fontSize = GetPix(12);
  3332. buttonStyle2.alignment = TextAnchor.MiddleLeft;
  3333. GUIStyle style4 = new GUIStyle("toggle")
  3334. {
  3335. fontSize = GetPix(13)
  3336. };
  3337. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  3338. Maid maid = maidArray[selectMaidIndex];
  3339. if (!poseInitFlg)
  3340. {
  3341. listStyle2.normal.textColor = Color.white;
  3342. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  3343. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  3344. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  3345. listStyle2.fontSize = GetPix(12);
  3346. listStyle3.normal.textColor = Color.white;
  3347. listStyle3.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  3348. listStyle3.onHover.background = listStyle3.hover.background = new Texture2D(2, 2);
  3349. listStyle3.padding.left = listStyle3.padding.right = listStyle3.padding.top = GetPix(1);
  3350. listStyle3.padding.bottom = GetPix(0);
  3351. listStyle3.fontSize = GetPix(12);
  3352. listStyle4.normal.textColor = Color.white;
  3353. listStyle4.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  3354. listStyle4.onHover.background = listStyle4.hover.background = new Texture2D(2, 2);
  3355. listStyle4.padding.left = listStyle4.padding.right = listStyle4.padding.top = 3;
  3356. listStyle4.padding.bottom = 3;
  3357. listStyle4.fontSize = GetPix(13);
  3358. poseCombo.selectedItemIndex = 0;
  3359. int group = (int)groupList[0];
  3360. poseComboList = new GUIContent[group];
  3361. for (int index = 0; index < group; ++index)
  3362. {
  3363. poseComboList[index] = new GUIContent((index + 1).ToString() + ":" + poseArray[index]);
  3364. }
  3365. poseGroupCombo.selectedItemIndex = 0;
  3366. poseGroupComboList = new GUIContent[poseGroupArray.Length + 1];
  3367. poseGroupComboList[0] = new GUIContent("1:通常");
  3368. for (int index = 0; index < poseGroupArray.Length; ++index)
  3369. {
  3370. if (poseGroupArray[index] == "maid_dressroom01")
  3371. {
  3372. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":立ち");
  3373. }
  3374. if (poseGroupArray[index] == "tennis_kamae_f")
  3375. {
  3376. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":中腰");
  3377. }
  3378. if (poseGroupArray[index] == "senakanagasi_f")
  3379. {
  3380. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":膝をつく");
  3381. }
  3382. if (poseGroupArray[index] == "work_hansei")
  3383. {
  3384. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":座り");
  3385. }
  3386. if (poseGroupArray[index] == "inu_taiki_f")
  3387. {
  3388. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":四つん這い");
  3389. }
  3390. if (poseGroupArray[index] == "syagami_pose_f")
  3391. {
  3392. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":床座り");
  3393. }
  3394. if (poseGroupArray[index] == "densyasuwari_taiki_f")
  3395. {
  3396. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":椅子座り");
  3397. }
  3398. if (poseGroupArray[index] == "work_kaiwa")
  3399. {
  3400. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ソファー座り");
  3401. }
  3402. if (poseGroupArray[index] == "dance_cm3d2_001_f1,14.14")
  3403. {
  3404. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ドキドキ☆Fallin' Love");
  3405. }
  3406. if (poseGroupArray[index] == "dance_cm3d_001_f1,39.25")
  3407. {
  3408. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":entrance to you");
  3409. }
  3410. if (poseGroupArray[index] == "dance_cm3d_002_end_f1,50.71")
  3411. {
  3412. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":scarlet leap");
  3413. }
  3414. if (poseGroupArray[index] == "dance_cm3d2_002_smt_f,7.76,")
  3415. {
  3416. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":stellar my tears");
  3417. }
  3418. if (poseGroupArray[index] == "dance_cm3d_003_sp2_f1,90.15")
  3419. {
  3420. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":rhythmix to you");
  3421. }
  3422. if (poseGroupArray[index] == "dance_cm3d2_003_hs_f1,0.01,")
  3423. {
  3424. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":happy!happy!スキャンダル!!");
  3425. }
  3426. if (poseGroupArray[index] == "dance_cm3d_004_kano_f1,124.93")
  3427. {
  3428. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":Can Know Two Close");
  3429. }
  3430. if (poseGroupArray[index] == "dance_cm3d2_004_sse_f1,0.01")
  3431. {
  3432. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":sweet sweet everyday");
  3433. }
  3434. if (poseGroupArray[index] == "turusi_sex_in_taiki_f")
  3435. {
  3436. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":拘束");
  3437. }
  3438. if (poseGroupArray[index] == "rosyutu_pose01_f")
  3439. {
  3440. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ");
  3441. }
  3442. if (poseGroupArray[index] == "rosyutu_aruki_f_once_,1.37")
  3443. {
  3444. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":歩き");
  3445. }
  3446. if (poseGroupArray[index] == "stand_desk1")
  3447. {
  3448. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":その他");
  3449. }
  3450. if (poseGroupArray[index] == poseArray5[0])
  3451. {
  3452. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ダンスMC");
  3453. }
  3454. if (poseGroupArray[index] == poseArray6[0])
  3455. {
  3456. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":ダンス");
  3457. }
  3458. if (existPose && strS != "")
  3459. {
  3460. if (index == poseGroupArray.Length - 4)
  3461. {
  3462. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  3463. }
  3464. if (index == poseGroupArray.Length - 3)
  3465. {
  3466. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  3467. }
  3468. if (index == poseGroupArray.Length - 2)
  3469. {
  3470. poseGroupComboList[index + 1] = new GUIContent("98:撮影モード");
  3471. }
  3472. if (index == poseGroupArray.Length - 1)
  3473. {
  3474. poseGroupComboList[index + 1] = new GUIContent("99:登録ポーズ");
  3475. }
  3476. }
  3477. else if (existPose && strS == "")
  3478. {
  3479. if (index == poseGroupArray.Length - 3)
  3480. {
  3481. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  3482. }
  3483. if (index == poseGroupArray.Length - 2)
  3484. {
  3485. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  3486. }
  3487. if (index == poseGroupArray.Length - 1)
  3488. {
  3489. poseGroupComboList[index + 1] = new GUIContent("99:登録ポーズ");
  3490. }
  3491. }
  3492. else if (!existPose && strS != "")
  3493. {
  3494. if (index == poseGroupArray.Length - 3)
  3495. {
  3496. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  3497. }
  3498. if (index == poseGroupArray.Length - 2)
  3499. {
  3500. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  3501. }
  3502. if (index == poseGroupArray.Length - 1)
  3503. {
  3504. poseGroupComboList[index + 1] = new GUIContent("98:撮影モード");
  3505. }
  3506. }
  3507. else
  3508. {
  3509. if (index == poseGroupArray.Length - 2)
  3510. {
  3511. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":通常2");
  3512. }
  3513. if (index == poseGroupArray.Length - 1)
  3514. {
  3515. poseGroupComboList[index + 1] = new GUIContent((index + 2).ToString() + ":エロ2");
  3516. }
  3517. }
  3518. }
  3519. poseInitFlg = true;
  3520. itemCombo.selectedItemIndex = 0;
  3521. int length = itemArray.Length;
  3522. itemComboList = new GUIContent[length - 1];
  3523. for (int index = 0; index < length; ++index)
  3524. {
  3525. if (index == 0)
  3526. {
  3527. itemComboList[index] = new GUIContent("アイテム無し");
  3528. }
  3529. else
  3530. {
  3531. switch (itemArray[index])
  3532. {
  3533. case "handitem,HandItemR_WineGlass_I_.menu":
  3534. itemComboList[index] = new GUIContent(index.ToString() + ":ワイングラス");
  3535. break;
  3536. case "handitem,HandItemR_WineBottle_I_.menu":
  3537. itemComboList[index] = new GUIContent(index.ToString() + ":ワインボトル");
  3538. break;
  3539. case "handitem,handitemr_racket_I_.menu":
  3540. itemComboList[index] = new GUIContent(index.ToString() + ":ラケット");
  3541. break;
  3542. case "handitem,HandItemR_Hataki_I_.menu":
  3543. itemComboList[index] = new GUIContent(index.ToString() + ":ハタキ");
  3544. break;
  3545. case "handitem,HandItemR_Mop_I_.menu":
  3546. itemComboList[index] = new GUIContent(index.ToString() + ":モップ");
  3547. break;
  3548. case "handitem,HandItemR_Houki_I_.menu":
  3549. itemComboList[index] = new GUIContent(index.ToString() + ":ほうき");
  3550. break;
  3551. case "handitem,HandItemR_Zoukin2_I_.menu":
  3552. itemComboList[index] = new GUIContent(index.ToString() + ":雑巾");
  3553. break;
  3554. case "handitem,HandItemR_Chu-B_Lip_I_.menu":
  3555. itemComboList[index] = new GUIContent(index.ToString() + ":Chu-B Lip");
  3556. break;
  3557. case "handitem,HandItemR_Mimikaki_I_.menu":
  3558. itemComboList[index] = new GUIContent(index.ToString() + ":耳かき");
  3559. break;
  3560. case "handitem,HandItemR_Pen_I_.menu":
  3561. itemComboList[index] = new GUIContent(index.ToString() + ":ペン");
  3562. break;
  3563. case "handitem,HandItemR_Otama_I_.menu":
  3564. itemComboList[index] = new GUIContent(index.ToString() + ":おたま");
  3565. break;
  3566. case "handitem,HandItemR_Houchou_I_.menu":
  3567. itemComboList[index] = new GUIContent(index.ToString() + ":包丁");
  3568. break;
  3569. case "handitem,HandItemR_Book_I_.menu":
  3570. itemComboList[index] = new GUIContent(index.ToString() + ":本");
  3571. break;
  3572. case "handitem,HandItemR_Puff_I_.menu":
  3573. itemComboList[index] = new GUIContent(index.ToString() + ":パフ");
  3574. break;
  3575. case "handitem,HandItemR_Rip_I_.menu":
  3576. itemComboList[index] = new GUIContent(index.ToString() + ":リップ");
  3577. break;
  3578. case "handitem,HandItemD_Shisyuu_Hari_I_.menu":
  3579. itemComboList[index] = new GUIContent(index.ToString() + ":刺繍");
  3580. break;
  3581. case "handitem,HandItemD_Sara_Sponge_I_.menu":
  3582. itemComboList[index] = new GUIContent(index.ToString() + ":皿・スポンジ");
  3583. break;
  3584. case "kousoku_upper,KousokuU_TekaseOne_I_.menu":
  3585. itemComboList[index] = new GUIContent(index.ToString() + ":手枷1");
  3586. break;
  3587. case "kousoku_upper,KousokuU_TekaseTwo_I_.menu":
  3588. itemComboList[index] = new GUIContent(index.ToString() + ":手枷2");
  3589. break;
  3590. case "kousoku_lower,KousokuL_AshikaseUp_I_.menu":
  3591. itemComboList[index] = new GUIContent(index.ToString() + ":足枷");
  3592. break;
  3593. case "handitem,HandItemR_Usuba_Houchou_I_.menu":
  3594. itemComboList[index] = new GUIContent(index.ToString() + "薄刃包丁");
  3595. break;
  3596. case "handitem,HandItemR_Chusyaki_I_.menu":
  3597. itemComboList[index] = new GUIContent(index.ToString() + "注射器");
  3598. break;
  3599. case "handitem,HandItemR_Nei_Heartful_I_.menu":
  3600. itemComboList[index] = new GUIContent(index.ToString() + "ハートフルねい人形");
  3601. break;
  3602. case "handitem,HandItemR_Shaker_I_.menu":
  3603. itemComboList[index] = new GUIContent(index.ToString() + "シェイカー");
  3604. break;
  3605. case "handitem,HandItemR_SmartPhone_I_.menu":
  3606. itemComboList[index] = new GUIContent(index.ToString() + "スマートフォン");
  3607. break;
  3608. case "kousoku_upper,KousokuU_Ushirode_I_.menu":
  3609. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後ろ手拘束具");
  3610. break;
  3611. case "kousoku_upper,KousokuU_SMRoom_Haritsuke_I_.menu":
  3612. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":磔台・手枷足枷");
  3613. break;
  3614. case "kousoku_upper,KousokuU_SMRoom2_Haritsuke_I_.menu":
  3615. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":磔台・手枷足枷2");
  3616. break;
  3617. case "handitem,HandItemL_Dance_Hataki_I_.menu":
  3618. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンスハタキ");
  3619. break;
  3620. case "handitem,HandItemL_Dance_Mop_I_.menu":
  3621. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンスモップ");
  3622. break;
  3623. case "handitem,HandItemL_Dance_Zoukin_I_.menu":
  3624. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ダンス雑巾");
  3625. break;
  3626. case "handitem,HandItemL_Kozara_I_.menu":
  3627. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":小皿");
  3628. break;
  3629. case "handitem,HandItemR_Teacup_I_.menu":
  3630. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ティーカップ");
  3631. break;
  3632. case "handitem,HandItemL_Teasaucer_I_.menu":
  3633. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ティーソーサー");
  3634. break;
  3635. case "handitem,HandItemR_Wholecake_I_.menu":
  3636. itemComboList[index - 1] = new GUIContent("ホールケーキ");
  3637. break;
  3638. case "handitem,HandItemR_Menu_I_.menu":
  3639. itemComboList[index - 1] = new GUIContent("メニュー表");
  3640. break;
  3641. case "handitem,HandItemR_Vibe_I_.menu":
  3642. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":バイブ");
  3643. break;
  3644. case "handitem,HandItemR_VibePink_I_.menu":
  3645. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":ピンクバイブ");
  3646. break;
  3647. case "handitem,HandItemR_VibeBig_I_.menu":
  3648. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":太バイブ");
  3649. break;
  3650. case "handitem,HandItemR_AnalVibe_I_.menu":
  3651. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":アナルバイブ");
  3652. break;
  3653. case "handitem,HandItemH_SoutouVibe_I_.menu":
  3654. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:双頭バイブ");
  3655. break;
  3656. case "accvag,accVag_Vibe_I_.menu":
  3657. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:バイブ");
  3658. break;
  3659. case "accvag,accVag_VibeBig_I_.menu":
  3660. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:太バイブ");
  3661. break;
  3662. case "accvag,accVag_VibePink_I_.menu":
  3663. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":前:ピンクバイブ");
  3664. break;
  3665. case "accanl,accAnl_AnalVibe_I_.menu":
  3666. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:アナルバイブ");
  3667. break;
  3668. case "accanl,accAnl_Photo_NomalVibe_I_.menu":
  3669. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:バイブ");
  3670. break;
  3671. case "accanl,accAnl_Photo_VibeBig_I_.menu":
  3672. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:太バイブ");
  3673. break;
  3674. case "accanl,accAnl_Photo_VibePink_I_.menu":
  3675. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":後:ピンクバイブ");
  3676. break;
  3677. case "handitem,HandItemL_Etoile_Saucer_I_.menu":
  3678. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "ティーソーサー");
  3679. break;
  3680. case "handitem,HandItemR_Etoile_Teacup_I_.menu":
  3681. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "ティーカップ");
  3682. break;
  3683. case "handitem,HandItemL_Katuramuki_Daikon_I_.menu":
  3684. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "桂むき大根");
  3685. break;
  3686. case "handitem,HandItemL_Karte_I_.menu":
  3687. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "カルテ");
  3688. break;
  3689. case "handitem,HandItemL_Cracker_I_.menu":
  3690. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + "クラッカー");
  3691. break;
  3692. }
  3693. if (index == 12)
  3694. {
  3695. itemComboList[index] = new GUIContent(index.ToString() + ":手枷・足枷");
  3696. }
  3697. if (index == 13)
  3698. {
  3699. itemComboList[index] = new GUIContent(index.ToString() + ":手枷・足枷(下)");
  3700. }
  3701. if (index == 24)
  3702. {
  3703. itemComboList[index - 1] = new GUIContent((index - 1).ToString() + ":カップ&ソーサー");
  3704. }
  3705. }
  3706. }
  3707. }
  3708. if (poseCombo.isClickedComboButton)
  3709. {
  3710. GUI.enabled = false;
  3711. }
  3712. if (poseGroupCombo.isClickedComboButton)
  3713. {
  3714. GUI.enabled = false;
  3715. }
  3716. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  3717. {
  3718. if (!isF6)
  3719. {
  3720. bool flag = true;
  3721. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  3722. {
  3723. flag = false;
  3724. }
  3725. if (GUI.Toggle(new Rect(GetPix(2),
  3726. GetPix(2),
  3727. GetPix(39),
  3728. GetPix(20)),
  3729. flag,
  3730. "配置",
  3731. style4))
  3732. {
  3733. faceFlg = false;
  3734. poseFlg = false;
  3735. sceneFlg = false;
  3736. kankyoFlg = false;
  3737. kankyo2Flg = false;
  3738. bGui = true;
  3739. }
  3740. }
  3741. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  3742. GetPix(2),
  3743. GetPix(39),
  3744. GetPix(20)),
  3745. poseFlg,
  3746. "操作",
  3747. style4))
  3748. {
  3749. poseFlg = true;
  3750. faceFlg = false;
  3751. sceneFlg = false;
  3752. kankyoFlg = false;
  3753. kankyo2Flg = false;
  3754. }
  3755. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  3756. faceFlg,
  3757. "表情",
  3758. style4))
  3759. {
  3760. faceFlg = true;
  3761. poseFlg = false;
  3762. sceneFlg = false;
  3763. kankyoFlg = false;
  3764. kankyo2Flg = false;
  3765. if (!faceFlg2)
  3766. {
  3767. isFaceInit = true;
  3768. faceFlg2 = true;
  3769. maidArray[selectMaidIndex].boMabataki = false;
  3770. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  3771. }
  3772. isFaceInit = true;
  3773. }
  3774. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  3775. kankyoFlg,
  3776. "環境",
  3777. style4))
  3778. {
  3779. poseFlg = false;
  3780. faceFlg = false;
  3781. sceneFlg = false;
  3782. kankyoFlg = true;
  3783. kankyo2Flg = false;
  3784. }
  3785. if (!line1)
  3786. {
  3787. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  3788. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  3789. }
  3790. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  3791. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  3792. style1.fontSize = GetPix(13);
  3793. style1.alignment = TextAnchor.MiddleCenter;
  3794. GUI.Label(new Rect(GetPix(125), GetPix(25), GetPix(40), GetPix(25)),
  3795. string.Concat(selectMaidIndex + 1),
  3796. style1);
  3797. style1.fontSize = GetPix(11);
  3798. style1.alignment = TextAnchor.UpperLeft;
  3799. }
  3800. if (sceneLevel > 0)
  3801. {
  3802. int selectMaidIndex = this.selectMaidIndex;
  3803. if (sceneLevel == 3 || sceneLevel == 5 && (isF7 || maidCnt > 1))
  3804. {
  3805. if (GUI.Button(new Rect(GetPix(5),
  3806. GetPix(53),
  3807. GetPix(23),
  3808. GetPix(32)),
  3809. "<",
  3810. style3))
  3811. {
  3812. --this.selectMaidIndex;
  3813. if (this.selectMaidIndex < 0)
  3814. {
  3815. this.selectMaidIndex = selectList.Count - 1;
  3816. }
  3817. isPoseInit = true;
  3818. poseFlg = true;
  3819. copyIndex = 0;
  3820. poseCombo.selectedItemIndex = poseIndex[this.selectMaidIndex];
  3821. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  3822. }
  3823. if (GUI.Button(new Rect(GetPix(135),
  3824. GetPix(53),
  3825. GetPix(23),
  3826. GetPix(32)),
  3827. ">",
  3828. style3))
  3829. {
  3830. ++this.selectMaidIndex;
  3831. if (selectList.Count <= this.selectMaidIndex)
  3832. {
  3833. this.selectMaidIndex = 0;
  3834. }
  3835. isPoseInit = true;
  3836. poseFlg = true;
  3837. copyIndex = 0;
  3838. poseCombo.selectedItemIndex = poseIndex[this.selectMaidIndex];
  3839. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  3840. }
  3841. }
  3842. if (maidArray[this.selectMaidIndex].GetThumIcon())
  3843. {
  3844. GUI.DrawTexture(new Rect(GetPix(30),
  3845. GetPix(25),
  3846. GetPix(60),
  3847. GetPix(60)),
  3848. maidArray[this.selectMaidIndex].GetThumIcon());
  3849. }
  3850. GUI.Label(new Rect(GetPix(90), GetPix(50), GetPix(140), GetPix(210)),
  3851. maidArray[this.selectMaidIndex].status.lastName + "\n" + maidArray[this.selectMaidIndex].status.firstName,
  3852. style1);
  3853. }
  3854. if (!isF6)
  3855. {
  3856. if (isDanceStop)
  3857. {
  3858. isStop[selectMaidIndex] = true;
  3859. isDanceStop = false;
  3860. }
  3861. if (sceneLevel == 5 && maidCnt > 1)
  3862. {
  3863. bool flag = false;
  3864. if (selectMaidIndex == isEditNo)
  3865. {
  3866. flag = true;
  3867. }
  3868. isEdit[selectMaidIndex] =
  3869. GUI.Toggle(new Rect(GetPix(5),
  3870. GetPix(25),
  3871. GetPix(50),
  3872. GetPix(16)),
  3873. flag,
  3874. "Edit",
  3875. style4);
  3876. if (isEdit[selectMaidIndex] && selectMaidIndex != isEditNo)
  3877. {
  3878. isEditNo = selectMaidIndex;
  3879. for (int index = 0; index < maidCnt; ++index)
  3880. {
  3881. if (index != isEditNo)
  3882. {
  3883. isEdit[index] = false;
  3884. }
  3885. }
  3886. SceneEdit component = GameObject.Find("__SceneEdit__").GetComponent<SceneEdit>();
  3887. SetFieldValue<SceneEdit, Maid>(component, "m_maid", maidArray[selectMaidIndex]);
  3888. component.PartsTypeCamera(MPN.stkg);
  3889. editSelectMaid = maidArray[selectMaidIndex];
  3890. if (selectList[selectMaidIndex] != null && goSlot[(int)selectList[selectMaidIndex]] != null)
  3891. {
  3892. maidArray[selectMaidIndex].body0.goSlot =
  3893. new List<TBodySkin>(goSlot[(int)selectList[selectMaidIndex]]);
  3894. for (int index = 0; index < bodyHit[(int)selectList[selectMaidIndex]].Count; ++index)
  3895. {
  3896. maidArray[selectMaidIndex].body0.goSlot[index].bonehair.bodyhit =
  3897. bodyHit[(int)selectList[selectMaidIndex]][index];
  3898. }
  3899. }
  3900. }
  3901. }
  3902. GUI.enabled = !poseGroupCombo.isClickedComboButton;
  3903. if (isLock[selectMaidIndex])
  3904. {
  3905. GUI.enabled = false;
  3906. }
  3907. int result;
  3908. Transform transform;
  3909. if (GUI.Button(new Rect(GetPix(5), GetPix(125), GetPix(23), GetPix(23)),
  3910. "<",
  3911. style3))
  3912. {
  3913. --poseIndex[selectMaidIndex];
  3914. if (poseGroupIndex > 0)
  3915. {
  3916. if ((int)groupList[poseGroupIndex - 1] > poseIndex[selectMaidIndex])
  3917. {
  3918. poseIndex[selectMaidIndex] = poseGroupIndex < groupList.Count
  3919. ? (int)groupList[poseGroupIndex] - 1
  3920. : poseArray.Length - 1;
  3921. }
  3922. }
  3923. else if (poseIndex[selectMaidIndex] < 0)
  3924. {
  3925. poseIndex[selectMaidIndex] = (int)groupList[poseGroupIndex] - 1;
  3926. }
  3927. isPoseInit = true;
  3928. poseCombo.selectedItemIndex = poseGroupIndex <= 0
  3929. ? poseIndex[selectMaidIndex]
  3930. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  3931. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  3932. {
  3933. string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
  3934. isStop[selectMaidIndex] = false;
  3935. poseCount[selectMaidIndex] = 20;
  3936. if (strArray[0].Contains("_momi") || strArray[0].Contains("paizuri_"))
  3937. {
  3938. maid.body0.MuneYureL(0.0f);
  3939. maid.body0.MuneYureR(0.0f);
  3940. }
  3941. else
  3942. {
  3943. maid.body0.MuneYureL(1f);
  3944. maid.body0.MuneYureR(1f);
  3945. }
  3946. if (strArray[0].Contains("MultipleMaidsPose"))
  3947. {
  3948. string path = strArray[0].Split('/')[1];
  3949. byte[] numArray = new byte[0];
  3950. try
  3951. {
  3952. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  3953. {
  3954. numArray = new byte[fileStream.Length];
  3955. fileStream.Read(numArray, 0, numArray.Length);
  3956. }
  3957. }
  3958. catch { }
  3959. if (0 < numArray.Length)
  3960. {
  3961. long hashCode = Path.GetFileName(path).GetHashCode();
  3962. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  3963. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  3964. {
  3965. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  3966. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  3967. };
  3968. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  3969. {
  3970. maid.SetAutoTwist(f_eType, true);
  3971. }
  3972. }
  3973. }
  3974. else if (strArray[0].StartsWith("p") && int.TryParse(strArray[0].Substring(1), out result))
  3975. {
  3976. loadPose[selectMaidIndex] = strArray[0];
  3977. }
  3978. else if (!strArray[0].StartsWith("dance_"))
  3979. {
  3980. maidArray[selectMaidIndex].CrossFade(strArray[0] + ".anm", false, true, false, 0.0f, 1f);
  3981. }
  3982. else
  3983. {
  3984. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
  3985. {
  3986. maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
  3987. }
  3988. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray[0] + ".anm");
  3989. }
  3990. if (strArray.Length > 1)
  3991. {
  3992. maid.body0.m_Bones.GetComponent<Animation>()[strArray[0] + ".anm"].time = float.Parse(strArray[1]);
  3993. isDanceStop = true;
  3994. if (strArray.Length > 2)
  3995. {
  3996. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  3997. isPoseIti[selectMaidIndex] = true;
  3998. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  3999. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4000. }
  4001. }
  4002. }
  4003. }
  4004. if (GUI.Button(new Rect(GetPix(135),
  4005. GetPix(125),
  4006. GetPix(23),
  4007. GetPix(23)),
  4008. ">",
  4009. style3))
  4010. {
  4011. ++poseIndex[selectMaidIndex];
  4012. if (poseIndex[selectMaidIndex] > (int)groupList[groupList.Count - 1])
  4013. {
  4014. if (poseIndex[selectMaidIndex] >= poseArray.Length)
  4015. {
  4016. poseIndex[selectMaidIndex] = (int)groupList[poseGroupIndex - 1];
  4017. }
  4018. }
  4019. else if (poseIndex[selectMaidIndex] >= (int)groupList[poseGroupIndex])
  4020. {
  4021. poseIndex[selectMaidIndex] = poseGroupIndex <= 0 ? 0 : (int)groupList[poseGroupIndex - 1];
  4022. }
  4023. isPoseInit = true;
  4024. poseCombo.selectedItemIndex = poseGroupIndex <= 0
  4025. ? poseIndex[selectMaidIndex]
  4026. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  4027. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  4028. {
  4029. string[] strArray = poseArray[poseIndex[selectMaidIndex]].Split(',');
  4030. isStop[selectMaidIndex] = false;
  4031. poseCount[selectMaidIndex] = 20;
  4032. if (strArray[0].Contains("_momi") || strArray[0].Contains("paizuri_"))
  4033. {
  4034. maid.body0.MuneYureL(0.0f);
  4035. maid.body0.MuneYureR(0.0f);
  4036. }
  4037. else
  4038. {
  4039. maid.body0.MuneYureL(1f);
  4040. maid.body0.MuneYureR(1f);
  4041. }
  4042. if (strArray[0].Contains("MultipleMaidsPose"))
  4043. {
  4044. string path = strArray[0].Split('/')[1];
  4045. byte[] numArray = new byte[0];
  4046. try
  4047. {
  4048. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  4049. {
  4050. numArray = new byte[fileStream.Length];
  4051. fileStream.Read(numArray, 0, numArray.Length);
  4052. }
  4053. }
  4054. catch { }
  4055. if (0 < numArray.Length)
  4056. {
  4057. long hashCode = Path.GetFileName(path).GetHashCode();
  4058. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  4059. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  4060. {
  4061. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  4062. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  4063. };
  4064. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  4065. {
  4066. maid.SetAutoTwist(f_eType, true);
  4067. }
  4068. }
  4069. }
  4070. else if (strArray[0].StartsWith("p") && int.TryParse(strArray[0].Substring(1), out result))
  4071. {
  4072. loadPose[selectMaidIndex] = strArray[0];
  4073. }
  4074. else if (!strArray[0].StartsWith("dance_"))
  4075. {
  4076. maidArray[selectMaidIndex].CrossFade(strArray[0] + ".anm", false, true, false, 0.0f, 1f);
  4077. }
  4078. else
  4079. {
  4080. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray[0] + ".anm"))
  4081. {
  4082. maid.body0.LoadAnime(strArray[0] + ".anm", GameUty.FileSystem, strArray[0] + ".anm", false, false);
  4083. }
  4084. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray[0] + ".anm");
  4085. }
  4086. if (strArray.Length > 1)
  4087. {
  4088. maid.body0.m_Bones.GetComponent<Animation>()[strArray[0] + ".anm"].time = float.Parse(strArray[1]);
  4089. isDanceStop = true;
  4090. if (strArray.Length > 2)
  4091. {
  4092. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4093. isPoseIti[selectMaidIndex] = true;
  4094. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4095. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4096. }
  4097. }
  4098. }
  4099. }
  4100. GUI.enabled = true;
  4101. int index1 = -1;
  4102. for (int index2 = 0; index2 < groupList.Count; ++index2)
  4103. {
  4104. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  4105. {
  4106. index1 = index2;
  4107. break;
  4108. }
  4109. }
  4110. int length1 = (int)groupList[0];
  4111. int num1 = 0;
  4112. if (index1 > 0)
  4113. {
  4114. length1 = (int)groupList[index1] - (int)groupList[index1 - 1];
  4115. num1 = (int)groupList[index1 - 1];
  4116. }
  4117. if (index1 < 0)
  4118. {
  4119. index1 = groupList.Count;
  4120. length1 = poseArray.Length - (int)groupList[index1 - 1];
  4121. num1 = (int)groupList[index1 - 1];
  4122. }
  4123. if (poseGroupCombo.selectedItemIndex != index1)
  4124. {
  4125. poseComboList = new GUIContent[length1];
  4126. int index2 = 0;
  4127. for (int index3 = num1; index3 < num1 + length1; ++index3)
  4128. {
  4129. bool flag = false;
  4130. foreach (IniKey key in Preferences["pose"].Keys)
  4131. {
  4132. if (poseArray[index3] == key.Key)
  4133. {
  4134. IniKey iniKey = Preferences["pose"][key.Key];
  4135. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  4136. {
  4137. poseComboList[index2] =
  4138. new GUIContent((index2 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  4139. + "                    " + key.Key);
  4140. flag = true;
  4141. }
  4142. }
  4143. }
  4144. if (!flag)
  4145. {
  4146. poseComboList[index2] = new GUIContent((index2 + 1).ToString() + ":" + poseArray[index3]);
  4147. }
  4148. ++index2;
  4149. }
  4150. poseGroupCombo.selectedItemIndex = index1;
  4151. poseGroupIndex = index1;
  4152. poseCombo.selectedItemIndex = 0;
  4153. }
  4154. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  4155. isLook[selectMaidIndex] =
  4156. GUI.Toggle(new Rect(GetPix(8),
  4157. GetPix(155),
  4158. GetPix(65),
  4159. GetPix(16)),
  4160. isLook[selectMaidIndex],
  4161. "顔の向き",
  4162. style4);
  4163. isPoseEdit = GUI.Toggle(new Rect(GetPix(86),
  4164. GetPix(155),
  4165. GetPix(90),
  4166. GetPix(16)),
  4167. isPoseEdit,
  4168. "ポーズ登録",
  4169. style4);
  4170. if (isPoseEdit)
  4171. {
  4172. inName3 = GUI.TextField(new Rect(GetPix(5),
  4173. GetPix(180),
  4174. GetPix(100),
  4175. GetPix(20)),
  4176. inName3);
  4177. if (GUI.Button(new Rect(GetPix(107),
  4178. GetPix(180),
  4179. GetPix(35),
  4180. GetPix(20)),
  4181. "追加",
  4182. style3))
  4183. {
  4184. isSavePose = true;
  4185. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  4186. existPose = true;
  4187. GUI.FocusControl("");
  4188. }
  4189. if (poseGroupComboList[poseGroupCombo.selectedItemIndex].text != "99:登録ポーズ")
  4190. {
  4191. GUI.enabled = false;
  4192. }
  4193. if (GUI.Button(new Rect(GetPix(144),
  4194. GetPix(180),
  4195. GetPix(24),
  4196. GetPix(20)),
  4197. "削",
  4198. style3))
  4199. {
  4200. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  4201. List<string> stringList1 = new List<string>();
  4202. stringList1.AddRange(poseArray);
  4203. if (poseComboList[poseCombo.selectedItemIndex].text.Contains("MultipleMaidsPose"))
  4204. {
  4205. string pose = poseArray[poseIndex[selectMaidIndex]];
  4206. stringList1.Remove(pose);
  4207. string path = poseArray[poseIndex[selectMaidIndex]].Split('/')[1].Replace("                    ", "");
  4208. if (File.Exists(path))
  4209. {
  4210. File.Delete(path);
  4211. }
  4212. }
  4213. else
  4214. {
  4215. string[] strArray = poseComboList[poseCombo.selectedItemIndex].text.Split('p');
  4216. string str = strArray[strArray.Length - 1];
  4217. IniKey iniKey = Preferences["pose"]["p" + str];
  4218. if (iniKey.Value != "" || iniKey.Value != "del")
  4219. {
  4220. Preferences["pose"]["p" + str].Value = "del";
  4221. SaveConfig();
  4222. }
  4223. stringList1.Remove("p" + str);
  4224. }
  4225. GUI.FocusControl("");
  4226. poseArray = stringList1.ToArray();
  4227. int index2 = -1;
  4228. for (int index3 = 0; index3 < groupList.Count; ++index3)
  4229. {
  4230. if (poseIndex[selectMaidIndex] < (int)groupList[index3])
  4231. {
  4232. index2 = index3;
  4233. break;
  4234. }
  4235. }
  4236. int length2 = (int)groupList[0];
  4237. int num2 = 0;
  4238. if (index2 > 0)
  4239. {
  4240. length2 = (int)groupList[index2] - (int)groupList[index2 - 1];
  4241. num2 = (int)groupList[index2 - 1];
  4242. }
  4243. if (index2 < 0)
  4244. {
  4245. index2 = groupList.Count;
  4246. length2 = poseArray.Length - (int)groupList[index2 - 1];
  4247. num2 = (int)groupList[index2 - 1];
  4248. }
  4249. poseComboList = new GUIContent[length2];
  4250. int index4 = 0;
  4251. bool existEdit = false;
  4252. for (int index3 = num2; index3 < num2 + length2; ++index3)
  4253. {
  4254. bool flag = false;
  4255. foreach (IniKey key in Preferences["pose"].Keys)
  4256. {
  4257. if (poseArray[index3] == key.Key)
  4258. {
  4259. IniKey iniKey = Preferences["pose"][key.Key];
  4260. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  4261. {
  4262. poseComboList[index4] =
  4263. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  4264. + "                    " + key.Key);
  4265. flag = true;
  4266. existEdit = true;
  4267. }
  4268. }
  4269. }
  4270. if (!flag)
  4271. {
  4272. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index3]);
  4273. }
  4274. ++index4;
  4275. }
  4276. ((Action<string, List<string>>)((path, result_list) =>
  4277. {
  4278. string[] files = Directory.GetFiles(path);
  4279. countS = 0;
  4280. for (int index = 0; index < files.Length; ++index)
  4281. {
  4282. if (Path.GetExtension(files[index]) == ".anm")
  4283. {
  4284. existEdit = true;
  4285. break;
  4286. }
  4287. }
  4288. }))(Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose", new List<string>());
  4289. if (!existEdit)
  4290. {
  4291. poseIniStr = "";
  4292. List<string> stringList2 = new List<string>(50 + poseGroupArray2.Length);
  4293. stringList2.AddRange(poseGroupArray2);
  4294. stringList2.AddRange(poseGroupArrayVP);
  4295. stringList2.AddRange(poseGroupArrayFB);
  4296. stringList2.AddRange(poseGroupArray3);
  4297. stringList2.Add(poseArray5[0]);
  4298. stringList2.Add(poseArray6[0]);
  4299. stringList2.Add(strList2[0]);
  4300. stringList2.Add(strListE2[0]);
  4301. existPose = false;
  4302. poseGroupArray = stringList2.ToArray();
  4303. groupList = new ArrayList();
  4304. for (int index3 = 0; index3 < poseArray.Length; ++index3)
  4305. {
  4306. for (int index5 = 0; index5 < poseGroupArray.Length; ++index5)
  4307. {
  4308. if (poseGroupArray[index5] == poseArray[index3])
  4309. {
  4310. groupList.Add(index3);
  4311. if (poseGroupArray[index5] == strList2[0])
  4312. {
  4313. sPoseCount = index3;
  4314. }
  4315. }
  4316. }
  4317. }
  4318. poseIndex[selectMaidIndex] = 0;
  4319. poseGroupComboList = new GUIContent[poseGroupArray.Length + 1];
  4320. poseGroupComboList[0] = new GUIContent("1:通常");
  4321. for (int index3 = 0; index3 < poseGroupArray.Length; ++index3)
  4322. {
  4323. if (poseGroupArray[index3] == "maid_dressroom01")
  4324. {
  4325. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":立ち");
  4326. }
  4327. if (poseGroupArray[index3] == "tennis_kamae_f")
  4328. {
  4329. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":中腰");
  4330. }
  4331. if (poseGroupArray[index3] == "senakanagasi_f")
  4332. {
  4333. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":膝をつく");
  4334. }
  4335. if (poseGroupArray[index3] == "work_hansei")
  4336. {
  4337. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":座り");
  4338. }
  4339. if (poseGroupArray[index3] == "inu_taiki_f")
  4340. {
  4341. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":四つん這い");
  4342. }
  4343. if (poseGroupArray[index3] == "syagami_pose_f")
  4344. {
  4345. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":床座り");
  4346. }
  4347. if (poseGroupArray[index3] == "densyasuwari_taiki_f")
  4348. {
  4349. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":椅子座り");
  4350. }
  4351. if (poseGroupArray[index3] == "work_kaiwa")
  4352. {
  4353. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ソファー座り");
  4354. }
  4355. if (poseGroupArray[index3] == "dance_cm3d2_001_f1,14.14")
  4356. {
  4357. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ドキドキ☆Fallin' Love");
  4358. }
  4359. if (poseGroupArray[index3] == "dance_cm3d_001_f1,39.25")
  4360. {
  4361. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":entrance to you");
  4362. }
  4363. if (poseGroupArray[index3] == "dance_cm3d_002_end_f1,50.71")
  4364. {
  4365. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":scarlet leap");
  4366. }
  4367. if (poseGroupArray[index3] == "dance_cm3d2_002_smt_f,7.76,")
  4368. {
  4369. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":stellar my tears");
  4370. }
  4371. if (poseGroupArray[index3] == "dance_cm3d_003_sp2_f1,90.15")
  4372. {
  4373. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":rhythmix to you");
  4374. }
  4375. if (poseGroupArray[index3] == "dance_cm3d2_003_hs_f1,0.01,")
  4376. {
  4377. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":happy!happy!スキャンダル!!");
  4378. }
  4379. if (poseGroupArray[index3] == "dance_cm3d_004_kano_f1,124.93")
  4380. {
  4381. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":Can Know Two Close");
  4382. }
  4383. if (poseGroupArray[index3] == "dance_cm3d2_004_sse_f1,0.01")
  4384. {
  4385. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":sweet sweet everyday");
  4386. }
  4387. if (poseGroupArray[index3] == "turusi_sex_in_taiki_f")
  4388. {
  4389. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":拘束");
  4390. }
  4391. if (poseGroupArray[index3] == "rosyutu_pose01_f")
  4392. {
  4393. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":エロ");
  4394. }
  4395. if (poseGroupArray[index3] == "rosyutu_aruki_f_once_,1.37")
  4396. {
  4397. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":歩き");
  4398. }
  4399. if (poseGroupArray[index3] == "stand_desk1")
  4400. {
  4401. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":その他");
  4402. }
  4403. if (poseGroupArray[index3] == poseArray5[0])
  4404. {
  4405. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ダンスMC");
  4406. }
  4407. if (poseGroupArray[index3] == poseArray6[0])
  4408. {
  4409. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":ダンス");
  4410. }
  4411. if (index3 == poseGroupArray.Length - 2)
  4412. {
  4413. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":通常2");
  4414. }
  4415. if (index3 == poseGroupArray.Length - 1)
  4416. {
  4417. poseGroupComboList[index3 + 1] = new GUIContent((index3 + 2).ToString() + ":エロ2");
  4418. }
  4419. }
  4420. }
  4421. else
  4422. {
  4423. poseGroupCombo.selectedItemIndex = index2;
  4424. poseGroupIndex = index2;
  4425. poseCombo.selectedItemIndex = 0;
  4426. poseIndex[selectMaidIndex] = (int)groupList[groupList.Count - 1];
  4427. if (poseArray.Length <= poseIndex[selectMaidIndex])
  4428. {
  4429. --poseIndex[selectMaidIndex];
  4430. }
  4431. }
  4432. }
  4433. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  4434. }
  4435. else
  4436. {
  4437. if (!isLook[selectMaidIndex])
  4438. {
  4439. GUI.enabled = false;
  4440. }
  4441. GUI.Label(new Rect(GetPix(8), GetPix(175), GetPix(100), GetPix(25)),
  4442. "顔の向きX",
  4443. style2);
  4444. lookX[selectMaidIndex] =
  4445. GUI.HorizontalSlider(new Rect(GetPix(8),
  4446. GetPix(191),
  4447. GetPix(70),
  4448. GetPix(20)),
  4449. lookX[selectMaidIndex],
  4450. -0.6f,
  4451. 0.6f);
  4452. GUI.Label(new Rect(GetPix(88),
  4453. GetPix(175),
  4454. GetPix(100),
  4455. GetPix(25)),
  4456. "顔の向きY",
  4457. style2);
  4458. lookY[selectMaidIndex] =
  4459. GUI.HorizontalSlider(new Rect(GetPix(88),
  4460. GetPix(191),
  4461. GetPix(70),
  4462. GetPix(20)),
  4463. lookY[selectMaidIndex],
  4464. 0.5f,
  4465. -0.55f);
  4466. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  4467. }
  4468. int index6 = poseGroupIndex <= 0
  4469. ? poseIndex[selectMaidIndex]
  4470. : poseIndex[selectMaidIndex] - (int)groupList[poseGroupIndex - 1];
  4471. string[] strArray1;
  4472. if (GUI.Button(new Rect(GetPix(5), GetPix(215), GetPix(23), GetPix(23)),
  4473. "<",
  4474. style3))
  4475. {
  4476. --itemIndex[selectMaidIndex];
  4477. if (itemIndex[selectMaidIndex] <= -1)
  4478. {
  4479. itemIndex[selectMaidIndex] = itemArray.Length - 2;
  4480. }
  4481. strArray1 = new string[2];
  4482. string[] strArray2 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4483. if (itemIndex[selectMaidIndex] > 13)
  4484. {
  4485. strArray2 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  4486. }
  4487. maid.DelProp(MPN.handitem, true);
  4488. maid.DelProp(MPN.accvag, true);
  4489. maid.DelProp(MPN.accanl, true);
  4490. bool flag = false;
  4491. if (itemIndex[selectMaidIndex] == 12 || itemIndex[selectMaidIndex] == 13 || itemIndex[selectMaidIndex] == 23)
  4492. {
  4493. flag = true;
  4494. }
  4495. if (!flag)
  4496. {
  4497. maid.DelProp(MPN.kousoku_upper, true);
  4498. maid.DelProp(MPN.kousoku_lower, true);
  4499. }
  4500. if (strArray2[0] != "")
  4501. {
  4502. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  4503. }
  4504. if (itemIndex[selectMaidIndex] == 12)
  4505. {
  4506. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] - 1].Split(',');
  4507. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4508. }
  4509. if (itemIndex[selectMaidIndex] == 13)
  4510. {
  4511. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  4512. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4513. }
  4514. if (itemIndex[selectMaidIndex] == 23)
  4515. {
  4516. string[] strArray3 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4517. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4518. cafeFlg[selectMaidIndex] = true;
  4519. }
  4520. maid.AllProcPropSeqStart();
  4521. itemCombo.selectedItemIndex = itemIndex[selectMaidIndex];
  4522. }
  4523. if (GUI.Button(new Rect(GetPix(135),
  4524. GetPix(215),
  4525. GetPix(23),
  4526. GetPix(23)),
  4527. ">",
  4528. style3))
  4529. {
  4530. ++itemIndex[selectMaidIndex];
  4531. if (itemIndex[selectMaidIndex] >= itemArray.Length - 1)
  4532. {
  4533. itemIndex[selectMaidIndex] = 0;
  4534. }
  4535. strArray1 = new string[2];
  4536. string[] strArray2 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4537. if (itemIndex[selectMaidIndex] > 13)
  4538. {
  4539. strArray2 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  4540. }
  4541. maid.DelProp(MPN.handitem, true);
  4542. maid.DelProp(MPN.accvag, true);
  4543. maid.DelProp(MPN.accanl, true);
  4544. bool flag = false;
  4545. if (itemIndex[selectMaidIndex] == 12 || itemIndex[selectMaidIndex] == 13)
  4546. {
  4547. flag = true;
  4548. }
  4549. if (!flag)
  4550. {
  4551. maid.DelProp(MPN.kousoku_upper, true);
  4552. maid.DelProp(MPN.kousoku_lower, true);
  4553. }
  4554. if (strArray2[0] != "")
  4555. {
  4556. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  4557. }
  4558. if (itemIndex[selectMaidIndex] == 12)
  4559. {
  4560. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] - 1].Split(',');
  4561. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4562. }
  4563. if (itemIndex[selectMaidIndex] == 13)
  4564. {
  4565. string[] strArray3 = itemArray[itemIndex[selectMaidIndex] + 1].Split(',');
  4566. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4567. }
  4568. if (itemIndex[selectMaidIndex] == 23)
  4569. {
  4570. string[] strArray3 = itemArray[itemIndex[selectMaidIndex]].Split(',');
  4571. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  4572. cafeFlg[selectMaidIndex] = true;
  4573. }
  4574. maid.AllProcPropSeqStart();
  4575. itemCombo.selectedItemIndex = itemIndex[selectMaidIndex];
  4576. }
  4577. if (itemCombo.isClickedComboButton)
  4578. {
  4579. GUI.enabled = false;
  4580. }
  4581. int offsetTop = GetPix(240);
  4582. int UIHeight = GetPix(330);
  4583. Rect poseWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  4584. Rect poseWindowScrollView = new Rect(0, offsetTop, rectWin.width - 20, UIHeight);
  4585. poseScrollPos = GUI.BeginScrollView(poseWindowScrollRect, poseScrollPos, poseWindowScrollView);
  4586. isWear = GUI.Toggle(new Rect(GetPix(5),
  4587. GetPix(248),
  4588. GetPix(70),
  4589. GetPix(20)),
  4590. isWear,
  4591. "トップス",
  4592. style4);
  4593. isSkirt = GUI.Toggle(new Rect(GetPix(90),
  4594. GetPix(248),
  4595. GetPix(70),
  4596. GetPix(20)),
  4597. isSkirt,
  4598. "ボトムス",
  4599. style4);
  4600. isBra = GUI.Toggle(new Rect(GetPix(5),
  4601. GetPix(273),
  4602. GetPix(80),
  4603. GetPix(20)),
  4604. isBra,
  4605. "ブラジャー",
  4606. style4);
  4607. isPanz = GUI.Toggle(new Rect(GetPix(90),
  4608. GetPix(273),
  4609. GetPix(60),
  4610. GetPix(20)),
  4611. isPanz,
  4612. "パンツ",
  4613. style4);
  4614. isHeadset = GUI.Toggle(new Rect(GetPix(5),
  4615. GetPix(298),
  4616. GetPix(70),
  4617. GetPix(20)),
  4618. isHeadset,
  4619. "ヘッド",
  4620. style4);
  4621. isMegane = GUI.Toggle(new Rect(GetPix(95),
  4622. GetPix(298),
  4623. GetPix(70),
  4624. GetPix(20)),
  4625. isMegane,
  4626. "メガネ",
  4627. style4);
  4628. isAccUde = GUI.Toggle(new Rect(GetPix(5),
  4629. GetPix(323),
  4630. GetPix(40),
  4631. GetPix(20)),
  4632. isAccUde,
  4633. "腕",
  4634. style4);
  4635. isGlove = GUI.Toggle(new Rect(GetPix(50),
  4636. GetPix(323),
  4637. GetPix(40),
  4638. GetPix(20)),
  4639. isGlove,
  4640. "手袋",
  4641. style4);
  4642. isAccSenaka = GUI.Toggle(new Rect(GetPix(95),
  4643. GetPix(323),
  4644. GetPix(40),
  4645. GetPix(20)),
  4646. isAccSenaka,
  4647. "背中",
  4648. style4);
  4649. isStkg = GUI.Toggle(new Rect(GetPix(5),
  4650. GetPix(348),
  4651. GetPix(40),
  4652. GetPix(20)),
  4653. isStkg,
  4654. "靴下",
  4655. style4);
  4656. isShoes = GUI.Toggle(new Rect(GetPix(50),
  4657. GetPix(348),
  4658. GetPix(40),
  4659. GetPix(20)),
  4660. isShoes,
  4661. "靴",
  4662. style4);
  4663. isMaid = GUI.Toggle(new Rect(GetPix(95),
  4664. GetPix(348),
  4665. GetPix(70),
  4666. GetPix(20)),
  4667. isMaid,
  4668. "メイド",
  4669. style4);
  4670. mekure1[selectMaidIndex] =
  4671. GUI.Toggle(new Rect(GetPix(5),
  4672. GetPix(373),
  4673. GetPix(62),
  4674. GetPix(20)),
  4675. mekure1[selectMaidIndex],
  4676. "めくれ前",
  4677. style4);
  4678. mekure2[selectMaidIndex] =
  4679. GUI.Toggle(new Rect(GetPix(67),
  4680. GetPix(373),
  4681. GetPix(40),
  4682. GetPix(20)),
  4683. mekure2[selectMaidIndex],
  4684. "後ろ",
  4685. style4);
  4686. zurasi[selectMaidIndex] =
  4687. GUI.Toggle(new Rect(GetPix(105),
  4688. GetPix(373),
  4689. GetPix(50),
  4690. GetPix(20)),
  4691. zurasi[selectMaidIndex],
  4692. "ずらし",
  4693. style4);
  4694. voice1[selectMaidIndex] =
  4695. GUI.Toggle(new Rect(GetPix(5),
  4696. GetPix(530),
  4697. GetPix(70),
  4698. GetPix(20)),
  4699. zFlg[selectMaidIndex],
  4700. "ボイス",
  4701. style4);
  4702. voice2[selectMaidIndex] =
  4703. GUI.Toggle(new Rect(GetPix(70),
  4704. GetPix(530),
  4705. GetPix(70),
  4706. GetPix(20)),
  4707. xFlg[selectMaidIndex],
  4708. "Hボイス",
  4709. style4);
  4710. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4711. GUI.DrawTexture(new Rect(GetPix(5), GetPix(402), GetPix(160), 2f), line1);
  4712. GUI.DrawTexture(new Rect(GetPix(5), GetPix(402), GetPix(160), 1f), line2);
  4713. isIK[selectMaidIndex] =
  4714. GUI.Toggle(new Rect(GetPix(5),
  4715. GetPix(411),
  4716. GetPix(30),
  4717. GetPix(20)),
  4718. isIK[selectMaidIndex],
  4719. "IK",
  4720. style4);
  4721. if (!isLock[selectMaidIndex])
  4722. {
  4723. GUI.enabled = false;
  4724. }
  4725. isLock[selectMaidIndex] =
  4726. GUI.Toggle(new Rect(GetPix(45),
  4727. GetPix(411),
  4728. GetPix(40),
  4729. GetPix(20)),
  4730. isLock[selectMaidIndex],
  4731. "解除",
  4732. style4);
  4733. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4734. if (!isIK[selectMaidIndex])
  4735. {
  4736. GUI.enabled = false;
  4737. }
  4738. isBone[selectMaidIndex] =
  4739. GUI.Toggle(new Rect(GetPix(100),
  4740. GetPix(411),
  4741. GetPix(60),
  4742. GetPix(20)),
  4743. isBone[selectMaidIndex],
  4744. "ボーン",
  4745. style4);
  4746. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton;
  4747. if (isBone[selectMaidIndex] != isBoneN[selectMaidIndex])
  4748. {
  4749. isBoneN[selectMaidIndex] = isBone[selectMaidIndex];
  4750. isChange[selectMaidIndex] = true;
  4751. }
  4752. if (!isLock[selectMaidIndex] && unLockFlg != isLock[selectMaidIndex])
  4753. {
  4754. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  4755. isStop[selectMaidIndex] = false;
  4756. poseCount[selectMaidIndex] = 20;
  4757. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  4758. {
  4759. maid.body0.MuneYureL(0.0f);
  4760. maid.body0.MuneYureR(0.0f);
  4761. }
  4762. else
  4763. {
  4764. maid.body0.MuneYureL(1f);
  4765. maid.body0.MuneYureR(1f);
  4766. }
  4767. if (strArray2[0].Contains("MultipleMaidsPose"))
  4768. {
  4769. string path = strArray2[0].Split('/')[1];
  4770. byte[] numArray = new byte[0];
  4771. try
  4772. {
  4773. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  4774. {
  4775. numArray = new byte[fileStream.Length];
  4776. fileStream.Read(numArray, 0, numArray.Length);
  4777. }
  4778. }
  4779. catch { }
  4780. if (0 < numArray.Length)
  4781. {
  4782. long hashCode = Path.GetFileName(path).GetHashCode();
  4783. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  4784. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  4785. {
  4786. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  4787. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  4788. };
  4789. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  4790. {
  4791. maid.SetAutoTwist(f_eType, true);
  4792. }
  4793. }
  4794. }
  4795. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  4796. {
  4797. loadPose[selectMaidIndex] = strArray2[0];
  4798. }
  4799. else if (!strArray2[0].StartsWith("dance_"))
  4800. {
  4801. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  4802. }
  4803. else
  4804. {
  4805. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  4806. {
  4807. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  4808. }
  4809. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  4810. }
  4811. if (strArray2.Length > 1)
  4812. {
  4813. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  4814. isDanceStop = true;
  4815. if (strArray2.Length > 2)
  4816. {
  4817. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  4818. isPoseIti[selectMaidIndex] = true;
  4819. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  4820. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  4821. }
  4822. }
  4823. mHandL[selectMaidIndex].initFlg = false;
  4824. mHandR[selectMaidIndex].initFlg = false;
  4825. mFootL[selectMaidIndex].initFlg = false;
  4826. mFootR[selectMaidIndex].initFlg = false;
  4827. pHandL[selectMaidIndex] = 0;
  4828. pHandR[selectMaidIndex] = 0;
  4829. hanten[selectMaidIndex] = false;
  4830. hantenn[selectMaidIndex] = false;
  4831. muneIKL[selectMaidIndex] = false;
  4832. muneIKR[selectMaidIndex] = false;
  4833. maid.body0.jbMuneL.enabled = true;
  4834. maid.body0.jbMuneR.enabled = true;
  4835. if (!GameMain.Instance.VRMode)
  4836. {
  4837. maidArray[selectMaidIndex].body0.quaDefEyeL.eulerAngles = eyeL[(int)selectList[selectMaidIndex]];
  4838. maidArray[selectMaidIndex].body0.quaDefEyeR.eulerAngles = eyeR[(int)selectList[selectMaidIndex]];
  4839. }
  4840. }
  4841. unLockFlg = isLock[selectMaidIndex];
  4842. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton;
  4843. if (!isIK[selectMaidIndex])
  4844. {
  4845. GUI.enabled = false;
  4846. }
  4847. hanten[selectMaidIndex] =
  4848. GUI.Toggle(new Rect(GetPix(5),
  4849. GetPix(479),
  4850. GetPix(70),
  4851. GetPix(20)),
  4852. hanten[selectMaidIndex],
  4853. "左右反転",
  4854. style4);
  4855. bool flag1 = GUI.Toggle(new Rect(GetPix(80),
  4856. GetPix(479),
  4857. GetPix(100),
  4858. GetPix(20)),
  4859. kotei[selectMaidIndex],
  4860. "スカート固定",
  4861. style4);
  4862. if (kotei[selectMaidIndex] != flag1)
  4863. {
  4864. kotei[selectMaidIndex] = flag1;
  4865. if (flag1)
  4866. {
  4867. SkirtListArray[selectMaidIndex] = new DynamicSkirtBone[100];
  4868. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  4869. {
  4870. DynamicSkirtBone fieldValue =
  4871. GetFieldValue<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3, "m_SkirtBone");
  4872. SkirtListArray[selectMaidIndex][index2] = fieldValue;
  4873. SetFieldValue8<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3,
  4874. "m_SkirtBone",
  4875. null);
  4876. }
  4877. }
  4878. else
  4879. {
  4880. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  4881. {
  4882. SetFieldValue8<BoneHair3, DynamicSkirtBone>(maid.body0.goSlot[index2].bonehair3,
  4883. "m_SkirtBone",
  4884. SkirtListArray[selectMaidIndex][index2]);
  4885. }
  4886. }
  4887. }
  4888. GUI.Label(new Rect(GetPix(29), GetPix(433), GetPix(100), GetPix(25)),
  4889. "右手",
  4890. style1);
  4891. GUI.Label(new Rect(GetPix(109), GetPix(433), GetPix(100), GetPix(25)),
  4892. "左手",
  4893. style1);
  4894. string text = "未選択";
  4895. if (copyIndex > 0)
  4896. {
  4897. text = copyIndex.ToString() + ":" + maidArray[copyIndex - 1].status.firstName;
  4898. }
  4899. if (maidCnt <= 1)
  4900. {
  4901. GUI.enabled = false;
  4902. }
  4903. GUI.Label(new Rect(GetPix(8), GetPix(505), GetPix(100), GetPix(25)),
  4904. "コピー",
  4905. style1);
  4906. GUI.Label(new Rect(GetPix(70), GetPix(505), GetPix(100), GetPix(25)),
  4907. text,
  4908. style1);
  4909. GUI.enabled = !poseCombo.isClickedComboButton && !poseGroupCombo.isClickedComboButton && !itemCombo.isClickedComboButton
  4910. && isIK[selectMaidIndex];
  4911. style1.fontSize = GetPix(13);
  4912. style1.alignment = TextAnchor.UpperCenter;
  4913. GUI.Label(new Rect(GetPix(-10), GetPix(449), GetPix(100), GetPix(25)),
  4914. pHandR[selectMaidIndex].ToString(),
  4915. style1);
  4916. GUI.Label(new Rect(GetPix(70), GetPix(449), GetPix(100), GetPix(25)),
  4917. pHandL[selectMaidIndex].ToString(),
  4918. style1);
  4919. style1.fontSize = GetPix(11);
  4920. style1.alignment = TextAnchor.UpperLeft;
  4921. if (GUI.Button(new Rect(GetPix(5), GetPix(448), GetPix(23), GetPix(23)),
  4922. "<",
  4923. style3))
  4924. {
  4925. --pHandR[selectMaidIndex];
  4926. if (pHandR[selectMaidIndex] < 1)
  4927. {
  4928. pHandR[selectMaidIndex] = fingerRArray.GetLength(0);
  4929. }
  4930. for (int index2 = 0; index2 < 20; ++index2)
  4931. {
  4932. string[] strArray2 = fingerRArray[pHandR[selectMaidIndex] - 1, index2].Split(',');
  4933. Finger[selectMaidIndex, index2 + 20].localEulerAngles =
  4934. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4935. }
  4936. isStop[selectMaidIndex] = true;
  4937. isLock[selectMaidIndex] = true;
  4938. for (int index2 = 0; index2 < 10; ++index2)
  4939. {
  4940. if ((index2 == 0 || index2 == 5) && mFinger[selectMaidIndex, index2 * 3])
  4941. {
  4942. mFinger[selectMaidIndex, index2 * 3].reset = true;
  4943. }
  4944. }
  4945. }
  4946. if (GUI.Button(new Rect(GetPix(55),
  4947. GetPix(448),
  4948. GetPix(23),
  4949. GetPix(23)),
  4950. ">",
  4951. style3))
  4952. {
  4953. ++pHandR[selectMaidIndex];
  4954. if (pHandR[selectMaidIndex] > fingerRArray.GetLength(0))
  4955. {
  4956. pHandR[selectMaidIndex] = 1;
  4957. }
  4958. for (int index2 = 0; index2 < 20; ++index2)
  4959. {
  4960. string[] strArray2 = fingerRArray[pHandR[selectMaidIndex] - 1, index2].Split(',');
  4961. Finger[selectMaidIndex, index2 + 20].localEulerAngles =
  4962. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4963. }
  4964. isStop[selectMaidIndex] = true;
  4965. isLock[selectMaidIndex] = true;
  4966. for (int index2 = 0; index2 < 10; ++index2)
  4967. {
  4968. if ((index2 == 0 || index2 == 5) && mFinger[selectMaidIndex, index2 * 3])
  4969. {
  4970. mFinger[selectMaidIndex, index2 * 3].reset = true;
  4971. }
  4972. }
  4973. }
  4974. if (GUI.Button(new Rect(GetPix(85),
  4975. GetPix(448),
  4976. GetPix(23),
  4977. GetPix(23)),
  4978. "<",
  4979. style3))
  4980. {
  4981. --pHandL[selectMaidIndex];
  4982. if (pHandL[selectMaidIndex] < 1)
  4983. {
  4984. pHandL[selectMaidIndex] = fingerLArray.GetLength(0);
  4985. }
  4986. for (int index2 = 0; index2 < 20; ++index2)
  4987. {
  4988. string[] strArray2 = fingerLArray[pHandL[selectMaidIndex] - 1, index2].Split(',');
  4989. Finger[selectMaidIndex, index2].localEulerAngles =
  4990. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  4991. }
  4992. isStop[selectMaidIndex] = true;
  4993. isLock[selectMaidIndex] = true;
  4994. }
  4995. if (GUI.Button(new Rect(GetPix(135),
  4996. GetPix(448),
  4997. GetPix(23),
  4998. GetPix(23)),
  4999. ">",
  5000. style3))
  5001. {
  5002. ++pHandL[selectMaidIndex];
  5003. if (pHandL[selectMaidIndex] > fingerRArray.GetLength(0))
  5004. {
  5005. pHandL[selectMaidIndex] = 1;
  5006. }
  5007. for (int index2 = 0; index2 < 20; ++index2)
  5008. {
  5009. string[] strArray2 = fingerLArray[pHandL[selectMaidIndex] - 1, index2].Split(',');
  5010. Finger[selectMaidIndex, index2].localEulerAngles =
  5011. new Vector3(float.Parse(strArray2[0]), float.Parse(strArray2[1]), float.Parse(strArray2[2]));
  5012. }
  5013. isStop[selectMaidIndex] = true;
  5014. isLock[selectMaidIndex] = true;
  5015. }
  5016. if (maidCnt <= 1)
  5017. {
  5018. GUI.enabled = false;
  5019. }
  5020. if (GUI.Button(new Rect(GetPix(45),
  5021. GetPix(504),
  5022. GetPix(22),
  5023. GetPix(20)),
  5024. ">",
  5025. style3))
  5026. {
  5027. ++copyIndex;
  5028. if (copyIndex - 1 == selectMaidIndex)
  5029. {
  5030. ++copyIndex;
  5031. }
  5032. if (copyIndex > maidCnt)
  5033. {
  5034. copyIndex = 0;
  5035. }
  5036. }
  5037. if (isCopy)
  5038. {
  5039. isCopy = false;
  5040. CopyIK2(maidArray[selectMaidIndex], selectMaidIndex, maidArray[copyIndex - 1], copyIndex - 1);
  5041. }
  5042. if (copyIndex == 0)
  5043. {
  5044. GUI.enabled = false;
  5045. }
  5046. if (GUI.Button(new Rect(GetPix(123),
  5047. GetPix(504),
  5048. GetPix(35),
  5049. GetPix(20)),
  5050. "決定",
  5051. style3))
  5052. {
  5053. CopyIK(maidArray[selectMaidIndex], selectMaidIndex, maidArray[copyIndex - 1], copyIndex - 1);
  5054. isCopy = true;
  5055. pHandL[selectMaidIndex] = pHandL[copyIndex - 1];
  5056. pHandR[selectMaidIndex] = pHandR[copyIndex - 1];
  5057. hanten[selectMaidIndex] = hanten[copyIndex - 1];
  5058. hantenn[selectMaidIndex] = hantenn[copyIndex - 1];
  5059. }
  5060. GUI.enabled = true;
  5061. if (poseCombo.isClickedComboButton || poseGroupCombo.isClickedComboButton)
  5062. {
  5063. GUI.enabled = false;
  5064. }
  5065. GUI.EndScrollView();
  5066. itemIndex2[selectMaidIndex] =
  5067. itemCombo.List(new Rect(GetPix(35),
  5068. GetPix(215),
  5069. GetPix(95),
  5070. GetPix(23)),
  5071. itemComboList[itemIndex[selectMaidIndex]].text,
  5072. itemComboList,
  5073. buttonStyle1,
  5074. "box",
  5075. listStyle3);
  5076. GUI.enabled = true;
  5077. if (poseGroupCombo.isClickedComboButton || isLock[selectMaidIndex])
  5078. {
  5079. GUI.enabled = false;
  5080. }
  5081. poseCombo.List(new Rect(GetPix(35),
  5082. GetPix(125),
  5083. GetPix(95),
  5084. GetPix(23)),
  5085. poseComboList[index6].text,
  5086. poseComboList,
  5087. buttonStyle1,
  5088. "box",
  5089. listStyle2);
  5090. if (!isLock[selectMaidIndex])
  5091. {
  5092. GUI.enabled = true;
  5093. }
  5094. int index7 = -1;
  5095. for (int index2 = 0; index2 < groupList.Count; ++index2)
  5096. {
  5097. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  5098. {
  5099. index7 = index2;
  5100. break;
  5101. }
  5102. }
  5103. if (index7 < 0)
  5104. {
  5105. index7 = groupList.Count;
  5106. }
  5107. if (GUI.Button(new Rect(GetPix(5), GetPix(95), GetPix(23), GetPix(23)),
  5108. "<",
  5109. style3))
  5110. {
  5111. isPoseInit = true;
  5112. if (!isLock[selectMaidIndex])
  5113. {
  5114. for (int index2 = 0; index2 < groupList.Count; ++index2)
  5115. {
  5116. if (index2 == 0 && poseIndex[selectMaidIndex] <= (int)groupList[index2])
  5117. {
  5118. poseIndex[selectMaidIndex] = poseIndex[selectMaidIndex] != 0 ? 0 : (int)groupList[groupList.Count - 1];
  5119. break;
  5120. }
  5121. if (index2 > 0 && poseIndex[selectMaidIndex] > (int)groupList[index2 - 1]
  5122. && poseIndex[selectMaidIndex] <= (int)groupList[index2])
  5123. {
  5124. poseIndex[selectMaidIndex] = (int)groupList[index2 - 1];
  5125. break;
  5126. }
  5127. }
  5128. if (poseIndex[selectMaidIndex] > (int)groupList[groupList.Count - 1])
  5129. {
  5130. poseIndex[selectMaidIndex] = (int)groupList[groupList.Count - 1];
  5131. }
  5132. if (maid && maid.Visible)
  5133. {
  5134. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  5135. isStop[selectMaidIndex] = false;
  5136. poseCount[selectMaidIndex] = 20;
  5137. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  5138. {
  5139. maid.body0.MuneYureL(0.0f);
  5140. maid.body0.MuneYureR(0.0f);
  5141. }
  5142. else
  5143. {
  5144. maid.body0.MuneYureL(1f);
  5145. maid.body0.MuneYureR(1f);
  5146. }
  5147. if (strArray2[0].Contains("MultipleMaidsPose"))
  5148. {
  5149. string path = strArray2[0].Split('/')[1];
  5150. byte[] numArray = new byte[0];
  5151. try
  5152. {
  5153. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  5154. {
  5155. numArray = new byte[fileStream.Length];
  5156. fileStream.Read(numArray, 0, numArray.Length);
  5157. }
  5158. }
  5159. catch { }
  5160. if (0 < numArray.Length)
  5161. {
  5162. long hashCode = Path.GetFileName(path).GetHashCode();
  5163. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  5164. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  5165. {
  5166. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  5167. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  5168. };
  5169. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  5170. {
  5171. maid.SetAutoTwist(f_eType, true);
  5172. }
  5173. }
  5174. }
  5175. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  5176. {
  5177. loadPose[selectMaidIndex] = strArray2[0];
  5178. }
  5179. else if (!strArray2[0].StartsWith("dance_"))
  5180. {
  5181. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  5182. }
  5183. else
  5184. {
  5185. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  5186. {
  5187. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  5188. }
  5189. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  5190. }
  5191. if (strArray2.Length > 1)
  5192. {
  5193. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  5194. isDanceStop = true;
  5195. if (strArray2.Length > 2)
  5196. {
  5197. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  5198. isPoseIti[selectMaidIndex] = true;
  5199. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  5200. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  5201. }
  5202. }
  5203. }
  5204. }
  5205. int index3 = -1;
  5206. for (int index2 = 0; index2 < groupList.Count; ++index2)
  5207. {
  5208. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  5209. {
  5210. index3 = index2;
  5211. break;
  5212. }
  5213. }
  5214. int length2 = (int)groupList[0];
  5215. int num2 = 0;
  5216. if (index3 > 0)
  5217. {
  5218. length2 = (int)groupList[index3] - (int)groupList[index3 - 1];
  5219. num2 = (int)groupList[index3 - 1];
  5220. }
  5221. if (index3 < 0)
  5222. {
  5223. index3 = groupList.Count;
  5224. length2 = poseArray.Length - (int)groupList[index3 - 1];
  5225. num2 = (int)groupList[index3 - 1];
  5226. }
  5227. poseComboList = new GUIContent[length2];
  5228. int index4 = 0;
  5229. for (int index2 = num2; index2 < num2 + length2; ++index2)
  5230. {
  5231. bool flag2 = false;
  5232. foreach (IniKey key in Preferences["pose"].Keys)
  5233. {
  5234. if (poseArray[index2] == key.Key)
  5235. {
  5236. IniKey iniKey = Preferences["pose"][key.Key];
  5237. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  5238. {
  5239. poseComboList[index4] =
  5240. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  5241. + "                    " + key.Key);
  5242. flag2 = true;
  5243. }
  5244. }
  5245. }
  5246. if (!flag2)
  5247. {
  5248. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index2]);
  5249. }
  5250. ++index4;
  5251. }
  5252. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  5253. poseGroupCombo.selectedItemIndex = index3;
  5254. poseCombo.selectedItemIndex = 0;
  5255. }
  5256. if (GUI.Button(new Rect(GetPix(135),
  5257. GetPix(95),
  5258. GetPix(23),
  5259. GetPix(23)),
  5260. ">",
  5261. style3))
  5262. {
  5263. isPoseInit = true;
  5264. if (!isLock[selectMaidIndex])
  5265. {
  5266. int num2 = poseIndex[selectMaidIndex];
  5267. for (int index2 = 0; index2 < groupList.Count; ++index2)
  5268. {
  5269. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  5270. {
  5271. poseIndex[selectMaidIndex] = (int)groupList[index2];
  5272. break;
  5273. }
  5274. }
  5275. if (num2 == poseIndex[selectMaidIndex] && poseIndex[selectMaidIndex] >= (int)groupList[groupList.Count - 1])
  5276. {
  5277. poseIndex[selectMaidIndex] = 0;
  5278. }
  5279. if (maid && maid.Visible)
  5280. {
  5281. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  5282. isStop[selectMaidIndex] = false;
  5283. poseCount[selectMaidIndex] = 20;
  5284. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  5285. {
  5286. maid.body0.MuneYureL(0.0f);
  5287. maid.body0.MuneYureR(0.0f);
  5288. }
  5289. else
  5290. {
  5291. maid.body0.MuneYureL(1f);
  5292. maid.body0.MuneYureR(1f);
  5293. }
  5294. if (strArray2[0].Contains("MultipleMaidsPose"))
  5295. {
  5296. string path = strArray2[0].Split('/')[1];
  5297. byte[] numArray = new byte[0];
  5298. try
  5299. {
  5300. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  5301. {
  5302. numArray = new byte[fileStream.Length];
  5303. fileStream.Read(numArray, 0, numArray.Length);
  5304. }
  5305. }
  5306. catch { }
  5307. if (0 < numArray.Length)
  5308. {
  5309. long hashCode = Path.GetFileName(path).GetHashCode();
  5310. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  5311. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  5312. {
  5313. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL,
  5314. Maid.AutoTwist.WristR, Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  5315. };
  5316. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  5317. {
  5318. maid.SetAutoTwist(f_eType, true);
  5319. }
  5320. }
  5321. }
  5322. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  5323. {
  5324. loadPose[selectMaidIndex] = strArray2[0];
  5325. }
  5326. else if (!strArray2[0].StartsWith("dance_"))
  5327. {
  5328. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  5329. }
  5330. else
  5331. {
  5332. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  5333. {
  5334. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  5335. }
  5336. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  5337. }
  5338. if (strArray2.Length > 1)
  5339. {
  5340. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  5341. isDanceStop = true;
  5342. if (strArray2.Length > 2)
  5343. {
  5344. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  5345. isPoseIti[selectMaidIndex] = true;
  5346. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  5347. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  5348. }
  5349. }
  5350. }
  5351. }
  5352. int index3 = -1;
  5353. for (int index2 = 0; index2 < groupList.Count; ++index2)
  5354. {
  5355. if (poseIndex[selectMaidIndex] < (int)groupList[index2])
  5356. {
  5357. index3 = index2;
  5358. break;
  5359. }
  5360. }
  5361. int length2 = (int)groupList[0];
  5362. int num3 = 0;
  5363. if (index3 > 0)
  5364. {
  5365. length2 = (int)groupList[index3] - (int)groupList[index3 - 1];
  5366. num3 = (int)groupList[index3 - 1];
  5367. }
  5368. if (index3 < 0)
  5369. {
  5370. index3 = groupList.Count;
  5371. length2 = poseArray.Length - (int)groupList[index3 - 1];
  5372. num3 = (int)groupList[index3 - 1];
  5373. }
  5374. poseComboList = new GUIContent[length2];
  5375. int index4 = 0;
  5376. for (int index2 = num3; index2 < num3 + length2; ++index2)
  5377. {
  5378. bool flag2 = false;
  5379. foreach (IniKey key in Preferences["pose"].Keys)
  5380. {
  5381. if (poseArray[index2] == key.Key)
  5382. {
  5383. IniKey iniKey = Preferences["pose"][key.Key];
  5384. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  5385. {
  5386. poseComboList[index4] =
  5387. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  5388. + "                    " + key.Key);
  5389. flag2 = true;
  5390. }
  5391. }
  5392. }
  5393. if (!flag2)
  5394. {
  5395. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index2]);
  5396. }
  5397. ++index4;
  5398. }
  5399. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  5400. poseGroupCombo.selectedItemIndex = index3;
  5401. poseCombo.selectedItemIndex = 0;
  5402. }
  5403. poseGroupIndex =
  5404. poseGroupCombo.List(new Rect(GetPix(35),
  5405. GetPix(95),
  5406. GetPix(95),
  5407. GetPix(23)),
  5408. poseGroupComboList[index7].text,
  5409. poseGroupComboList,
  5410. buttonStyle2,
  5411. "box",
  5412. listStyle4);
  5413. if (poseGroupCombo.isClickedComboButton)
  5414. {
  5415. isCombo2 = true;
  5416. }
  5417. else if (isCombo2)
  5418. {
  5419. isCombo2 = false;
  5420. isPoseInit = true;
  5421. poseIndex[selectMaidIndex] = poseGroupIndex <= 0 ? 0 : (int)groupList[poseGroupIndex - 1];
  5422. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  5423. {
  5424. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  5425. isStop[selectMaidIndex] = false;
  5426. poseCount[selectMaidIndex] = 20;
  5427. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  5428. {
  5429. maid.body0.MuneYureL(0.0f);
  5430. maid.body0.MuneYureR(0.0f);
  5431. }
  5432. else
  5433. {
  5434. maid.body0.MuneYureL(1f);
  5435. maid.body0.MuneYureR(1f);
  5436. }
  5437. if (strArray2[0].Contains("MultipleMaidsPose"))
  5438. {
  5439. string path = strArray2[0].Split('/')[1];
  5440. byte[] numArray = new byte[0];
  5441. try
  5442. {
  5443. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  5444. {
  5445. numArray = new byte[fileStream.Length];
  5446. fileStream.Read(numArray, 0, numArray.Length);
  5447. }
  5448. }
  5449. catch { }
  5450. if (0 < numArray.Length)
  5451. {
  5452. long hashCode = Path.GetFileName(path).GetHashCode();
  5453. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  5454. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  5455. {
  5456. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  5457. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  5458. };
  5459. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  5460. {
  5461. maid.SetAutoTwist(f_eType, true);
  5462. }
  5463. }
  5464. }
  5465. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  5466. {
  5467. loadPose[selectMaidIndex] = strArray2[0];
  5468. }
  5469. else if (!strArray2[0].StartsWith("dance_"))
  5470. {
  5471. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  5472. }
  5473. else
  5474. {
  5475. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  5476. {
  5477. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  5478. }
  5479. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  5480. }
  5481. if (strArray2.Length > 1)
  5482. {
  5483. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  5484. isDanceStop = true;
  5485. if (strArray2.Length > 2)
  5486. {
  5487. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  5488. isPoseIti[selectMaidIndex] = true;
  5489. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  5490. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  5491. }
  5492. }
  5493. }
  5494. int index2 = -1;
  5495. for (int index3 = 0; index3 < groupList.Count; ++index3)
  5496. {
  5497. if (poseIndex[selectMaidIndex] < (int)groupList[index3])
  5498. {
  5499. index2 = index3;
  5500. break;
  5501. }
  5502. }
  5503. int length2 = (int)groupList[0];
  5504. int num2 = 0;
  5505. if (index2 > 0)
  5506. {
  5507. length2 = (int)groupList[index2] - (int)groupList[index2 - 1];
  5508. num2 = (int)groupList[index2 - 1];
  5509. }
  5510. if (index2 < 0)
  5511. {
  5512. index2 = groupList.Count;
  5513. length2 = poseArray.Length - (int)groupList[index2 - 1];
  5514. num2 = (int)groupList[index2 - 1];
  5515. }
  5516. poseComboList = new GUIContent[length2];
  5517. int index4 = 0;
  5518. for (int index3 = num2; index3 < num2 + length2; ++index3)
  5519. {
  5520. bool flag2 = false;
  5521. foreach (IniKey key in Preferences["pose"].Keys)
  5522. {
  5523. if (poseArray[index3] == key.Key)
  5524. {
  5525. IniKey iniKey = Preferences["pose"][key.Key];
  5526. if (iniKey.Value != null && iniKey.Value.ToString() != "" && iniKey.Value.ToString() != "del")
  5527. {
  5528. poseComboList[index4] =
  5529. new GUIContent((index4 + 1).ToString() + ":" + iniKey.Value.Split('_')[0]
  5530. + "                    " + key.Key);
  5531. flag2 = true;
  5532. }
  5533. }
  5534. }
  5535. if (!flag2)
  5536. {
  5537. poseComboList[index4] = new GUIContent((index4 + 1).ToString() + ":" + poseArray[index3]);
  5538. }
  5539. ++index4;
  5540. }
  5541. poseCombo.scrollPos = new Vector2(0.0f, 0.0f);
  5542. poseGroupCombo.selectedItemIndex = index2;
  5543. poseCombo.selectedItemIndex = 0;
  5544. }
  5545. if (poseCombo.isClickedComboButton)
  5546. {
  5547. isCombo = true;
  5548. }
  5549. else if (isCombo)
  5550. {
  5551. isCombo = false;
  5552. isPoseInit = true;
  5553. poseIndex[selectMaidIndex] = poseGroupIndex <= 0
  5554. ? poseCombo.selectedItemIndex
  5555. : (int)groupList[poseGroupIndex - 1] + poseCombo.selectedItemIndex;
  5556. if (poseIndex[selectMaidIndex] == poseArray.Length)
  5557. {
  5558. poseIndex[selectMaidIndex] = 0;
  5559. }
  5560. if (!isLock[selectMaidIndex] && maid && maid.Visible)
  5561. {
  5562. string[] strArray2 = poseArray[poseIndex[selectMaidIndex]].Split(',');
  5563. isStop[selectMaidIndex] = false;
  5564. poseCount[selectMaidIndex] = 20;
  5565. if (strArray2[0].Contains("_momi") || strArray2[0].Contains("paizuri_"))
  5566. {
  5567. maid.body0.MuneYureL(0.0f);
  5568. maid.body0.MuneYureR(0.0f);
  5569. }
  5570. else
  5571. {
  5572. maid.body0.MuneYureL(1f);
  5573. maid.body0.MuneYureR(1f);
  5574. }
  5575. if (strArray2[0].Contains("MultipleMaidsPose"))
  5576. {
  5577. string path = strArray2[0].Split('/')[1];
  5578. byte[] numArray = new byte[0];
  5579. try
  5580. {
  5581. using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
  5582. {
  5583. numArray = new byte[fileStream.Length];
  5584. fileStream.Read(numArray, 0, numArray.Length);
  5585. }
  5586. }
  5587. catch { }
  5588. if (0 < numArray.Length)
  5589. {
  5590. long hashCode = Path.GetFileName(path).GetHashCode();
  5591. maid.body0.CrossFade(hashCode.ToString(), numArray, false, false, false, 0.0f, 1f);
  5592. Maid.AutoTwist[] autoTwistArray = new Maid.AutoTwist[6]
  5593. {
  5594. Maid.AutoTwist.ShoulderL, Maid.AutoTwist.ShoulderR, Maid.AutoTwist.WristL, Maid.AutoTwist.WristR,
  5595. Maid.AutoTwist.ThighL, Maid.AutoTwist.ThighR
  5596. };
  5597. foreach (Maid.AutoTwist f_eType in autoTwistArray)
  5598. {
  5599. maid.SetAutoTwist(f_eType, true);
  5600. }
  5601. }
  5602. }
  5603. else if (strArray2[0].StartsWith("p") && int.TryParse(strArray2[0].Substring(1), out result))
  5604. {
  5605. loadPose[selectMaidIndex] = strArray2[0];
  5606. }
  5607. else if (!strArray2[0].StartsWith("dance_"))
  5608. {
  5609. maidArray[selectMaidIndex].CrossFade(strArray2[0] + ".anm", false, true, false, 0.0f, 1f);
  5610. }
  5611. else
  5612. {
  5613. if (!maid.body0.m_Bones.GetComponent<Animation>().GetClip(strArray2[0] + ".anm"))
  5614. {
  5615. maid.body0.LoadAnime(strArray2[0] + ".anm", GameUty.FileSystem, strArray2[0] + ".anm", false, false);
  5616. }
  5617. maid.body0.m_Bones.GetComponent<Animation>().Play(strArray2[0] + ".anm");
  5618. }
  5619. if (strArray2.Length > 1)
  5620. {
  5621. maid.body0.m_Bones.GetComponent<Animation>()[strArray2[0] + ".anm"].time = float.Parse(strArray2[1]);
  5622. isDanceStop = true;
  5623. if (strArray2.Length > 2)
  5624. {
  5625. transform = CMT.SearchObjName(maidArray[selectMaidIndex].body0.m_Bones.transform, "Bip01", true);
  5626. isPoseIti[selectMaidIndex] = true;
  5627. poseIti[selectMaidIndex] = maidArray[selectMaidIndex].transform.position;
  5628. maidArray[selectMaidIndex].transform.position = new Vector3(100f, 100f, 100f);
  5629. }
  5630. }
  5631. }
  5632. }
  5633. if (itemCombo.isClickedComboButton)
  5634. {
  5635. isCombo3 = true;
  5636. }
  5637. else if (isCombo3)
  5638. {
  5639. isCombo3 = false;
  5640. strArray1 = new string[2];
  5641. string[] strArray2 = itemArray[itemIndex2[selectMaidIndex]].Split(',');
  5642. if (itemIndex2[selectMaidIndex] > 13)
  5643. {
  5644. strArray2 = itemArray[itemIndex2[selectMaidIndex] + 1].Split(',');
  5645. }
  5646. maid.DelProp(MPN.handitem, true);
  5647. bool flag2 = false;
  5648. if (itemIndex2[selectMaidIndex] == 0)
  5649. {
  5650. maid.DelProp(MPN.accvag, true);
  5651. maid.DelProp(MPN.accanl, true);
  5652. }
  5653. if (itemIndex2[selectMaidIndex] == 12 || itemIndex2[selectMaidIndex] == 13)
  5654. {
  5655. flag2 = true;
  5656. }
  5657. if (!flag2)
  5658. {
  5659. maid.DelProp(MPN.kousoku_upper, true);
  5660. maid.DelProp(MPN.kousoku_lower, true);
  5661. }
  5662. if (strArray2[0] != "")
  5663. {
  5664. maid.SetProp(strArray2[0], strArray2[1], 0, true, false);
  5665. }
  5666. if (itemIndex2[selectMaidIndex] == 12)
  5667. {
  5668. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex] - 1].Split(',');
  5669. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5670. }
  5671. if (itemIndex2[selectMaidIndex] == 13)
  5672. {
  5673. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex] + 1].Split(',');
  5674. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5675. }
  5676. if (itemIndex2[selectMaidIndex] == 23)
  5677. {
  5678. string[] strArray3 = itemArray[itemIndex2[selectMaidIndex]].Split(',');
  5679. maid.SetProp(strArray3[0], strArray3[1], 0, true, false);
  5680. cafeFlg[selectMaidIndex] = true;
  5681. }
  5682. maid.AllProcPropSeqStart();
  5683. itemCombo.selectedItemIndex = itemIndex2[selectMaidIndex];
  5684. itemIndex[selectMaidIndex] = itemIndex2[selectMaidIndex];
  5685. }
  5686. }
  5687. else
  5688. {
  5689. isWear = GUI.Toggle(new Rect(GetPix(5),
  5690. GetPix(98),
  5691. GetPix(70),
  5692. GetPix(20)),
  5693. isWear,
  5694. "トップス",
  5695. style4);
  5696. isSkirt = GUI.Toggle(new Rect(GetPix(90),
  5697. GetPix(98),
  5698. GetPix(70),
  5699. GetPix(20)),
  5700. isSkirt,
  5701. "ボトムス",
  5702. style4);
  5703. isBra = GUI.Toggle(new Rect(GetPix(5),
  5704. GetPix(123),
  5705. GetPix(80),
  5706. GetPix(20)),
  5707. isBra,
  5708. "ブラジャー",
  5709. style4);
  5710. isPanz = GUI.Toggle(new Rect(GetPix(90),
  5711. GetPix(123),
  5712. GetPix(60),
  5713. GetPix(20)),
  5714. isPanz,
  5715. "パンツ",
  5716. style4);
  5717. isHeadset = GUI.Toggle(new Rect(GetPix(5),
  5718. GetPix(148),
  5719. GetPix(70),
  5720. GetPix(20)),
  5721. isHeadset,
  5722. "ヘッド",
  5723. style4);
  5724. isMegane = GUI.Toggle(new Rect(GetPix(90),
  5725. GetPix(148),
  5726. GetPix(70),
  5727. GetPix(20)),
  5728. isMegane,
  5729. "メガネ",
  5730. style4);
  5731. isAccUde = GUI.Toggle(new Rect(GetPix(5),
  5732. GetPix(173),
  5733. GetPix(40),
  5734. GetPix(20)),
  5735. isAccUde,
  5736. "腕",
  5737. style4);
  5738. isGlove = GUI.Toggle(new Rect(GetPix(45),
  5739. GetPix(173),
  5740. GetPix(40),
  5741. GetPix(20)),
  5742. isGlove,
  5743. "手袋",
  5744. style4);
  5745. isAccSenaka = GUI.Toggle(new Rect(GetPix(97),
  5746. GetPix(173),
  5747. GetPix(40),
  5748. GetPix(20)),
  5749. isAccSenaka,
  5750. "背中",
  5751. style4);
  5752. isStkg = GUI.Toggle(new Rect(GetPix(5),
  5753. GetPix(198),
  5754. GetPix(70),
  5755. GetPix(20)),
  5756. isStkg,
  5757. "ソックス",
  5758. style4);
  5759. isShoes = GUI.Toggle(new Rect(GetPix(90),
  5760. GetPix(198),
  5761. GetPix(70),
  5762. GetPix(20)),
  5763. isShoes,
  5764. "シューズ",
  5765. style4);
  5766. mekure1[selectMaidIndex] =
  5767. GUI.Toggle(new Rect(GetPix(5),
  5768. GetPix(223),
  5769. GetPix(62),
  5770. GetPix(20)),
  5771. mekure1[selectMaidIndex],
  5772. "めくれ前",
  5773. style4);
  5774. mekure2[selectMaidIndex] =
  5775. GUI.Toggle(new Rect(GetPix(67),
  5776. GetPix(223),
  5777. GetPix(40),
  5778. GetPix(20)),
  5779. mekure2[selectMaidIndex],
  5780. "後ろ",
  5781. style4);
  5782. zurasi[selectMaidIndex] =
  5783. GUI.Toggle(new Rect(GetPix(105),
  5784. GetPix(223),
  5785. GetPix(50),
  5786. GetPix(20)),
  5787. zurasi[selectMaidIndex],
  5788. "ずらし",
  5789. style4);
  5790. }
  5791. bool state = GUI.enabled;
  5792. GUI.enabled = true;
  5793. GUI.DragWindow();
  5794. GUI.enabled = state;
  5795. }
  5796. private void FaceWindow(int winID)
  5797. {
  5798. GUIStyle style1 = "label";
  5799. style1.fontSize = GetPix(12);
  5800. style1.alignment = TextAnchor.UpperLeft;
  5801. GUIStyle style2 = "label";
  5802. style2.fontSize = GetPix(11);
  5803. style2.alignment = TextAnchor.UpperLeft;
  5804. GUIStyle style3 = "button";
  5805. style3.fontSize = GetPix(20);
  5806. GUIStyle buttonStyle = "button";
  5807. buttonStyle.fontSize = GetPix(12);
  5808. buttonStyle.alignment = TextAnchor.MiddleLeft;
  5809. GUIStyle style4 = new GUIStyle("toggle")
  5810. {
  5811. fontSize = GetPix(13)
  5812. };
  5813. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  5814. if (!faceInitFlg)
  5815. {
  5816. listStyle2.normal.textColor = Color.white;
  5817. listStyle2.normal.background = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.5f));
  5818. listStyle2.onHover.background = listStyle2.hover.background = new Texture2D(2, 2);
  5819. listStyle2.padding.left = listStyle2.padding.right = listStyle2.padding.top = listStyle2.padding.bottom = GetPix(0);
  5820. listStyle2.fontSize = GetPix(12);
  5821. faceCombo.selectedItemIndex = 0;
  5822. List<string> stringList = new List<string>(300);
  5823. stringList.AddRange(faceArray);
  5824. for (int index = 1; index < 300; ++index)
  5825. {
  5826. IniKey iniKey = Preferences["face"]["f" + index];
  5827. if (iniKey.Value != null)
  5828. {
  5829. string[] strArray = iniKey.Value.Split(':');
  5830. if (strArray.Length > 1)
  5831. {
  5832. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  5833. }
  5834. }
  5835. else
  5836. {
  5837. break;
  5838. }
  5839. }
  5840. faceCombo.selectedItemIndex = 0;
  5841. faceComboList = new GUIContent[stringList.ToArray().Length];
  5842. for (int index = 0; index < stringList.ToArray().Length; ++index)
  5843. {
  5844. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  5845. }
  5846. faceInitFlg = true;
  5847. }
  5848. if (faceCombo.isClickedComboButton)
  5849. {
  5850. GUI.enabled = false;
  5851. }
  5852. if (sceneLevel == 3 || sceneLevel == 5 || isF6)
  5853. {
  5854. if (!isF6)
  5855. {
  5856. bool flag = true;
  5857. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  5858. {
  5859. flag = false;
  5860. }
  5861. if (GUI.Toggle(new Rect(GetPix(2),
  5862. GetPix(2),
  5863. GetPix(39),
  5864. GetPix(20)),
  5865. flag,
  5866. "配置",
  5867. style4))
  5868. {
  5869. faceFlg = false;
  5870. poseFlg = false;
  5871. sceneFlg = false;
  5872. kankyoFlg = false;
  5873. kankyo2Flg = false;
  5874. bGui = true;
  5875. }
  5876. }
  5877. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  5878. GetPix(2),
  5879. GetPix(39),
  5880. GetPix(20)),
  5881. poseFlg,
  5882. "操作",
  5883. style4))
  5884. {
  5885. poseFlg = true;
  5886. faceFlg = false;
  5887. sceneFlg = false;
  5888. kankyoFlg = false;
  5889. kankyo2Flg = false;
  5890. }
  5891. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  5892. faceFlg,
  5893. "表情",
  5894. style4))
  5895. {
  5896. faceFlg = true;
  5897. poseFlg = false;
  5898. sceneFlg = false;
  5899. kankyoFlg = false;
  5900. kankyo2Flg = false;
  5901. if (!faceFlg2)
  5902. {
  5903. isFaceInit = true;
  5904. faceFlg2 = true;
  5905. maidArray[selectMaidIndex].boMabataki = false;
  5906. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5907. }
  5908. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  5909. }
  5910. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  5911. kankyoFlg,
  5912. "環境",
  5913. style4))
  5914. {
  5915. poseFlg = false;
  5916. faceFlg = false;
  5917. sceneFlg = false;
  5918. kankyoFlg = true;
  5919. kankyo2Flg = false;
  5920. }
  5921. if (!line1)
  5922. {
  5923. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  5924. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  5925. }
  5926. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  5927. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  5928. style1.fontSize = GetPix(13);
  5929. style1.alignment = TextAnchor.MiddleCenter;
  5930. GUI.Label(new Rect(GetPix(125), GetPix(25), GetPix(40), GetPix(25)),
  5931. string.Concat(selectMaidIndex + 1),
  5932. style1);
  5933. style1.fontSize = GetPix(11);
  5934. style1.alignment = TextAnchor.UpperLeft;
  5935. }
  5936. if (sceneLevel > 0)
  5937. {
  5938. int selectMaidIndex = this.selectMaidIndex;
  5939. if (sceneLevel == 3 || sceneLevel == 5 && (isF7 || maidCnt > 1))
  5940. {
  5941. if (GUI.Button(new Rect(GetPix(5),
  5942. GetPix(53),
  5943. GetPix(23),
  5944. GetPix(32)),
  5945. "<",
  5946. style3))
  5947. {
  5948. --this.selectMaidIndex;
  5949. if (this.selectMaidIndex < 0)
  5950. {
  5951. this.selectMaidIndex = selectList.Count - 1;
  5952. }
  5953. isFaceInit = true;
  5954. faceFlg = true;
  5955. copyIndex = 0;
  5956. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  5957. }
  5958. if (GUI.Button(new Rect(GetPix(135),
  5959. GetPix(53),
  5960. GetPix(23),
  5961. GetPix(32)),
  5962. ">",
  5963. style3))
  5964. {
  5965. ++this.selectMaidIndex;
  5966. if (selectList.Count <= this.selectMaidIndex)
  5967. {
  5968. this.selectMaidIndex = 0;
  5969. }
  5970. isFaceInit = true;
  5971. faceFlg = true;
  5972. copyIndex = 0;
  5973. faceCombo.selectedItemIndex = faceIndex[this.selectMaidIndex];
  5974. }
  5975. }
  5976. if (maidArray[this.selectMaidIndex].GetThumIcon())
  5977. {
  5978. GUI.DrawTexture(new Rect(GetPix(30),
  5979. GetPix(25),
  5980. GetPix(60),
  5981. GetPix(60)),
  5982. maidArray[this.selectMaidIndex].GetThumIcon());
  5983. }
  5984. GUI.Label(new Rect(GetPix(90), GetPix(50), GetPix(140), GetPix(210)),
  5985. maidArray[this.selectMaidIndex].status.lastName + "\n" + maidArray[this.selectMaidIndex].status.firstName,
  5986. style1);
  5987. if (isFace[selectMaidIndex])
  5988. {
  5989. if (GUI.Button(new Rect(GetPix(5),
  5990. GetPix(25),
  5991. GetPix(23),
  5992. GetPix(23)),
  5993. "有",
  5994. style3))
  5995. {
  5996. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  5997. maidArray[selectMaidIndex].boMabataki = false;
  5998. isFace[selectMaidIndex] = false;
  5999. }
  6000. maidArray[selectMaidIndex].boMabataki = false;
  6001. }
  6002. else
  6003. {
  6004. if (GUI.Button(new Rect(GetPix(5),
  6005. GetPix(25),
  6006. GetPix(23),
  6007. GetPix(23)),
  6008. "無",
  6009. style3))
  6010. {
  6011. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6012. maidArray[selectMaidIndex].boMabataki = false;
  6013. morph.EyeMabataki = 0.0f;
  6014. isFaceInit = true;
  6015. isFace[selectMaidIndex] = true;
  6016. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  6017. }
  6018. GUI.enabled = false;
  6019. maidArray[selectMaidIndex].boMabataki = true;
  6020. }
  6021. }
  6022. if (GUI.Button(new Rect(GetPix(5), GetPix(95), GetPix(23), GetPix(23)),
  6023. "<",
  6024. style3))
  6025. {
  6026. --faceIndex[selectMaidIndex];
  6027. if (faceIndex[selectMaidIndex] <= -1)
  6028. {
  6029. faceIndex[selectMaidIndex] = faceComboList.Length - 1;
  6030. }
  6031. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6032. maidArray[selectMaidIndex].boMabataki = false;
  6033. morph.EyeMabataki = 0.0f;
  6034. if (faceIndex[selectMaidIndex] < faceArray.Length)
  6035. {
  6036. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  6037. }
  6038. else
  6039. {
  6040. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  6041. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  6042. if (!isVR)
  6043. {
  6044. maidArray[selectMaidIndex].boMabataki = false;
  6045. }
  6046. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  6047. fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
  6048. fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
  6049. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  6050. fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
  6051. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  6052. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  6053. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  6054. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  6055. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  6056. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  6057. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  6058. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  6059. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  6060. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  6061. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  6062. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  6063. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  6064. fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
  6065. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  6066. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  6067. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  6068. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  6069. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  6070. try
  6071. {
  6072. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  6073. }
  6074. catch { }
  6075. if (float.Parse(strArray[24]) == 1.0)
  6076. {
  6077. fieldValue1[(int)morph.hash["namida"]] = 1f;
  6078. }
  6079. else
  6080. {
  6081. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  6082. }
  6083. if (float.Parse(strArray[25]) == 1.0)
  6084. {
  6085. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  6086. }
  6087. else
  6088. {
  6089. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  6090. }
  6091. if (float.Parse(strArray[26]) == 1.0)
  6092. {
  6093. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  6094. }
  6095. else
  6096. {
  6097. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  6098. }
  6099. if (float.Parse(strArray[27]) == 1.0)
  6100. {
  6101. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  6102. }
  6103. else
  6104. {
  6105. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  6106. }
  6107. if (float.Parse(strArray[28]) == 1.0)
  6108. {
  6109. fieldValue1[(int)morph.hash["shock"]] = 1f;
  6110. }
  6111. else
  6112. {
  6113. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  6114. }
  6115. if (float.Parse(strArray[29]) == 1.0)
  6116. {
  6117. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  6118. }
  6119. else
  6120. {
  6121. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  6122. }
  6123. if (float.Parse(strArray[30]) == 1.0)
  6124. {
  6125. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  6126. }
  6127. else
  6128. {
  6129. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  6130. }
  6131. if (float.Parse(strArray[31]) == 1.0)
  6132. {
  6133. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  6134. }
  6135. else
  6136. {
  6137. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  6138. }
  6139. if (float.Parse(strArray[32]) == 1.0)
  6140. {
  6141. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  6142. }
  6143. else
  6144. {
  6145. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  6146. }
  6147. if (float.Parse(strArray[33]) == 1.0)
  6148. {
  6149. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  6150. }
  6151. else
  6152. {
  6153. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  6154. }
  6155. if (float.Parse(strArray[34]) == 1.0)
  6156. {
  6157. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  6158. }
  6159. else
  6160. {
  6161. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  6162. }
  6163. if (strArray.Length > 35)
  6164. {
  6165. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  6166. }
  6167. }
  6168. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  6169. isFaceInit = true;
  6170. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  6171. }
  6172. if (GUI.Button(new Rect(GetPix(135), GetPix(95), GetPix(23), GetPix(23)),
  6173. ">",
  6174. style3))
  6175. {
  6176. ++faceIndex[selectMaidIndex];
  6177. if (faceIndex[selectMaidIndex] == faceComboList.Length)
  6178. {
  6179. faceIndex[selectMaidIndex] = 0;
  6180. }
  6181. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6182. maidArray[selectMaidIndex].boMabataki = false;
  6183. morph.EyeMabataki = 0.0f;
  6184. if (faceIndex[selectMaidIndex] < faceArray.Length)
  6185. {
  6186. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  6187. }
  6188. else
  6189. {
  6190. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  6191. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  6192. if (!isVR)
  6193. {
  6194. maidArray[selectMaidIndex].boMabataki = false;
  6195. }
  6196. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  6197. fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
  6198. fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
  6199. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  6200. fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
  6201. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  6202. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  6203. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  6204. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  6205. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  6206. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  6207. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  6208. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  6209. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  6210. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  6211. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  6212. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  6213. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  6214. fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
  6215. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  6216. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  6217. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  6218. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  6219. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  6220. try
  6221. {
  6222. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  6223. }
  6224. catch { }
  6225. if (float.Parse(strArray[24]) == 1.0)
  6226. {
  6227. fieldValue1[(int)morph.hash["namida"]] = 1f;
  6228. }
  6229. else
  6230. {
  6231. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  6232. }
  6233. if (float.Parse(strArray[25]) == 1.0)
  6234. {
  6235. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  6236. }
  6237. else
  6238. {
  6239. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  6240. }
  6241. if (float.Parse(strArray[26]) == 1.0)
  6242. {
  6243. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  6244. }
  6245. else
  6246. {
  6247. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  6248. }
  6249. if (float.Parse(strArray[27]) == 1.0)
  6250. {
  6251. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  6252. }
  6253. else
  6254. {
  6255. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  6256. }
  6257. if (float.Parse(strArray[28]) == 1.0)
  6258. {
  6259. fieldValue1[(int)morph.hash["shock"]] = 1f;
  6260. }
  6261. else
  6262. {
  6263. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  6264. }
  6265. if (float.Parse(strArray[29]) == 1.0)
  6266. {
  6267. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  6268. }
  6269. else
  6270. {
  6271. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  6272. }
  6273. if (float.Parse(strArray[30]) == 1.0)
  6274. {
  6275. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  6276. }
  6277. else
  6278. {
  6279. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  6280. }
  6281. if (float.Parse(strArray[31]) == 1.0)
  6282. {
  6283. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  6284. }
  6285. else
  6286. {
  6287. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  6288. }
  6289. if (float.Parse(strArray[32]) == 1.0)
  6290. {
  6291. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  6292. }
  6293. else
  6294. {
  6295. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  6296. }
  6297. if (float.Parse(strArray[33]) == 1.0)
  6298. {
  6299. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  6300. }
  6301. else
  6302. {
  6303. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  6304. }
  6305. if (float.Parse(strArray[34]) == 1.0)
  6306. {
  6307. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  6308. }
  6309. else
  6310. {
  6311. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  6312. }
  6313. if (strArray.Length > 35)
  6314. {
  6315. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  6316. }
  6317. }
  6318. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  6319. isFaceInit = true;
  6320. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  6321. }
  6322. int offsetTop = GetPix(120);
  6323. int UIHeight = GetPix(510);
  6324. Rect faceWindowScrollRect = new Rect(0, offsetTop, rectWin.width, rectWin.height - offsetTop);
  6325. Rect faceWindowScrollView = new Rect(0, 0, rectWin.width - 20, UIHeight);
  6326. faceScrollPos = GUI.BeginScrollView(faceWindowScrollRect, faceScrollPos, faceWindowScrollView);
  6327. #region face sliders
  6328. int sliderWidth = GetPix(70);
  6329. int sliderHeight = GetPix(20);
  6330. int labelWidth = GetPix(100);
  6331. int labelHeight = GetPix(25);
  6332. int sliderLeft = 8;
  6333. int sliderRight = 88;
  6334. int labelPosition = 0;
  6335. int sliderPosition = 15;
  6336. int sliderOffset = 28;
  6337. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition),
  6338. labelWidth, labelHeight),
  6339. "目の開閉",
  6340. style2);
  6341. eyeclose = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6342. GetPix(sliderPosition),
  6343. sliderWidth, sliderHeight),
  6344. eyeclose,
  6345. 0.0f,
  6346. 1f);
  6347. GUI.Label(new Rect(GetPix(sliderRight), GetPix(labelPosition),
  6348. labelWidth, labelHeight),
  6349. "にっこり",
  6350. style2);
  6351. eyeclose2 = GUI.HorizontalSlider(new Rect(GetPix(sliderRight),
  6352. GetPix(sliderPosition),
  6353. sliderWidth, sliderHeight),
  6354. eyeclose2,
  6355. 0.0f,
  6356. 1f);
  6357. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset),
  6358. labelWidth, labelHeight),
  6359. "ジト目",
  6360. style2);
  6361. eyeclose3 = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6362. GetPix(sliderPosition + sliderOffset),
  6363. sliderWidth, sliderHeight),
  6364. eyeclose3,
  6365. 0.0f,
  6366. 1f);
  6367. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset),
  6368. labelWidth, labelHeight),
  6369. "見開く",
  6370. style2);
  6371. eyebig = GUI.HorizontalSlider(new Rect(GetPix(88),
  6372. GetPix(sliderPosition + sliderOffset),
  6373. sliderWidth, sliderHeight),
  6374. eyebig,
  6375. 0.0f,
  6376. 1f);
  6377. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 2),
  6378. labelWidth, labelHeight),
  6379. "ウインク1",
  6380. style2);
  6381. eyeclose6 = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6382. GetPix(sliderPosition + sliderOffset * 2),
  6383. sliderWidth, sliderHeight),
  6384. eyeclose6,
  6385. 0.0f,
  6386. 1f);
  6387. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 2),
  6388. labelWidth, labelHeight),
  6389. "ウインク2",
  6390. style2);
  6391. eyeclose5 = GUI.HorizontalSlider(new Rect(GetPix(88),
  6392. GetPix(sliderPosition + sliderOffset * 2),
  6393. sliderWidth, sliderHeight),
  6394. eyeclose5,
  6395. 0.0f,
  6396. 1f);
  6397. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 3),
  6398. labelWidth, labelHeight),
  6399. "ハイライト",
  6400. style2);
  6401. hitomih = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6402. GetPix(sliderPosition + sliderOffset * 3),
  6403. sliderWidth, sliderHeight),
  6404. hitomih,
  6405. 0.0f,
  6406. 2f);
  6407. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 3),
  6408. labelWidth, labelHeight),
  6409. "瞳サイズ",
  6410. style2);
  6411. hitomis = GUI.HorizontalSlider(new Rect(GetPix(88),
  6412. GetPix(sliderPosition + sliderOffset * 3),
  6413. sliderWidth, sliderHeight),
  6414. hitomis,
  6415. 0.0f,
  6416. 1f);
  6417. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 4),
  6418. labelWidth, labelHeight),
  6419. "眉角度1",
  6420. style2);
  6421. mayuha = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6422. GetPix(sliderPosition + sliderOffset * 4),
  6423. sliderWidth, sliderHeight),
  6424. mayuha,
  6425. 0.0f,
  6426. 1f);
  6427. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 4),
  6428. labelWidth, labelHeight),
  6429. "眉角度2",
  6430. style2);
  6431. mayuw = GUI.HorizontalSlider(new Rect(GetPix(88),
  6432. GetPix(sliderPosition + sliderOffset * 4),
  6433. sliderWidth, sliderHeight),
  6434. mayuw,
  6435. 0.0f,
  6436. 1f);
  6437. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 5),
  6438. labelWidth, labelHeight),
  6439. "眉上げ",
  6440. style2);
  6441. mayuup = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6442. GetPix(sliderPosition + sliderOffset * 5),
  6443. sliderWidth, sliderHeight),
  6444. mayuup,
  6445. 0.0f,
  6446. 0.8f);
  6447. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 5),
  6448. labelWidth, labelHeight),
  6449. "眉下げ1",
  6450. style2);
  6451. mayuv = GUI.HorizontalSlider(new Rect(GetPix(88),
  6452. GetPix(sliderPosition + sliderOffset * 5),
  6453. sliderWidth, sliderHeight),
  6454. mayuv,
  6455. 0.0f,
  6456. 0.8f);
  6457. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 6),
  6458. labelWidth, labelHeight),
  6459. "眉下げ2",
  6460. style2);
  6461. mayuvhalf = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6462. GetPix(sliderPosition + sliderOffset * 6),
  6463. sliderWidth, sliderHeight),
  6464. mayuvhalf,
  6465. 0.0f,
  6466. 0.9f);
  6467. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 7),
  6468. labelWidth, labelHeight),
  6469. "口開け1",
  6470. style2);
  6471. moutha = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6472. GetPix(sliderPosition + sliderOffset * 7),
  6473. sliderWidth, sliderHeight),
  6474. moutha,
  6475. 0.0f,
  6476. 1f);
  6477. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 7),
  6478. labelWidth, labelHeight),
  6479. "口開け2",
  6480. style2);
  6481. mouths = GUI.HorizontalSlider(new Rect(GetPix(88),
  6482. GetPix(sliderPosition + sliderOffset * 7),
  6483. sliderWidth, sliderHeight),
  6484. mouths,
  6485. 0.0f,
  6486. 0.9f);
  6487. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 8),
  6488. labelWidth, labelHeight),
  6489. "口幅狭く",
  6490. style2);
  6491. mouthc = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6492. GetPix(sliderPosition + sliderOffset * 8),
  6493. sliderWidth, sliderHeight),
  6494. mouthc,
  6495. 0.0f,
  6496. 1f);
  6497. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 8),
  6498. labelWidth, labelHeight),
  6499. "口幅広く",
  6500. style2);
  6501. mouthi = GUI.HorizontalSlider(new Rect(GetPix(88),
  6502. GetPix(sliderPosition + sliderOffset * 8),
  6503. sliderWidth, sliderHeight),
  6504. mouthi,
  6505. 0.0f,
  6506. 1f);
  6507. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 9),
  6508. labelWidth, labelHeight),
  6509. "口角上げ",
  6510. style2);
  6511. mouthup = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6512. GetPix(sliderPosition + sliderOffset * 9),
  6513. sliderWidth, sliderHeight),
  6514. mouthup,
  6515. 0.0f,
  6516. 1.4f);
  6517. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 9),
  6518. labelWidth, labelHeight),
  6519. "口角下げ",
  6520. style2);
  6521. mouthdw = GUI.HorizontalSlider(new Rect(GetPix(88),
  6522. GetPix(sliderPosition + sliderOffset * 9),
  6523. sliderWidth, sliderHeight),
  6524. mouthdw,
  6525. 0.0f,
  6526. 1f);
  6527. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 10),
  6528. labelWidth, labelHeight),
  6529. "口中央上げ",
  6530. style2);
  6531. mouthhe = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6532. GetPix(sliderPosition + sliderOffset * 10),
  6533. sliderWidth, sliderHeight),
  6534. mouthhe,
  6535. 0.0f,
  6536. 1f);
  6537. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 10),
  6538. labelWidth, labelHeight),
  6539. "左口角上げ",
  6540. style2);
  6541. mouthuphalf = GUI.HorizontalSlider(new Rect(GetPix(88),
  6542. GetPix(sliderPosition + sliderOffset * 10),
  6543. sliderWidth, sliderHeight),
  6544. mouthuphalf,
  6545. 0.0f,
  6546. 2f);
  6547. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 11),
  6548. labelWidth, labelHeight),
  6549. "舌出し",
  6550. style2);
  6551. tangout = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6552. GetPix(sliderPosition + sliderOffset * 11),
  6553. sliderWidth, sliderHeight),
  6554. tangout,
  6555. 0.0f,
  6556. 1f);
  6557. GUI.Label(new Rect(GetPix(88), GetPix(labelPosition + sliderOffset * 11),
  6558. labelWidth, labelHeight),
  6559. "舌上げ",
  6560. style2);
  6561. tangup = GUI.HorizontalSlider(new Rect(GetPix(88),
  6562. GetPix(sliderPosition + sliderOffset * 11),
  6563. sliderWidth, sliderHeight),
  6564. tangup,
  6565. 0.0f,
  6566. 0.7f);
  6567. GUI.Label(new Rect(GetPix(sliderLeft), GetPix(labelPosition + sliderOffset * 12),
  6568. labelWidth, labelHeight),
  6569. "舌根上げ",
  6570. style2);
  6571. tangopen = GUI.HorizontalSlider(new Rect(GetPix(sliderLeft),
  6572. GetPix(sliderPosition + sliderOffset * 12),
  6573. sliderWidth, sliderHeight),
  6574. tangopen,
  6575. 0.0f,
  6576. 1f);
  6577. #endregion
  6578. #region face toggles
  6579. int togglePositionX = 5;
  6580. int togglePositionY = 370;
  6581. int toggleOffsetX = 55;
  6582. int toggleOffsetY = 22;
  6583. int toggleWidth = GetPix(55);
  6584. int toggleHeight = GetPix(16);
  6585. isHoho2 = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6586. GetPix(togglePositionY),
  6587. toggleWidth, toggleHeight),
  6588. isHoho2,
  6589. "赤面",
  6590. style4);
  6591. isShock = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6592. GetPix(togglePositionY),
  6593. toggleWidth, toggleHeight),
  6594. isShock,
  6595. "ショック",
  6596. style4);
  6597. isNosefook = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6598. GetPix(togglePositionY),
  6599. toggleWidth, toggleHeight),
  6600. isNosefook,
  6601. "鼻フック",
  6602. style4);
  6603. isNamida = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6604. GetPix(togglePositionY + toggleOffsetY * 1),
  6605. toggleWidth, toggleHeight),
  6606. isNamida,
  6607. "涙",
  6608. style4);
  6609. isYodare = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6610. GetPix(togglePositionY + toggleOffsetY * 1),
  6611. toggleWidth, toggleHeight),
  6612. isYodare,
  6613. "涎",
  6614. style4);
  6615. isToothoff = !GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6616. GetPix(togglePositionY + toggleOffsetY * 1),
  6617. toggleWidth, toggleHeight),
  6618. !isToothoff,
  6619. "歯",
  6620. style4);
  6621. isTear1 = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6622. GetPix(togglePositionY + toggleOffsetY * 2),
  6623. toggleWidth, toggleHeight),
  6624. isTear1,
  6625. "涙1",
  6626. style4);
  6627. isTear2 = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6628. GetPix(togglePositionY + toggleOffsetY * 2),
  6629. toggleWidth, toggleHeight),
  6630. isTear2,
  6631. "涙2",
  6632. style4);
  6633. isTear3 = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6634. GetPix(togglePositionY + toggleOffsetY * 2),
  6635. toggleWidth, toggleHeight),
  6636. isTear3,
  6637. "涙3",
  6638. style4);
  6639. isHohos = GUI.Toggle(new Rect(GetPix(togglePositionX),
  6640. GetPix(togglePositionY + toggleOffsetY * 3),
  6641. toggleWidth, toggleHeight),
  6642. isHohos,
  6643. "頬1",
  6644. style4);
  6645. isHoho = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 1),
  6646. GetPix(togglePositionY + toggleOffsetY * 3),
  6647. toggleWidth, toggleHeight),
  6648. isHoho,
  6649. "頬2",
  6650. style4);
  6651. isHohol = GUI.Toggle(new Rect(GetPix(togglePositionX + toggleOffsetX * 2),
  6652. GetPix(togglePositionY + toggleOffsetY * 3),
  6653. toggleWidth, toggleHeight),
  6654. isHohol,
  6655. "頬3",
  6656. style4);
  6657. #endregion
  6658. int faceSaveToggleY = togglePositionY + toggleOffsetY * 4;
  6659. int faceSaveInputY = faceSaveToggleY + 20;
  6660. isFaceEdit = GUI.Toggle(new Rect(GetPix(5),
  6661. GetPix(faceSaveToggleY),
  6662. toggleWidth, toggleHeight),
  6663. isFaceEdit,
  6664. "登録",
  6665. style4);
  6666. if (isFaceEdit)
  6667. {
  6668. inName4 = GUI.TextField(new Rect(GetPix(5),
  6669. GetPix(faceSaveInputY),
  6670. GetPix(100),
  6671. GetPix(20)),
  6672. inName4);
  6673. if (GUI.Button(new Rect(GetPix(107),
  6674. GetPix(faceSaveInputY),
  6675. GetPix(35),
  6676. GetPix(20)),
  6677. "追加",
  6678. style3))
  6679. {
  6680. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  6681. GUI.FocusControl("");
  6682. int num2 = 1;
  6683. for (int index = 1; index < 1000; ++index)
  6684. {
  6685. if (Preferences["face"]["f" + index].Value == null)
  6686. {
  6687. num2 = index;
  6688. break;
  6689. }
  6690. }
  6691. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6692. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  6693. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  6694. string str1 = inName4 + ":" + fieldValue2[(int)morph.hash["eyeclose"]] + ","
  6695. + fieldValue2[(int)morph.hash["eyeclose2"]] + ","
  6696. + fieldValue2[(int)morph.hash["eyeclose3"]] + ","
  6697. + fieldValue2[(int)morph.hash["eyeclose6"]] + ","
  6698. + fieldValue1[(int)morph.hash["hitomih"]] + ","
  6699. + fieldValue1[(int)morph.hash["hitomis"]] + ","
  6700. + fieldValue1[(int)morph.hash["mayuha"]] + ","
  6701. + fieldValue1[(int)morph.hash["mayuup"]] + ","
  6702. + fieldValue1[(int)morph.hash["mayuv"]] + ","
  6703. + fieldValue1[(int)morph.hash["mayuvhalf"]] + ","
  6704. + fieldValue1[(int)morph.hash["moutha"]] + ","
  6705. + fieldValue1[(int)morph.hash["mouths"]] + ","
  6706. + fieldValue1[(int)morph.hash["mouthdw"]] + ","
  6707. + fieldValue1[(int)morph.hash["mouthup"]] + ","
  6708. + fieldValue1[(int)morph.hash["tangout"]] + ","
  6709. + fieldValue1[(int)morph.hash["tangup"]] + ","
  6710. + fieldValue1[(int)morph.hash["eyebig"]] + ","
  6711. + fieldValue2[(int)morph.hash["eyeclose5"]] + ","
  6712. + fieldValue1[(int)morph.hash["mayuw"]] + ","
  6713. + fieldValue1[(int)morph.hash["mouthhe"]] + ","
  6714. + fieldValue1[(int)morph.hash["mouthc"]] + ","
  6715. + fieldValue1[(int)morph.hash["mouthi"]] + ","
  6716. + fieldValue1[(int)morph.hash["mouthuphalf"]] + ",";
  6717. string str2;
  6718. try
  6719. {
  6720. str2 = str1 + fieldValue1[(int)morph.hash["tangopen"]] + ",";
  6721. }
  6722. catch
  6723. {
  6724. str2 = str1 + "0,";
  6725. }
  6726. string str3 = fieldValue1[(int)morph.hash["namida"]] <= 0.0
  6727. ? str2 + 0 + ","
  6728. : str2 + 1 + ",";
  6729. string str4 = fieldValue1[(int)morph.hash["tear1"]] <= 0.0
  6730. ? str3 + 0 + ","
  6731. : str3 + 1 + ",";
  6732. string str5 = fieldValue1[(int)morph.hash["tear2"]] <= 0.0
  6733. ? str4 + 0 + ","
  6734. : str4 + 1 + ",";
  6735. string str6 = fieldValue1[(int)morph.hash["tear3"]] <= 0.0
  6736. ? str5 + 0 + ","
  6737. : str5 + 1 + ",";
  6738. string str7 = fieldValue1[(int)morph.hash["shock"]] <= 0.0
  6739. ? str6 + 0 + ","
  6740. : str6 + 1 + ",";
  6741. string str8 = fieldValue1[(int)morph.hash["yodare"]] <= 0.0
  6742. ? str7 + 0 + ","
  6743. : str7 + 1 + ",";
  6744. string str9 = fieldValue1[(int)morph.hash["hoho"]] <= 0.0
  6745. ? str8 + 0 + ","
  6746. : str8 + 1 + ",";
  6747. string str10 = fieldValue1[(int)morph.hash["hoho2"]] <= 0.0
  6748. ? str9 + 0 + ","
  6749. : str9 + 1 + ",";
  6750. string str11 = fieldValue1[(int)morph.hash["hohos"]] <= 0.0
  6751. ? str10 + 0 + ","
  6752. : str10 + 1 + ",";
  6753. string str12 = fieldValue1[(int)morph.hash["hohol"]] <= 0.0
  6754. ? str11 + 0 + ","
  6755. : str11 + 1 + ",";
  6756. string str13 = fieldValue1[(int)morph.hash["toothoff"]] <= 0.0
  6757. ? str12 + 0 + ","
  6758. : str12 + 1 + ",";
  6759. string str14 = fieldValue1[(int)morph.hash["nosefook"]] <= 0.0
  6760. ? str13 + 0 + ":"
  6761. : str13 + 1 + ":";
  6762. Preferences["face"]["f" + num2].Value = str14;
  6763. SaveConfig();
  6764. List<string> stringList = new List<string>(300);
  6765. stringList.AddRange(faceArray);
  6766. for (int index = 1; index < 300; ++index)
  6767. {
  6768. IniKey iniKey = Preferences["face"]["f" + index];
  6769. if (iniKey.Value != null)
  6770. {
  6771. string[] strArray = iniKey.Value.Split(':');
  6772. if (strArray.Length > 1)
  6773. {
  6774. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  6775. }
  6776. }
  6777. else
  6778. {
  6779. break;
  6780. }
  6781. }
  6782. faceCombo.selectedItemIndex = 0;
  6783. faceComboList = new GUIContent[stringList.ToArray().Length];
  6784. for (int index = 0; index < stringList.ToArray().Length; ++index)
  6785. {
  6786. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  6787. }
  6788. faceCombo.selectedItemIndex = stringList.ToArray().Length - 1;
  6789. inName4 = "";
  6790. }
  6791. if (faceIndex[selectMaidIndex] < faceArray.Length)
  6792. {
  6793. GUI.enabled = false;
  6794. }
  6795. if (GUI.Button(new Rect(GetPix(144),
  6796. GetPix(faceSaveInputY),
  6797. GetPix(24),
  6798. GetPix(20)),
  6799. "削",
  6800. style3))
  6801. {
  6802. GameMain.Instance.SoundMgr.PlaySe("se002.ogg", false);
  6803. Preferences["face"]["f" + faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[1]].Value = "del";
  6804. SaveConfig();
  6805. List<string> stringList = new List<string>(300);
  6806. stringList.AddRange(faceArray);
  6807. for (int index = 1; index < 300; ++index)
  6808. {
  6809. IniKey iniKey = Preferences["face"]["f" + index];
  6810. if (iniKey.Value != null)
  6811. {
  6812. string[] strArray = iniKey.Value.Split(':');
  6813. if (strArray.Length > 1)
  6814. {
  6815. stringList.Add(strArray[0] + "               :" + index + ":" + strArray[1]);
  6816. }
  6817. }
  6818. else
  6819. {
  6820. break;
  6821. }
  6822. }
  6823. faceCombo.selectedItemIndex = 0;
  6824. faceComboList = new GUIContent[stringList.ToArray().Length];
  6825. for (int index = 0; index < stringList.ToArray().Length; ++index)
  6826. {
  6827. faceComboList[index] = new GUIContent(stringList.ToArray()[index]);
  6828. }
  6829. faceCombo.selectedItemIndex = 0;
  6830. for (int index = 0; index < maidCnt; ++index)
  6831. {
  6832. if (maidArray[index] && maidArray[index].Visible
  6833. && stringList.ToArray().Length <= faceIndex[index])
  6834. {
  6835. faceIndex[index] = 0;
  6836. }
  6837. }
  6838. }
  6839. GUI.enabled = true;
  6840. }
  6841. GUI.EndScrollView();
  6842. if (faceCombo.isClickedComboButton)
  6843. {
  6844. GUI.enabled = true;
  6845. }
  6846. if (isFace[selectMaidIndex])
  6847. {
  6848. faceIndex[selectMaidIndex] =
  6849. faceCombo.List(new Rect(GetPix(35),
  6850. GetPix(95),
  6851. GetPix(95),
  6852. GetPix(23)),
  6853. faceComboList[faceIndex[selectMaidIndex]].text,
  6854. faceComboList,
  6855. buttonStyle,
  6856. "box",
  6857. listStyle2);
  6858. }
  6859. else
  6860. {
  6861. faceCombo.List(new Rect(GetPix(35), GetPix(95), GetPix(95), GetPix(23)),
  6862. faceComboList[faceIndex[selectMaidIndex]].text,
  6863. faceComboList,
  6864. buttonStyle,
  6865. "box",
  6866. listStyle2);
  6867. }
  6868. if (faceCombo.isClickedComboButton)
  6869. {
  6870. isCombo = true;
  6871. }
  6872. else if (isCombo)
  6873. {
  6874. isCombo = false;
  6875. TMorph morph = maidArray[selectMaidIndex].body0.Face.morph;
  6876. float[] fieldValue1 = GetFieldValue<TMorph, float[]>(morph, "BlendValues");
  6877. morph.EyeMabataki = 0.0f;
  6878. if (faceIndex[selectMaidIndex] < faceArray.Length)
  6879. {
  6880. morph.MulBlendValues(faceArray[faceIndex[selectMaidIndex]], 1f);
  6881. }
  6882. else
  6883. {
  6884. float[] fieldValue2 = GetFieldValue<TMorph, float[]>(morph, "BlendValuesBackup");
  6885. if (!isVR)
  6886. {
  6887. maidArray[selectMaidIndex].boMabataki = false;
  6888. }
  6889. string[] strArray = faceComboList[faceIndex[selectMaidIndex]].text.Split(':')[2].Split(',');
  6890. fieldValue2[(int)morph.hash["eyeclose"]] = float.Parse(strArray[0]);
  6891. fieldValue2[(int)morph.hash["eyeclose2"]] = float.Parse(strArray[1]);
  6892. fieldValue2[(int)morph.hash["eyeclose3"]] = float.Parse(strArray[2]);
  6893. fieldValue2[(int)morph.hash["eyeclose6"]] = float.Parse(strArray[3]);
  6894. fieldValue1[(int)morph.hash["hitomih"]] = float.Parse(strArray[4]);
  6895. fieldValue1[(int)morph.hash["hitomis"]] = float.Parse(strArray[5]);
  6896. fieldValue1[(int)morph.hash["mayuha"]] = float.Parse(strArray[6]);
  6897. fieldValue1[(int)morph.hash["mayuup"]] = float.Parse(strArray[7]);
  6898. fieldValue1[(int)morph.hash["mayuv"]] = float.Parse(strArray[8]);
  6899. fieldValue1[(int)morph.hash["mayuvhalf"]] = float.Parse(strArray[9]);
  6900. fieldValue1[(int)morph.hash["moutha"]] = float.Parse(strArray[10]);
  6901. fieldValue1[(int)morph.hash["mouths"]] = float.Parse(strArray[11]);
  6902. fieldValue1[(int)morph.hash["mouthdw"]] = float.Parse(strArray[12]);
  6903. fieldValue1[(int)morph.hash["mouthup"]] = float.Parse(strArray[13]);
  6904. fieldValue1[(int)morph.hash["tangout"]] = float.Parse(strArray[14]);
  6905. fieldValue1[(int)morph.hash["tangup"]] = float.Parse(strArray[15]);
  6906. fieldValue1[(int)morph.hash["eyebig"]] = float.Parse(strArray[16]);
  6907. fieldValue2[(int)morph.hash["eyeclose5"]] = float.Parse(strArray[17]);
  6908. fieldValue1[(int)morph.hash["mayuw"]] = float.Parse(strArray[18]);
  6909. fieldValue1[(int)morph.hash["mouthhe"]] = float.Parse(strArray[19]);
  6910. fieldValue1[(int)morph.hash["mouthc"]] = float.Parse(strArray[20]);
  6911. fieldValue1[(int)morph.hash["mouthi"]] = float.Parse(strArray[21]);
  6912. fieldValue1[(int)morph.hash["mouthuphalf"]] = float.Parse(strArray[22]) + 0.01f;
  6913. try
  6914. {
  6915. fieldValue1[(int)morph.hash["tangopen"]] = float.Parse(strArray[23]);
  6916. }
  6917. catch { }
  6918. if (float.Parse(strArray[24]) == 1.0)
  6919. {
  6920. fieldValue1[(int)morph.hash["namida"]] = 1f;
  6921. }
  6922. else
  6923. {
  6924. fieldValue1[(int)morph.hash["namida"]] = 0.0f;
  6925. }
  6926. if (float.Parse(strArray[25]) == 1.0)
  6927. {
  6928. fieldValue1[(int)morph.hash["tear1"]] = 1f;
  6929. }
  6930. else
  6931. {
  6932. fieldValue1[(int)morph.hash["tear1"]] = 0.0f;
  6933. }
  6934. if (float.Parse(strArray[26]) == 1.0)
  6935. {
  6936. fieldValue1[(int)morph.hash["tear2"]] = 1f;
  6937. }
  6938. else
  6939. {
  6940. fieldValue1[(int)morph.hash["tear2"]] = 0.0f;
  6941. }
  6942. if (float.Parse(strArray[27]) == 1.0)
  6943. {
  6944. fieldValue1[(int)morph.hash["tear3"]] = 1f;
  6945. }
  6946. else
  6947. {
  6948. fieldValue1[(int)morph.hash["tear3"]] = 0.0f;
  6949. }
  6950. if (float.Parse(strArray[28]) == 1.0)
  6951. {
  6952. fieldValue1[(int)morph.hash["shock"]] = 1f;
  6953. }
  6954. else
  6955. {
  6956. fieldValue1[(int)morph.hash["shock"]] = 0.0f;
  6957. }
  6958. if (float.Parse(strArray[29]) == 1.0)
  6959. {
  6960. fieldValue1[(int)morph.hash["yodare"]] = 1f;
  6961. }
  6962. else
  6963. {
  6964. fieldValue1[(int)morph.hash["yodare"]] = 0.0f;
  6965. }
  6966. if (float.Parse(strArray[30]) == 1.0)
  6967. {
  6968. fieldValue1[(int)morph.hash["hoho"]] = 0.5f;
  6969. }
  6970. else
  6971. {
  6972. fieldValue1[(int)morph.hash["hoho"]] = 0.0f;
  6973. }
  6974. if (float.Parse(strArray[31]) == 1.0)
  6975. {
  6976. fieldValue1[(int)morph.hash["hoho2"]] = 0.5f;
  6977. }
  6978. else
  6979. {
  6980. fieldValue1[(int)morph.hash["hoho2"]] = 0.0f;
  6981. }
  6982. if (float.Parse(strArray[32]) == 1.0)
  6983. {
  6984. fieldValue1[(int)morph.hash["hohos"]] = 1f;
  6985. }
  6986. else
  6987. {
  6988. fieldValue1[(int)morph.hash["hohos"]] = 0.0f;
  6989. }
  6990. if (float.Parse(strArray[33]) == 1.0)
  6991. {
  6992. fieldValue1[(int)morph.hash["hohol"]] = 1f;
  6993. }
  6994. else
  6995. {
  6996. fieldValue1[(int)morph.hash["hohol"]] = 0.0f;
  6997. }
  6998. if (float.Parse(strArray[34]) == 1.0)
  6999. {
  7000. fieldValue1[(int)morph.hash["toothoff"]] = 1f;
  7001. }
  7002. else
  7003. {
  7004. fieldValue1[(int)morph.hash["toothoff"]] = 0.0f;
  7005. }
  7006. if (strArray.Length > 35)
  7007. {
  7008. morph.boNoseFook = float.Parse(strArray[35]) == 1.0;
  7009. }
  7010. }
  7011. maidArray[selectMaidIndex].body0.Face.morph.FixBlendValues_Face();
  7012. isFaceInit = true;
  7013. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  7014. }
  7015. GUI.enabled = !faceCombo.isClickedComboButton;
  7016. bool state = GUI.enabled;
  7017. GUI.enabled = true;
  7018. GUI.DragWindow();
  7019. GUI.enabled = state;
  7020. yotogiFlg = false;
  7021. if (sceneLevel != 14
  7022. || !GameObject
  7023. .Find("/UI Root/YotogiPlayPanel/CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit"))
  7024. {
  7025. return;
  7026. }
  7027. yotogiFlg = true;
  7028. }
  7029. private void MaidCallWindow(int winID)
  7030. {
  7031. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  7032. GUIStyle style1 = "label";
  7033. style1.fontSize = GetPix(14);
  7034. style1.alignment = TextAnchor.UpperLeft;
  7035. GUIStyle style2 = "button";
  7036. style2.fontSize = GetPix(16);
  7037. style2.alignment = TextAnchor.MiddleCenter;
  7038. GUIStyle style3 = new GUIStyle("toggle")
  7039. {
  7040. fontSize = GetPix(13)
  7041. };
  7042. float pix = GetPix(70);
  7043. if (comboBoxList == null)
  7044. {
  7045. comboBoxControl.selectedItemIndex = 0;
  7046. comboBoxList = new GUIContent[11];
  7047. comboBoxList[0] = new GUIContent("通常");
  7048. comboBoxList[1] = new GUIContent("横一列");
  7049. comboBoxList[2] = new GUIContent("縦一列");
  7050. comboBoxList[3] = new GUIContent("斜め");
  7051. comboBoxList[4] = new GUIContent("円(外向き)");
  7052. comboBoxList[5] = new GUIContent("円(内向き)");
  7053. comboBoxList[6] = new GUIContent("扇");
  7054. comboBoxList[7] = new GUIContent("V");
  7055. comboBoxList[8] = new GUIContent("^");
  7056. comboBoxList[9] = new GUIContent("M");
  7057. comboBoxList[10] = new GUIContent("W");
  7058. }
  7059. bool flag1 = true;
  7060. if (faceFlg || poseFlg || sceneFlg || kankyoFlg || kankyo2Flg)
  7061. {
  7062. flag1 = false;
  7063. }
  7064. if (!isF6 && GUI.Toggle(new Rect(GetPix(2),
  7065. GetPix(2),
  7066. GetPix(39),
  7067. GetPix(20)),
  7068. flag1,
  7069. "配置",
  7070. style3))
  7071. {
  7072. faceFlg = false;
  7073. poseFlg = false;
  7074. sceneFlg = false;
  7075. kankyoFlg = false;
  7076. kankyo2Flg = false;
  7077. bGui = true;
  7078. }
  7079. if (!yotogiFlg && GUI.Toggle(new Rect(GetPix(41),
  7080. GetPix(2),
  7081. GetPix(39),
  7082. GetPix(20)),
  7083. poseFlg,
  7084. "操作",
  7085. style3))
  7086. {
  7087. poseFlg = true;
  7088. faceFlg = false;
  7089. sceneFlg = false;
  7090. kankyoFlg = false;
  7091. kankyo2Flg = false;
  7092. }
  7093. if (GUI.Toggle(new Rect(GetPix(80), GetPix(2), GetPix(39), GetPix(20)),
  7094. faceFlg,
  7095. "表情",
  7096. style3))
  7097. {
  7098. faceFlg = true;
  7099. poseFlg = false;
  7100. sceneFlg = false;
  7101. kankyoFlg = false;
  7102. kankyo2Flg = false;
  7103. if (!faceFlg2)
  7104. {
  7105. isFaceInit = true;
  7106. faceFlg2 = true;
  7107. maidArray[selectMaidIndex].boMabataki = false;
  7108. faceCombo.selectedItemIndex = faceIndex[selectMaidIndex];
  7109. }
  7110. }
  7111. if (GUI.Toggle(new Rect(GetPix(119), GetPix(2), GetPix(39), GetPix(20)),
  7112. kankyoFlg,
  7113. "環境",
  7114. style3))
  7115. {
  7116. poseFlg = false;
  7117. faceFlg = false;
  7118. sceneFlg = false;
  7119. kankyoFlg = true;
  7120. kankyo2Flg = false;
  7121. }
  7122. if (!line1)
  7123. {
  7124. line1 = MakeTex(2, 2, new Color(0.0f, 0.0f, 0.0f, 0.3f));
  7125. line2 = MakeTex(2, 2, new Color(0.7f, 0.7f, 0.7f, 0.6f));
  7126. }
  7127. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 2f), line1);
  7128. GUI.DrawTexture(new Rect(GetPix(5), GetPix(20), GetPix(160), 1f), line2);
  7129. int stockMaidCount1 = characterMgr.GetStockMaidCount();
  7130. Rect position;
  7131. Rect viewRect;
  7132. if (sceneLevel != 5)
  7133. {
  7134. position = new Rect(GetPix(7),
  7135. GetPix(110),
  7136. rectWin.width - GetPix(14),
  7137. rectWin.height * 0.83f);
  7138. viewRect = new Rect(0.0f,
  7139. 0.0f,
  7140. position.width * 0.85f,
  7141. (pix + GetPix(5)) * stockMaidCount1 + GetPix(15));
  7142. }
  7143. else
  7144. {
  7145. position = new Rect(GetPix(7),
  7146. GetPix(110),
  7147. rectWin.width - GetPix(14),
  7148. (float)(rectWin.height * 0.829999983310699 * 0.980000019073486));
  7149. viewRect = new Rect(0.0f,
  7150. 0.0f,
  7151. position.width * 0.85f,
  7152. (float)((pix + (double)GetPix(5)) * stockMaidCount1
  7153. + GetPix(15) * 0.920000016689301));
  7154. }
  7155. float y = 0.0f;
  7156. if (comboBoxControl.isClickedComboButton)
  7157. {
  7158. GUI.enabled = false;
  7159. }
  7160. if (GUI.Button(new Rect(GetPix(10), GetPix(78), rectWin.width * 0.85f, GetPix(28)),
  7161. "呼び出す",
  7162. style2))
  7163. {
  7164. isYobidashi = true;
  7165. selectMaidIndex = 0;
  7166. copyIndex = 0;
  7167. for (int index = 0; index < maxMaidCnt; ++index)
  7168. {
  7169. if (!isLock[index] && maidArray[index] && maidArray[index].Visible)
  7170. {
  7171. maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  7172. maidArray[index].SetAutoTwistAll(true);
  7173. }
  7174. maidArray[index] = null;
  7175. }
  7176. for (int index = 0; index < maxMaidCnt; ++index)
  7177. {
  7178. isStop[index] = false;
  7179. }
  7180. bGui = false;
  7181. isFadeOut = true;
  7182. GameMain.Instance.MainCamera.FadeOut(0.0f, false, null, true, new Color());
  7183. for (int index = 0; index < characterMgr.GetStockMaidCount(); ++index)
  7184. {
  7185. characterMgr.GetStockMaidList()[index].Visible = false;
  7186. }
  7187. }
  7188. GUIStyle style4 = "button";
  7189. style4.fontSize = GetPix(13);
  7190. GUIStyleState guiStyleState = new GUIStyleState();
  7191. if (GUI.Button(new Rect(GetPix(10), GetPix(52), rectWin.width * 0.4f, GetPix(23)),
  7192. "7人選択",
  7193. style4))
  7194. {
  7195. if (sceneLevel != 5)
  7196. {
  7197. selectList = new ArrayList
  7198. {
  7199. 0,
  7200. 1,
  7201. 2,
  7202. 3,
  7203. 4,
  7204. 5,
  7205. 6
  7206. };
  7207. }
  7208. else
  7209. {
  7210. int stockMaidCount2 = characterMgr.GetStockMaidCount();
  7211. selectList = new ArrayList
  7212. {
  7213. editMaid
  7214. };
  7215. if (stockMaidCount2 > 1)
  7216. {
  7217. if (editMaid >= 1)
  7218. {
  7219. selectList.Add(0);
  7220. }
  7221. else if (stockMaidCount2 > 2)
  7222. {
  7223. selectList.Add(1);
  7224. }
  7225. }
  7226. if (stockMaidCount2 > 2)
  7227. {
  7228. if (editMaid >= 2)
  7229. {
  7230. selectList.Add(1);
  7231. }
  7232. else if (stockMaidCount2 > 3)
  7233. {
  7234. selectList.Add(2);
  7235. }
  7236. }
  7237. if (stockMaidCount2 > 3)
  7238. {
  7239. if (editMaid >= 3)
  7240. {
  7241. selectList.Add(2);
  7242. }
  7243. else if (stockMaidCount2 > 4)
  7244. {
  7245. selectList.Add(3);
  7246. }
  7247. }
  7248. if (stockMaidCount2 > 4)
  7249. {
  7250. if (editMaid >= 4)
  7251. {
  7252. selectList.Add(3);
  7253. }
  7254. else if (stockMaidCount2 > 5)
  7255. {
  7256. selectList.Add(4);
  7257. }
  7258. }
  7259. if (stockMaidCount2 > 5)
  7260. {
  7261. if (editMaid >= 5)
  7262. {
  7263. selectList.Add(4);
  7264. }
  7265. else if (stockMaidCount2 > 6)
  7266. {
  7267. selectList.Add(5);
  7268. }
  7269. }
  7270. if (stockMaidCount2 > 6)
  7271. {
  7272. if (editMaid >= 6)
  7273. {
  7274. selectList.Add(5);
  7275. }
  7276. else if (stockMaidCount2 > 7)
  7277. {
  7278. selectList.Add(6);
  7279. }
  7280. }
  7281. }
  7282. }
  7283. if (GUI.Button(new Rect(rectWin.width * 0.5f, GetPix(52), rectWin.width * 0.4f, GetPix(23)),
  7284. "選択解除",
  7285. style4))
  7286. {
  7287. selectList = new ArrayList();
  7288. if (sceneLevel == 5)
  7289. {
  7290. selectList.Add(editMaid);
  7291. }
  7292. }
  7293. GUI.enabled = true;
  7294. maidCallScrollPos = GUI.BeginScrollView(position, maidCallScrollPos, viewRect);
  7295. for (int nStockNo = 0; nStockNo < characterMgr.GetStockMaidCount(); ++nStockNo)
  7296. {
  7297. GUI.enabled = true;
  7298. GUI.DrawTexture(new Rect(2f, y + 2f, (float)(rectWin.width * 0.829999983310699 - 4.0), pix - 4f),
  7299. Texture2D.whiteTexture);
  7300. bool flag2 = false;
  7301. for (int index = 0; index < selectList.Count; ++index)
  7302. {
  7303. if ((int)selectList[index] == nStockNo)
  7304. {
  7305. flag2 = true;
  7306. break;
  7307. }
  7308. }
  7309. if (comboBoxControl.isClickedComboButton)
  7310. {
  7311. GUI.enabled = false;
  7312. GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2);
  7313. GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2);
  7314. }
  7315. if (GUI.Button(new Rect(0.0f, y, rectWin.width * 0.83f, pix), "", style2))
  7316. {
  7317. if (flag2)
  7318. {
  7319. for (int index = 0; index < selectList.Count; ++index)
  7320. {
  7321. if ((int)selectList[index] == nStockNo && (sceneLevel != 5 || (int)selectList[index] != editMaid))
  7322. {
  7323. selectList.Remove(nStockNo);
  7324. break;
  7325. }
  7326. }
  7327. }
  7328. else
  7329. {
  7330. if (selectList.Count > maxMaidCnt - 1)
  7331. {
  7332. selectList.Remove(selectList[maxMaidCnt - 1]);
  7333. }
  7334. selectList.Add(nStockNo);
  7335. }
  7336. }
  7337. GUI.enabled = true;
  7338. if (flag2)
  7339. {
  7340. GUI.DrawTexture(new Rect(5f, y + 5f, (float)(rectWin.width * 0.829999983310699 - 10.0), pix - 10f),
  7341. Texture2D.whiteTexture);
  7342. }
  7343. if (characterMgr.GetStockMaid(nStockNo).GetThumIcon())
  7344. {
  7345. GUI.DrawTexture(new Rect(0.0f, y - 5f, pix, pix), characterMgr.GetStockMaid(nStockNo).GetThumIcon());
  7346. }
  7347. string text = characterMgr.GetStockMaid(nStockNo).status.lastName + "\n"
  7348. + characterMgr.GetStockMaid(nStockNo).status.firstName;
  7349. guiStyleState.textColor = Color.black;
  7350. style1.normal = guiStyleState;
  7351. GUI.Label(new Rect(GetPix(65), y + pix / 4f, pix * 2f, pix * 3f), text, style1);
  7352. if (flag2)
  7353. {
  7354. for (int index = 0; index < selectList.Count; ++index)
  7355. {
  7356. if ((int)selectList[index] == nStockNo)
  7357. {
  7358. GUI.Label(new Rect(rectWin.width * 0.7f, y + 6f, pix, pix), (index + 1).ToString(), style1);
  7359. break;
  7360. }
  7361. }
  7362. }
  7363. y += pix + GetPix(5);
  7364. }
  7365. GUI.EndScrollView();
  7366. guiStyleState.textColor = Color.white;
  7367. style1.normal = guiStyleState;
  7368. comboBoxControl.List(new Rect(GetPix(10), GetPix(25), rectWin.width * 0.56f, GetPix(24)),
  7369. comboBoxList[comboBoxControl.GetSelectedItemIndex()].text,
  7370. comboBoxList,
  7371. listStyle);
  7372. bool OKButton = GUI.Button(new Rect(rectWin.width * 0.66f, GetPix(25), rectWin.width * 0.24f, GetPix(24)),
  7373. "決定",
  7374. style4);
  7375. GUI.DragWindow();
  7376. if (!OKButton)
  7377. {
  7378. return;
  7379. }
  7380. for (int index = 0; index < maxMaidCnt; ++index)
  7381. {
  7382. isStop[index] = false;
  7383. }
  7384. switch (comboBoxControl.GetSelectedItemIndex())
  7385. {
  7386. case 0:
  7387. for (int index = 0; index < maidCnt; ++index)
  7388. {
  7389. Vector3 zero1 = Vector3.zero;
  7390. Vector3 zero2 = Vector3.zero;
  7391. if (selectList.Count <= 7)
  7392. {
  7393. if (selectList.Count % 2 == 1)
  7394. {
  7395. switch (index)
  7396. {
  7397. case 0:
  7398. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f));
  7399. break;
  7400. case 1:
  7401. maidArray[index].SetPos(new Vector3(-0.6f, 0.0f, 0.26f));
  7402. break;
  7403. case 2:
  7404. maidArray[index].SetPos(new Vector3(0.6f, 0.0f, 0.26f));
  7405. break;
  7406. case 3:
  7407. maidArray[index].SetPos(new Vector3(-1.1f, 0.0f, 0.69f));
  7408. break;
  7409. case 4:
  7410. maidArray[index].SetPos(new Vector3(1.1f, 0.0f, 0.69f));
  7411. break;
  7412. case 5:
  7413. maidArray[index].SetPos(new Vector3(-1.47f, 0.0f, 1.1f));
  7414. break;
  7415. case 6:
  7416. maidArray[index].SetPos(new Vector3(1.47f, 0.0f, 1.1f));
  7417. break;
  7418. }
  7419. }
  7420. else
  7421. {
  7422. switch (index)
  7423. {
  7424. case 0:
  7425. maidArray[index].SetPos(new Vector3(0.3f, 0.0f, 0.0f));
  7426. break;
  7427. case 1:
  7428. maidArray[index].SetPos(new Vector3(-0.3f, 0.0f, 0.0f));
  7429. break;
  7430. case 2:
  7431. maidArray[index].SetPos(new Vector3(0.7f, 0.0f, 0.4f));
  7432. break;
  7433. case 3:
  7434. maidArray[index].SetPos(new Vector3(-0.7f, 0.0f, 0.4f));
  7435. break;
  7436. case 4:
  7437. maidArray[index].SetPos(new Vector3(1f, 0.0f, 0.9f));
  7438. break;
  7439. case 5:
  7440. maidArray[index].SetPos(new Vector3(-1f, 0.0f, 0.9f));
  7441. break;
  7442. }
  7443. }
  7444. }
  7445. else
  7446. {
  7447. float num1 = 0.0f;
  7448. if (selectList.Count >= 11)
  7449. {
  7450. float num2 = -0.4f;
  7451. if (selectList.Count % 2 == 1)
  7452. {
  7453. switch (index)
  7454. {
  7455. case 0:
  7456. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f + num2));
  7457. break;
  7458. case 1:
  7459. maidArray[index].SetPos(new Vector3(-0.5f, 0.0f, 0.2f + num2));
  7460. break;
  7461. case 2:
  7462. maidArray[index].SetPos(new Vector3(0.5f, 0.0f, 0.2f + num2));
  7463. break;
  7464. case 3:
  7465. maidArray[index].SetPos(new Vector3(-0.9f, 0.0f, 0.55f + num2));
  7466. break;
  7467. case 4:
  7468. maidArray[index].SetPos(new Vector3(0.9f, 0.0f, 0.55f + num2));
  7469. break;
  7470. case 5:
  7471. maidArray[index].SetPos(new Vector3(-1.25f, 0.0f, 0.9f + num2));
  7472. break;
  7473. case 6:
  7474. maidArray[index].SetPos(new Vector3(1.25f, 0.0f, 0.9f + num2));
  7475. break;
  7476. case 7:
  7477. maidArray[index].SetPos(new Vector3(-1.57f, 0.0f, 1.3f + num2));
  7478. break;
  7479. case 8:
  7480. maidArray[index].SetPos(new Vector3(1.57f, 0.0f, 1.3f + num2));
  7481. break;
  7482. case 9:
  7483. maidArray[index].SetPos(new Vector3(-1.77f, 0.0f, 1.72f + num2));
  7484. break;
  7485. case 10:
  7486. maidArray[index].SetPos(new Vector3(1.77f, 0.0f, 1.72f + num2));
  7487. break;
  7488. case 11:
  7489. maidArray[index].SetPos(new Vector3(-1.85f, 0.0f, 2.17f + num2));
  7490. break;
  7491. case 12:
  7492. maidArray[index].SetPos(new Vector3(1.85f, 0.0f, 2.17f + num2));
  7493. break;
  7494. default:
  7495. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f + num2));
  7496. break;
  7497. }
  7498. }
  7499. else
  7500. {
  7501. switch (index)
  7502. {
  7503. case 0:
  7504. maidArray[index].SetPos(new Vector3(0.25f, 0.0f, 0.0f + num2));
  7505. break;
  7506. case 1:
  7507. maidArray[index].SetPos(new Vector3(-0.25f, 0.0f, 0.0f + num2));
  7508. break;
  7509. case 2:
  7510. maidArray[index].SetPos(new Vector3(0.7f, 0.0f, 0.25f + num2));
  7511. break;
  7512. case 3:
  7513. maidArray[index].SetPos(new Vector3(-0.7f, 0.0f, 0.25f + num2));
  7514. break;
  7515. case 4:
  7516. maidArray[index].SetPos(new Vector3(1.05f, 0.0f, 0.6f + num2));
  7517. break;
  7518. case 5:
  7519. maidArray[index].SetPos(new Vector3(-1.05f, 0.0f, 0.6f + num2));
  7520. break;
  7521. case 6:
  7522. maidArray[index].SetPos(new Vector3(1.35f, 0.0f, 0.9f + num2));
  7523. break;
  7524. case 7:
  7525. maidArray[index].SetPos(new Vector3(-1.35f, 0.0f, 0.9f + num2));
  7526. break;
  7527. case 8:
  7528. maidArray[index].SetPos(new Vector3(1.6f, 0.0f, 1.3f + num2));
  7529. break;
  7530. case 9:
  7531. maidArray[index].SetPos(new Vector3(-1.6f, 0.0f, 1.3f + num2));
  7532. break;
  7533. case 10:
  7534. maidArray[index].SetPos(new Vector3(1.8f, 0.0f, 1.72f + num2));
  7535. break;
  7536. case 11:
  7537. maidArray[index].SetPos(new Vector3(-1.8f, 0.0f, 1.72f + num2));
  7538. break;
  7539. case 12:
  7540. maidArray[index].SetPos(new Vector3(1.9f, 0.0f, 2.17f + num2));
  7541. break;
  7542. case 13:
  7543. maidArray[index].SetPos(new Vector3(-1.9f, 0.0f, 2.17f + num2));
  7544. break;
  7545. default:
  7546. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f + num2));
  7547. break;
  7548. }
  7549. }
  7550. }
  7551. else if (selectList.Count >= 8)
  7552. {
  7553. if (selectList.Count >= 9)
  7554. {
  7555. num1 = -0.2f;
  7556. }
  7557. if (selectList.Count % 2 == 1)
  7558. {
  7559. switch (index)
  7560. {
  7561. case 0:
  7562. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.0f + num1));
  7563. break;
  7564. case 1:
  7565. maidArray[index].SetPos(new Vector3(-0.55f, 0.0f, 0.2f + num1));
  7566. break;
  7567. case 2:
  7568. maidArray[index].SetPos(new Vector3(0.55f, 0.0f, 0.2f + num1));
  7569. break;
  7570. case 3:
  7571. maidArray[index].SetPos(new Vector3(-1f, 0.0f, 0.6f + num1));
  7572. break;
  7573. case 4:
  7574. maidArray[index].SetPos(new Vector3(1f, 0.0f, 0.6f + num1));
  7575. break;
  7576. case 5:
  7577. maidArray[index].SetPos(new Vector3(-1.35f, 0.0f, 1f + num1));
  7578. break;
  7579. case 6:
  7580. maidArray[index].SetPos(new Vector3(1.35f, 0.0f, 1f + num1));
  7581. break;
  7582. case 7:
  7583. maidArray[index].SetPos(new Vector3(-1.6f, 0.0f, 1.4f + num1));
  7584. break;
  7585. case 8:
  7586. maidArray[index].SetPos(new Vector3(1.6f, 0.0f, 1.4f + num1));
  7587. break;
  7588. }
  7589. }
  7590. else
  7591. {
  7592. switch (index)
  7593. {
  7594. case 0:
  7595. maidArray[index].SetPos(new Vector3(0.28f, 0.0f, 0.0f + num1));
  7596. break;
  7597. case 1:
  7598. maidArray[index].SetPos(new Vector3(-0.28f, 0.0f, 0.0f + num1));
  7599. break;
  7600. case 2:
  7601. maidArray[index].SetPos(new Vector3(0.78f, 0.0f, 0.3f + num1));
  7602. break;
  7603. case 3:
  7604. maidArray[index].SetPos(new Vector3(-0.78f, 0.0f, 0.3f + num1));
  7605. break;
  7606. case 4:
  7607. maidArray[index].SetPos(new Vector3(1.22f, 0.0f, 0.7f + num1));
  7608. break;
  7609. case 5:
  7610. maidArray[index].SetPos(new Vector3(-1.22f, 0.0f, 0.7f + num1));
  7611. break;
  7612. case 6:
  7613. maidArray[index].SetPos(new Vector3(1.55f, 0.0f, 1.1f + num1));
  7614. break;
  7615. case 7:
  7616. maidArray[index].SetPos(new Vector3(-1.55f, 0.0f, 1.1f + num1));
  7617. break;
  7618. case 8:
  7619. maidArray[index].SetPos(new Vector3(1.77f, 0.0f, 1.58f + num1));
  7620. break;
  7621. case 9:
  7622. maidArray[index].SetPos(new Vector3(-1.77f, 0.0f, 1.58f + num1));
  7623. break;
  7624. }
  7625. }
  7626. }
  7627. }
  7628. zero2.y = (float)(Math.Atan2(maidArray[index].transform.position.x,
  7629. maidArray[index].transform.position.z - 1.5) * 180.0 / Math.PI) + 180f;
  7630. maidArray[index].SetRot(zero2);
  7631. }
  7632. break;
  7633. case 1:
  7634. for (int index = 0; index < maidCnt; ++index)
  7635. {
  7636. Vector3 zero1 = Vector3.zero;
  7637. Vector3 zero2 = Vector3.zero;
  7638. if (maidCnt < 9)
  7639. {
  7640. switch (index)
  7641. {
  7642. case 1:
  7643. zero1.x = -0.6f;
  7644. break;
  7645. case 2:
  7646. zero1.x = 0.6f;
  7647. break;
  7648. case 3:
  7649. zero1.x = -1.2f;
  7650. break;
  7651. case 4:
  7652. zero1.x = 1.2f;
  7653. break;
  7654. case 5:
  7655. zero1.x = -1.8f;
  7656. break;
  7657. case 6:
  7658. zero1.x = 1.8f;
  7659. break;
  7660. case 7:
  7661. zero1.x = -2.4f;
  7662. break;
  7663. case 8:
  7664. zero1.x = 2.4f;
  7665. break;
  7666. case 9:
  7667. zero1.x = -3f;
  7668. break;
  7669. case 10:
  7670. zero1.x = 3f;
  7671. break;
  7672. }
  7673. }
  7674. else
  7675. {
  7676. switch (index)
  7677. {
  7678. case 1:
  7679. zero1.x = -0.5f;
  7680. break;
  7681. case 2:
  7682. zero1.x = 0.5f;
  7683. break;
  7684. case 3:
  7685. zero1.x = -1f;
  7686. break;
  7687. case 4:
  7688. zero1.x = 1f;
  7689. break;
  7690. case 5:
  7691. zero1.x = -1.5f;
  7692. break;
  7693. case 6:
  7694. zero1.x = 1.5f;
  7695. break;
  7696. case 7:
  7697. zero1.x = -2f;
  7698. break;
  7699. case 8:
  7700. zero1.x = 2f;
  7701. break;
  7702. case 9:
  7703. zero1.x = -2.5f;
  7704. break;
  7705. case 10:
  7706. zero1.x = 2.5f;
  7707. break;
  7708. case 11:
  7709. zero1.x = -3f;
  7710. break;
  7711. case 12:
  7712. zero1.x = 3f;
  7713. break;
  7714. case 13:
  7715. zero1.x = -3.5f;
  7716. break;
  7717. }
  7718. }
  7719. maidArray[index].SetPos(zero1);
  7720. maidArray[index].SetRot(zero2);
  7721. if (index >= 14)
  7722. {
  7723. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7724. }
  7725. }
  7726. break;
  7727. case 2:
  7728. for (int index = 0; index < maidCnt; ++index)
  7729. {
  7730. Vector3 zero1 = Vector3.zero;
  7731. Vector3 zero2 = Vector3.zero;
  7732. if (maidCnt < 9)
  7733. {
  7734. switch (index)
  7735. {
  7736. case 1:
  7737. zero1.z = 0.6f;
  7738. break;
  7739. case 2:
  7740. zero1.z = -0.6f;
  7741. break;
  7742. case 3:
  7743. zero1.z = 1.2f;
  7744. break;
  7745. case 4:
  7746. zero1.z = -1.2f;
  7747. break;
  7748. case 5:
  7749. zero1.z = 1.8f;
  7750. break;
  7751. case 6:
  7752. zero1.z = -1.8f;
  7753. break;
  7754. case 7:
  7755. zero1.z = 2.4f;
  7756. break;
  7757. case 8:
  7758. zero1.z = -2.4f;
  7759. break;
  7760. case 9:
  7761. zero1.z = 3f;
  7762. break;
  7763. case 10:
  7764. zero1.z = -3f;
  7765. break;
  7766. }
  7767. }
  7768. else
  7769. {
  7770. switch (index)
  7771. {
  7772. case 1:
  7773. zero1.z = 0.5f;
  7774. break;
  7775. case 2:
  7776. zero1.z = -0.5f;
  7777. break;
  7778. case 3:
  7779. zero1.z = 1f;
  7780. break;
  7781. case 4:
  7782. zero1.z = -1f;
  7783. break;
  7784. case 5:
  7785. zero1.z = 1.5f;
  7786. break;
  7787. case 6:
  7788. zero1.z = -1.5f;
  7789. break;
  7790. case 7:
  7791. zero1.z = 2f;
  7792. break;
  7793. case 8:
  7794. zero1.z = -2f;
  7795. break;
  7796. case 9:
  7797. zero1.z = 2.5f;
  7798. break;
  7799. case 10:
  7800. zero1.z = -2.5f;
  7801. break;
  7802. case 11:
  7803. zero1.z = 3f;
  7804. break;
  7805. case 12:
  7806. zero1.z = -3f;
  7807. break;
  7808. case 13:
  7809. zero1.z = 3.5f;
  7810. break;
  7811. }
  7812. }
  7813. maidArray[index].SetPos(zero1);
  7814. maidArray[index].SetRot(zero2);
  7815. if (index >= 14)
  7816. {
  7817. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7818. }
  7819. }
  7820. break;
  7821. case 3:
  7822. for (int index = 0; index < maidCnt; ++index)
  7823. {
  7824. Vector3 zero1 = Vector3.zero;
  7825. Vector3 zero2 = Vector3.zero;
  7826. float num = 0.5f;
  7827. if (maidCnt > 11)
  7828. {
  7829. num = 0.25f;
  7830. }
  7831. else if (maidCnt > 9)
  7832. {
  7833. num = 0.32f;
  7834. }
  7835. else if (maidCnt > 7)
  7836. {
  7837. num = 0.4f;
  7838. }
  7839. switch (index)
  7840. {
  7841. case 1:
  7842. zero1.x = -num;
  7843. zero1.z = num;
  7844. break;
  7845. case 2:
  7846. zero1.x = num;
  7847. zero1.z = -num;
  7848. break;
  7849. case 3:
  7850. zero1.x = (float)(-num * 2.0);
  7851. zero1.z = num * 2f;
  7852. break;
  7853. case 4:
  7854. zero1.x = num * 2f;
  7855. zero1.z = (float)(-num * 2.0);
  7856. break;
  7857. case 5:
  7858. zero1.x = (float)(-num * 3.0);
  7859. zero1.z = num * 3f;
  7860. break;
  7861. case 6:
  7862. zero1.x = num * 3f;
  7863. zero1.z = (float)(-num * 3.0);
  7864. break;
  7865. case 7:
  7866. zero1.x = (float)(-num * 4.0);
  7867. zero1.z = num * 4f;
  7868. break;
  7869. case 8:
  7870. zero1.x = num * 4f;
  7871. zero1.z = (float)(-num * 4.0);
  7872. break;
  7873. case 9:
  7874. zero1.x = (float)(-num * 5.0);
  7875. zero1.z = num * 5f;
  7876. break;
  7877. case 10:
  7878. zero1.x = num * 5f;
  7879. zero1.z = (float)(-num * 5.0);
  7880. break;
  7881. case 11:
  7882. zero1.x = (float)(-num * 6.0);
  7883. zero1.z = num * 6f;
  7884. break;
  7885. case 12:
  7886. zero1.x = num * 6f;
  7887. zero1.z = (float)(-num * 6.0);
  7888. break;
  7889. case 13:
  7890. zero1.x = (float)(-num * 7.0);
  7891. zero1.z = num * 7f;
  7892. break;
  7893. }
  7894. maidArray[index].SetPos(zero1);
  7895. maidArray[index].SetRot(zero2);
  7896. if (index >= 14)
  7897. {
  7898. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  7899. }
  7900. }
  7901. break;
  7902. case 4:
  7903. for (int index = 0; index < maidCnt; ++index)
  7904. {
  7905. Vector3 zero1 = Vector3.zero;
  7906. Vector3 zero2 = Vector3.zero;
  7907. float num = (float)(0.400000005960464 + 0.0799999982118607 * maidCnt);
  7908. zero1.x = num * (float)Math.Cos(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7909. zero1.z = num * (float)Math.Sin(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7910. maidArray[index].SetPos(zero1);
  7911. zero2.y = (float)(Math.Atan2(zero1.x, zero1.z) * 180.0 / Math.PI);
  7912. maidArray[index].SetRot(zero2);
  7913. }
  7914. break;
  7915. case 5:
  7916. for (int index = 0; index < maidCnt; ++index)
  7917. {
  7918. Vector3 zero1 = Vector3.zero;
  7919. Vector3 zero2 = Vector3.zero;
  7920. float num = (float)(0.400000005960464 + 0.0799999982118607 * maidCnt);
  7921. zero1.x = num * (float)Math.Cos(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7922. zero1.z = num * (float)Math.Sin(Math.PI / 180.0 * (90 + 360 * index / maidCnt));
  7923. maidArray[index].SetPos(zero1);
  7924. zero2.y = (float)(Math.Atan2(zero1.x, zero1.z) * 180.0 / Math.PI) + 180f;
  7925. maidArray[index].SetRot(zero2);
  7926. }
  7927. break;
  7928. case 6:
  7929. for (int index = 0; index < maidCnt; ++index)
  7930. {
  7931. Vector3 zero1 = Vector3.zero;
  7932. Vector3 zero2 = Vector3.zero;
  7933. float num = 0.0f;
  7934. if (maidCnt > 9)
  7935. {
  7936. num = -0.4f;
  7937. }
  7938. else if (maidCnt > 7)
  7939. {
  7940. num = -0.2f;
  7941. }
  7942. switch (index)
  7943. {
  7944. case 0:
  7945. zero1.z = 0.3f;
  7946. break;
  7947. case 1:
  7948. zero1.x = -0.9f;
  7949. zero1.z = -0.4f;
  7950. zero2.y = 40f;
  7951. break;
  7952. case 2:
  7953. zero1.x = 0.9f;
  7954. zero1.z = -0.4f;
  7955. zero2.y = -40f;
  7956. break;
  7957. case 3:
  7958. zero1.x = -0.4f;
  7959. zero1.z = -0.8f;
  7960. zero2.y = 20f;
  7961. break;
  7962. case 4:
  7963. zero1.x = 0.4f;
  7964. zero1.z = -0.8f;
  7965. zero2.y = -20f;
  7966. break;
  7967. case 5:
  7968. zero1.x = -1.2f;
  7969. zero1.z = 0.1f;
  7970. zero2.y = 60f;
  7971. break;
  7972. case 6:
  7973. zero1.x = 1.2f;
  7974. zero1.z = 0.1f;
  7975. zero2.y = -60f;
  7976. break;
  7977. case 7:
  7978. zero1.x = -1.5f;
  7979. zero1.z = 0.6f;
  7980. zero2.y = 80f;
  7981. break;
  7982. case 8:
  7983. zero1.x = 1.5f;
  7984. zero1.z = 0.6f;
  7985. zero2.y = -80f;
  7986. break;
  7987. case 9:
  7988. zero1.x = -1.6f;
  7989. zero1.z = 1.15f;
  7990. zero2.y = 100f;
  7991. break;
  7992. case 10:
  7993. zero1.x = 1.6f;
  7994. zero1.z = 1.15f;
  7995. zero2.y = -100f;
  7996. break;
  7997. case 11:
  7998. zero1.x = -1.6f;
  7999. zero1.z = 1.65f;
  8000. zero2.y = 110f;
  8001. break;
  8002. case 12:
  8003. zero1.x = 1.65f;
  8004. zero1.z = 1.65f;
  8005. zero2.y = -110f;
  8006. break;
  8007. case 13:
  8008. zero1.x = -1.65f;
  8009. zero1.z = 2.15f;
  8010. zero2.y = 120f;
  8011. break;
  8012. }
  8013. if (index > 0)
  8014. {
  8015. zero1.z += num;
  8016. }
  8017. else
  8018. {
  8019. zero1.z -= num;
  8020. }
  8021. maidArray[index].SetPos(zero1);
  8022. maidArray[index].SetRot(zero2);
  8023. if (index >= 14)
  8024. {
  8025. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  8026. }
  8027. }
  8028. break;
  8029. case 7:
  8030. for (int index = 0; index < maidCnt; ++index)
  8031. {
  8032. Vector3 zero1 = Vector3.zero;
  8033. Vector3 zero2 = Vector3.zero;
  8034. float num = 0.0f;
  8035. if (maidCnt > 11)
  8036. {
  8037. num = 0.6f;
  8038. }
  8039. else if (maidCnt > 9)
  8040. {
  8041. num = 0.4f;
  8042. }
  8043. else if (maidCnt > 7)
  8044. {
  8045. num = 0.2f;
  8046. }
  8047. switch (index)
  8048. {
  8049. case 0:
  8050. zero1.z = 0.8f;
  8051. break;
  8052. case 1:
  8053. zero1.x = -0.45f;
  8054. zero1.z = 0.3f;
  8055. zero2.y = -10f;
  8056. break;
  8057. case 2:
  8058. zero1.x = 0.45f;
  8059. zero1.z = 0.3f;
  8060. zero2.y = 10f;
  8061. break;
  8062. case 3:
  8063. zero1.x = -0.8f;
  8064. zero1.z = -0.2f;
  8065. zero2.y = -20f;
  8066. break;
  8067. case 4:
  8068. zero1.x = 0.8f;
  8069. zero1.z = -0.2f;
  8070. zero2.y = 20f;
  8071. break;
  8072. case 5:
  8073. zero1.x = -1.2f;
  8074. zero1.z = -0.75f;
  8075. zero2.y = -30f;
  8076. break;
  8077. case 6:
  8078. zero1.x = 1.2f;
  8079. zero1.z = -0.75f;
  8080. zero2.y = 30f;
  8081. break;
  8082. case 7:
  8083. zero1.x = -1.6f;
  8084. zero1.z = -1.25f;
  8085. zero2.y = -40f;
  8086. break;
  8087. case 8:
  8088. zero1.x = 1.6f;
  8089. zero1.z = -1.25f;
  8090. zero2.y = 40f;
  8091. break;
  8092. case 9:
  8093. zero1.x = -2f;
  8094. zero1.z = -1.75f;
  8095. zero2.y = -50f;
  8096. break;
  8097. case 10:
  8098. zero1.x = 2f;
  8099. zero1.z = -1.75f;
  8100. zero2.y = 50f;
  8101. break;
  8102. case 11:
  8103. zero1.x = -2.4f;
  8104. zero1.z = -2.25f;
  8105. zero2.y = -60f;
  8106. break;
  8107. case 12:
  8108. zero1.x = 2.4f;
  8109. zero1.z = -2.25f;
  8110. zero2.y = 60f;
  8111. break;
  8112. case 13:
  8113. zero1.x = -2.8f;
  8114. zero1.z = -2.75f;
  8115. zero2.y = -70f;
  8116. break;
  8117. }
  8118. zero1.z += num;
  8119. maidArray[index].SetPos(zero1);
  8120. maidArray[index].SetRot(zero2);
  8121. if (index >= 14)
  8122. {
  8123. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  8124. }
  8125. }
  8126. break;
  8127. case 8:
  8128. for (int index = 0; index < maidCnt; ++index)
  8129. {
  8130. Vector3 zero1 = Vector3.zero;
  8131. Vector3 zero2 = Vector3.zero;
  8132. float num = 0.0f;
  8133. if (maidCnt > 11)
  8134. {
  8135. num = -0.6f;
  8136. }
  8137. else if (maidCnt > 9)
  8138. {
  8139. num = -0.4f;
  8140. }
  8141. else if (maidCnt > 7)
  8142. {
  8143. num = -0.2f;
  8144. }
  8145. switch (index)
  8146. {
  8147. case 0:
  8148. zero1.z = -0.75f;
  8149. break;
  8150. case 1:
  8151. zero1.x = -0.45f;
  8152. zero1.z = -0.2f;
  8153. zero2.y = 20f;
  8154. break;
  8155. case 2:
  8156. zero1.x = 0.45f;
  8157. zero1.z = -0.2f;
  8158. zero2.y = -20f;
  8159. break;
  8160. case 3:
  8161. zero1.x = -0.8f;
  8162. zero1.z = 0.3f;
  8163. zero2.y = 35f;
  8164. break;
  8165. case 4:
  8166. zero1.x = 0.8f;
  8167. zero1.z = 0.3f;
  8168. zero2.y = -35f;
  8169. break;
  8170. case 5:
  8171. zero1.x = -1.2f;
  8172. zero1.z = 0.8f;
  8173. zero2.y = 50f;
  8174. break;
  8175. case 6:
  8176. zero1.x = 1.2f;
  8177. zero1.z = 0.8f;
  8178. zero2.y = -50f;
  8179. break;
  8180. case 7:
  8181. zero1.x = -1.6f;
  8182. zero1.z = 1.3f;
  8183. zero2.y = 65f;
  8184. break;
  8185. case 8:
  8186. zero1.x = 1.6f;
  8187. zero1.z = 1.3f;
  8188. zero2.y = -65f;
  8189. break;
  8190. case 9:
  8191. zero1.x = -2f;
  8192. zero1.z = 1.8f;
  8193. zero2.y = 80f;
  8194. break;
  8195. case 10:
  8196. zero1.x = 2f;
  8197. zero1.z = 1.8f;
  8198. zero2.y = -80f;
  8199. break;
  8200. case 11:
  8201. zero1.x = -2.4f;
  8202. zero1.z = 2.3f;
  8203. zero2.y = 90f;
  8204. break;
  8205. case 12:
  8206. zero1.x = 2.4f;
  8207. zero1.z = 2.3f;
  8208. zero2.y = -90f;
  8209. break;
  8210. case 13:
  8211. zero1.x = -2.8f;
  8212. zero1.z = 2.8f;
  8213. zero2.y = 100f;
  8214. break;
  8215. }
  8216. zero1.z += num;
  8217. maidArray[index].SetPos(zero1);
  8218. maidArray[index].SetRot(zero2);
  8219. if (index >= 14)
  8220. {
  8221. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  8222. }
  8223. }
  8224. break;
  8225. case 9:
  8226. for (int index = 0; index < maidCnt; ++index)
  8227. {
  8228. Vector3 zero1 = Vector3.zero;
  8229. Vector3 zero2 = Vector3.zero;
  8230. float num = 1f;
  8231. if (maidCnt > 9)
  8232. {
  8233. num = 0.84f;
  8234. }
  8235. else if (maidCnt > 7)
  8236. {
  8237. num = 0.92f;
  8238. }
  8239. switch (index)
  8240. {
  8241. case 0:
  8242. zero1.z = 0.0f;
  8243. break;
  8244. case 1:
  8245. zero1.x = -0.5f;
  8246. zero1.z = -0.5f;
  8247. break;
  8248. case 2:
  8249. zero1.x = 0.5f;
  8250. zero1.z = -0.5f;
  8251. break;
  8252. case 3:
  8253. zero1.x = -1f;
  8254. zero1.z = 0.2f;
  8255. break;
  8256. case 4:
  8257. zero1.x = 1f;
  8258. zero1.z = 0.2f;
  8259. break;
  8260. case 5:
  8261. zero1.x = -1.5f;
  8262. zero1.z = -0.5f;
  8263. break;
  8264. case 6:
  8265. zero1.x = 1.5f;
  8266. zero1.z = -0.5f;
  8267. break;
  8268. case 7:
  8269. zero1.x = -2f;
  8270. zero1.z = 0.2f;
  8271. break;
  8272. case 8:
  8273. zero1.x = 2f;
  8274. zero1.z = 0.2f;
  8275. break;
  8276. case 9:
  8277. zero1.x = -2.5f;
  8278. zero1.z = -0.5f;
  8279. break;
  8280. case 10:
  8281. zero1.x = 2.5f;
  8282. zero1.z = -0.5f;
  8283. break;
  8284. case 11:
  8285. zero1.x = -3f;
  8286. zero1.z = 0.2f;
  8287. break;
  8288. case 12:
  8289. zero1.x = 3f;
  8290. zero1.z = 0.2f;
  8291. break;
  8292. case 13:
  8293. zero1.x = -3.5f;
  8294. zero1.z = -0.5f;
  8295. break;
  8296. }
  8297. zero1.x *= num;
  8298. maidArray[index].SetPos(zero1);
  8299. maidArray[index].SetRot(zero2);
  8300. if (index >= 14)
  8301. {
  8302. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  8303. }
  8304. }
  8305. break;
  8306. case 10:
  8307. for (int index = 0; index < maidCnt; ++index)
  8308. {
  8309. Vector3 zero1 = Vector3.zero;
  8310. Vector3 zero2 = Vector3.zero;
  8311. float num = 1f;
  8312. if (maidCnt > 9)
  8313. {
  8314. num = 0.84f;
  8315. }
  8316. else if (maidCnt > 7)
  8317. {
  8318. num = 0.92f;
  8319. }
  8320. switch (index)
  8321. {
  8322. case 0:
  8323. zero1.z = -0.4f;
  8324. break;
  8325. case 1:
  8326. zero1.x = -0.5f;
  8327. zero1.z = 0.2f;
  8328. break;
  8329. case 2:
  8330. zero1.x = 0.5f;
  8331. zero1.z = 0.2f;
  8332. break;
  8333. case 3:
  8334. zero1.x = -1f;
  8335. zero1.z = -0.5f;
  8336. break;
  8337. case 4:
  8338. zero1.x = 1f;
  8339. zero1.z = -0.5f;
  8340. break;
  8341. case 5:
  8342. zero1.x = -1.5f;
  8343. zero1.z = 0.2f;
  8344. break;
  8345. case 6:
  8346. zero1.x = 1.5f;
  8347. zero1.z = 0.2f;
  8348. break;
  8349. case 7:
  8350. zero1.x = -2f;
  8351. zero1.z = -0.5f;
  8352. break;
  8353. case 8:
  8354. zero1.x = 2f;
  8355. zero1.z = -0.5f;
  8356. break;
  8357. case 9:
  8358. zero1.x = -2.5f;
  8359. zero1.z = 0.2f;
  8360. break;
  8361. case 10:
  8362. zero1.x = 2.5f;
  8363. zero1.z = 0.2f;
  8364. break;
  8365. case 11:
  8366. zero1.x = -3f;
  8367. zero1.z = -0.5f;
  8368. break;
  8369. case 12:
  8370. zero1.x = 3f;
  8371. zero1.z = -0.5f;
  8372. break;
  8373. case 13:
  8374. zero1.x = -3.5f;
  8375. zero1.z = 0.2f;
  8376. break;
  8377. }
  8378. zero1.x *= num;
  8379. maidArray[index].SetPos(zero1);
  8380. maidArray[index].SetRot(zero2);
  8381. if (index >= 14)
  8382. {
  8383. maidArray[index].SetPos(new Vector3(0.0f, 0.0f, 0.7f));
  8384. }
  8385. }
  8386. break;
  8387. }
  8388. for (int index = 0; index < maxMaidCnt; ++index)
  8389. {
  8390. if (!isLock[index] && maidArray[index] != null && maidArray[index].Visible)
  8391. {
  8392. maidArray[index].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  8393. maidArray[index].SetAutoTwistAll(true);
  8394. }
  8395. }
  8396. }
  8397. private void MessageWindow(int winID)
  8398. {
  8399. GUIStyle style1 = "label";
  8400. style1.fontSize = GetPix(12);
  8401. style1.alignment = TextAnchor.UpperLeft;
  8402. GUIStyle style2 = "button";
  8403. style2.fontSize = GetPix(16);
  8404. GUI.Label(new Rect(GetPix(8), GetPix(4), GetPix(80), GetPix(25)),
  8405. "名前",
  8406. style1);
  8407. inName = GUI.TextField(new Rect(GetPix(35),
  8408. GetPix(4),
  8409. GetPix(120),
  8410. GetPix(20)),
  8411. inName);
  8412. GUI.Label(new Rect(GetPix(180), GetPix(4), GetPix(100), GetPix(25)),
  8413. "サイズ",
  8414. style1);
  8415. fontSize = (int)GUI.HorizontalSlider(new Rect(GetPix(220),
  8416. GetPix(9),
  8417. GetPix(100),
  8418. GetPix(20)),
  8419. fontSize,
  8420. 25f,
  8421. 60f);
  8422. if (fontSize != mFontSize)
  8423. {
  8424. mFontSize = fontSize;
  8425. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  8426. //MessageClass messageClass = new MessageClass(gameObject, GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr);
  8427. SetFieldValue2<UILabel, int>(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false)
  8428. .GetComponent<UILabel>(),
  8429. "mFontSize",
  8430. fontSize);
  8431. }
  8432. GUI.Label(new Rect(GetPix(325), GetPix(4), GetPix(100), GetPix(25)),
  8433. fontSize.ToString() + "pt",
  8434. style1);
  8435. inText = GUI.TextArea(new Rect(GetPix(8),
  8436. GetPix(26),
  8437. rectWin2.width - GetPix(15),
  8438. GetPix(52)),
  8439. inText,
  8440. 300);
  8441. if (GUI.Button(new Rect(GetPix(8), GetPix(82), GetPix(60), GetPix(20)),
  8442. "決定",
  8443. style2))
  8444. {
  8445. isMessage = true;
  8446. bGuiMessage = false;
  8447. GameObject gameObject1 = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  8448. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  8449. messageWindowMgr.OpenMessageWindowPanel();
  8450. UILabel component = UTY.GetChildObject(gameObject1, "MessageViewer/MsgParent/Message", false).GetComponent<UILabel>();
  8451. UILabel nameComponent = UTY.GetChildObject(gameObject1, "MessageViewer/MsgParent/SpeakerName/Name", false).GetComponent<UILabel>();
  8452. MessageClass inst = new MessageClass(gameObject1, messageWindowMgr);
  8453. // Fix for ENG version: reconfigure MessageClass to behave as in JP game
  8454. inst.subtitles_manager_.visible = false;
  8455. inst.subtitles_manager_ = null;
  8456. component.gameObject.SetActive(true);
  8457. nameComponent.gameObject.SetActive(true);
  8458. UTY.GetChildObject(gameObject1, "MessageViewer/MsgParent/MessageBox", false).SetActive(true);
  8459. SetFieldValue5<MessageClass, UILabel>(inst, "message_label_", component);
  8460. SetFieldValue5<MessageClass, UILabel>(inst, "name_label_", nameComponent);
  8461. component.ProcessText();
  8462. SetFieldValue2<UILabel, int>(component, "mFontSize", fontSize);
  8463. inst.SetText(inName, inText, "", 0, AudioSourceMgr.Type.System);
  8464. inst.FinishChAnime();
  8465. }
  8466. GUI.DragWindow();
  8467. }
  8468. }
  8469. }