MultipleMaids.Gui.cs 406 KB

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