MultipleMaids.Gui.cs 404 KB

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